Examples of LFTincanLrsState


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

     */
    @Override
    public LFTincanLrsState findByStateDocument(String activityId,
        String stateId, Integer agentId, String registration)
        throws NoSuchLFTincanLrsStateException, SystemException {
        LFTincanLrsState lfTincanLrsState = fetchByStateDocument(activityId,
                stateId, agentId, registration);

        if (lfTincanLrsState == null) {
            StringBundler msg = new StringBundler(10);

View Full Code Here

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

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

        if (result instanceof LFTincanLrsState) {
            LFTincanLrsState lfTincanLrsState = (LFTincanLrsState) result;

            if (!Validator.equals(activityId, lfTincanLrsState.getActivityId()) ||
                    !Validator.equals(stateId, lfTincanLrsState.getStateId()) ||
                    !Validator.equals(agentId, lfTincanLrsState.getAgentId()) ||
                    !Validator.equals(registration,
                        lfTincanLrsState.getRegistration())) {
                result = null;
            }
        }

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

            query.append(_SQL_SELECT_LFTINCANLRSSTATE_WHERE);

            boolean bindActivityId = false;

            if (activityId == null) {
                query.append(_FINDER_COLUMN_STATEDOCUMENT_ACTIVITYID_1);
            } else if (activityId.equals(StringPool.BLANK)) {
                query.append(_FINDER_COLUMN_STATEDOCUMENT_ACTIVITYID_3);
            } else {
                bindActivityId = true;

                if (activityId.equals(StringPool.BLANK)) {
                    query.append(_FINDER_COLUMN_STATEDOCUMENT_ACTIVITYID_3);
                } else {
                    query.append(_FINDER_COLUMN_STATEDOCUMENT_ACTIVITYID_2);
                }
            }

            boolean bindStateId = false;

            if (stateId == null) {
                query.append(_FINDER_COLUMN_STATEDOCUMENT_STATEID_1);
            } else if (stateId.equals(StringPool.BLANK)) {
                query.append(_FINDER_COLUMN_STATEDOCUMENT_STATEID_3);
            } else {
                bindStateId = true;

                if (stateId.equals(StringPool.BLANK)) {
                    query.append(_FINDER_COLUMN_STATEDOCUMENT_STATEID_3);
                } else {
                    query.append(_FINDER_COLUMN_STATEDOCUMENT_STATEID_2);
                }
            }

            if (agentId == null) {
                query.append(_FINDER_COLUMN_STATEDOCUMENT_AGENTID_NULL_2);
            } else {
                query.append(_FINDER_COLUMN_STATEDOCUMENT_AGENTID_2);
            }

            boolean bindRegistration = false;

            if (registration == null) {
                query.append(_FINDER_COLUMN_STATEDOCUMENT_REGISTRATION_1);
            } else if (registration.equals(StringPool.BLANK)) {
                query.append(_FINDER_COLUMN_STATEDOCUMENT_REGISTRATION_3);
            } else {
                bindRegistration = true;

                if (registration.equals(StringPool.BLANK)) {
                    query.append(_FINDER_COLUMN_STATEDOCUMENT_REGISTRATION_3);
                } else {
                    query.append(_FINDER_COLUMN_STATEDOCUMENT_REGISTRATION_2);
                }
            }

            String sql = query.toString();

            Session session = null;

            try {
                session = openSession();

                Query q = session.createQuery(sql);

                QueryPos qPos = QueryPos.getInstance(q);

                if (bindActivityId) {
                    if (activityId != null) {
                        qPos.add(activityId);
                    }
                }

                if (bindStateId) {
                    if (stateId != null) {
                        qPos.add(stateId);
                    }
                }

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

                if (bindRegistration) {
                    if (registration != null) {
                        qPos.add(registration);
                    }
                }

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

                if (list.isEmpty()) {
                    FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_STATEDOCUMENT,
                        finderArgs, list);
                } else {
                    if ((list.size() > 1) && _log.isWarnEnabled()) {
                        _log.warn(
                            "LFTincanLrsStatePersistenceImpl.fetchByStateDocument(String, String, 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.");
                    }

                    LFTincanLrsState lfTincanLrsState = list.get(0);

                    result = lfTincanLrsState;

                    cacheResult(lfTincanLrsState);

                    if ((lfTincanLrsState.getActivityId() == null) ||
                            !lfTincanLrsState.getActivityId().equals(activityId) ||
                            (lfTincanLrsState.getStateId() == null) ||
                            !lfTincanLrsState.getStateId().equals(stateId) ||
                            (lfTincanLrsState.getAgentId() != agentId) ||
                            (lfTincanLrsState.getRegistration() == null) ||
                            !lfTincanLrsState.getRegistration()
                                                 .equals(registration)) {
                        FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_STATEDOCUMENT,
                            finderArgs, lfTincanLrsState);
                    }
                }
View Full Code Here

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

     */
    @Override
    public LFTincanLrsState removeByStateDocument(String activityId,
        String stateId, Integer agentId, String registration)
        throws NoSuchLFTincanLrsStateException, SystemException {
        LFTincanLrsState lfTincanLrsState = findByStateDocument(activityId,
                stateId, agentId, registration);

        return remove(lfTincanLrsState);
    }
View Full Code Here

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

     * @param id the primary key for the new l f tincan lrs state
     * @return the new l f tincan lrs state
     */
    @Override
    public LFTincanLrsState create(long id) {
        LFTincanLrsState lfTincanLrsState = new LFTincanLrsStateImpl();

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

        return lfTincanLrsState;
    }
View Full Code Here

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

        Session session = null;

        try {
            session = openSession();

            LFTincanLrsState lfTincanLrsState = (LFTincanLrsState) session.get(LFTincanLrsStateImpl.class,
                    primaryKey);

            if (lfTincanLrsState == 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.LFTincanLrsState

     * @throws SystemException if a system exception occurred
     */
    @Override
    public LFTincanLrsState findByPrimaryKey(Serializable primaryKey)
        throws NoSuchLFTincanLrsStateException, SystemException {
        LFTincanLrsState lfTincanLrsState = fetchByPrimaryKey(primaryKey);

        if (lfTincanLrsState == 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.LFTincanLrsState

     * @throws SystemException if a system exception occurred
     */
    @Override
    public LFTincanLrsState fetchByPrimaryKey(Serializable primaryKey)
        throws SystemException {
        LFTincanLrsState lfTincanLrsState = (LFTincanLrsState) EntityCacheUtil.getResult(LFTincanLrsStateModelImpl.ENTITY_CACHE_ENABLED,
                LFTincanLrsStateImpl.class, primaryKey);

        if (lfTincanLrsState == _nullLFTincanLrsState) {
            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.