Examples of LFSequencing


Examples of com.arcusys.learn.persistence.liferay.model.LFSequencing

        if (!(obj instanceof LFSequencing)) {
            return false;
        }

        LFSequencing lfSequencing = (LFSequencing) obj;

        long primaryKey = lfSequencing.getPrimaryKey();

        if (getPrimaryKey() == primaryKey) {
            return true;
        } else {
            return false;
View Full Code Here

Examples of com.arcusys.learn.persistence.liferay.model.LFSequencing

     * @throws SystemException if a system exception occurred
     */
    @Override
    public LFSequencing findByActivityIDAndPackageID(Integer packageID,
        String activityID) throws NoSuchLFSequencingException, SystemException {
        LFSequencing lfSequencing = fetchByActivityIDAndPackageID(packageID,
                activityID);

        if (lfSequencing == null) {
            StringBundler msg = new StringBundler(6);

View Full Code Here

Examples of com.arcusys.learn.persistence.liferay.model.LFSequencing

            result = FinderCacheUtil.getResult(FINDER_PATH_FETCH_BY_ACTIVITYIDANDPACKAGEID,
                    finderArgs, this);
        }

        if (result instanceof LFSequencing) {
            LFSequencing lfSequencing = (LFSequencing) result;

            if (!Validator.equals(packageID, lfSequencing.getPackageID()) ||
                    !Validator.equals(activityID, lfSequencing.getActivityID())) {
                result = null;
            }
        }

        if (result == null) {
            StringBundler query = new StringBundler(4);

            query.append(_SQL_SELECT_LFSEQUENCING_WHERE);

            if (packageID == null) {
                query.append(_FINDER_COLUMN_ACTIVITYIDANDPACKAGEID_PACKAGEID_NULL_2);
            } else {
                query.append(_FINDER_COLUMN_ACTIVITYIDANDPACKAGEID_PACKAGEID_2);
            }

            boolean bindActivityID = false;

            if (activityID == null) {
                query.append(_FINDER_COLUMN_ACTIVITYIDANDPACKAGEID_ACTIVITYID_1);
            } else if (activityID.equals(StringPool.BLANK)) {
                query.append(_FINDER_COLUMN_ACTIVITYIDANDPACKAGEID_ACTIVITYID_3);
            } else {
                bindActivityID = true;

                if (activityID.equals(StringPool.BLANK)) {
                    query.append(_FINDER_COLUMN_ACTIVITYIDANDPACKAGEID_ACTIVITYID_3);
                } else {
                    query.append(_FINDER_COLUMN_ACTIVITYIDANDPACKAGEID_ACTIVITYID_2);
                }
            }

            String sql = query.toString();

            Session session = null;

            try {
                session = openSession();

                Query q = session.createQuery(sql);

                QueryPos qPos = QueryPos.getInstance(q);

                if (packageID != null) {
                    qPos.add(packageID.intValue());
                }

                if (bindActivityID) {
                    if (activityID != null) {
                        qPos.add(activityID);
                    }
                }

                List<LFSequencing> list = q.list();

                if (list.isEmpty()) {
                    FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_ACTIVITYIDANDPACKAGEID,
                        finderArgs, list);
                } else {
                    if ((list.size() > 1) && _log.isWarnEnabled()) {
                        _log.warn(
                            "LFSequencingPersistenceImpl.fetchByActivityIDAndPackageID(Integer, String, boolean) with parameters (" +
                            StringUtil.merge(finderArgs) +
                            ") yields a result set with more than 1 result. This violates the logical unique restriction. There is no order guarantee on which result is returned by this finder.");
                    }

                    LFSequencing lfSequencing = list.get(0);

                    result = lfSequencing;

                    cacheResult(lfSequencing);

                    if ((lfSequencing.getPackageID() != packageID) ||
                            (lfSequencing.getActivityID() == null) ||
                            !lfSequencing.getActivityID().equals(activityID)) {
                        FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_ACTIVITYIDANDPACKAGEID,
                            finderArgs, lfSequencing);
                    }
                }
            } catch (Exception e) {
View Full Code Here

Examples of com.arcusys.learn.persistence.liferay.model.LFSequencing

     * @throws SystemException if a system exception occurred
     */
    @Override
    public LFSequencing removeByActivityIDAndPackageID(Integer packageID,
        String activityID) throws NoSuchLFSequencingException, SystemException {
        LFSequencing lfSequencing = findByActivityIDAndPackageID(packageID,
                activityID);

        return remove(lfSequencing);
    }
View Full Code Here

Examples of com.arcusys.learn.persistence.liferay.model.LFSequencing

     * @param id the primary key for the new l f sequencing
     * @return the new l f sequencing
     */
    @Override
    public LFSequencing create(long id) {
        LFSequencing lfSequencing = new LFSequencingImpl();

        lfSequencing.setNew(true);
        lfSequencing.setPrimaryKey(id);

        return lfSequencing;
    }
View Full Code Here

Examples of com.arcusys.learn.persistence.liferay.model.LFSequencing

        Session session = null;

        try {
            session = openSession();

            LFSequencing lfSequencing = (LFSequencing) session.get(LFSequencingImpl.class,
                    primaryKey);

            if (lfSequencing == null) {
                if (_log.isWarnEnabled()) {
                    _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey);
View Full Code Here

Examples of com.arcusys.learn.persistence.liferay.model.LFSequencing

     * @throws SystemException if a system exception occurred
     */
    @Override
    public LFSequencing findByPrimaryKey(Serializable primaryKey)
        throws NoSuchLFSequencingException, SystemException {
        LFSequencing lfSequencing = fetchByPrimaryKey(primaryKey);

        if (lfSequencing == null) {
            if (_log.isWarnEnabled()) {
                _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey);
            }
View Full Code Here

Examples of com.arcusys.learn.persistence.liferay.model.LFSequencing

     * @throws SystemException if a system exception occurred
     */
    @Override
    public LFSequencing fetchByPrimaryKey(Serializable primaryKey)
        throws SystemException {
        LFSequencing lfSequencing = (LFSequencing) EntityCacheUtil.getResult(LFSequencingModelImpl.ENTITY_CACHE_ENABLED,
                LFSequencingImpl.class, primaryKey);

        if (lfSequencing == _nullLFSequencing) {
            return null;
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.