Package com.arcusys.learn.persistence.liferay.model

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


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

        LFObjectiveState lfObjectiveState = (LFObjectiveState) obj;

        long primaryKey = lfObjectiveState.getPrimaryKey();

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


     */
    @Override
    public LFObjectiveState findByMapKeyAndActivityStateID(String mapKey,
        Integer activityStateID)
        throws NoSuchLFObjectiveStateException, SystemException {
        LFObjectiveState lfObjectiveState = fetchByMapKeyAndActivityStateID(mapKey,
                activityStateID);

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

View Full Code Here

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

        if (result instanceof LFObjectiveState) {
            LFObjectiveState lfObjectiveState = (LFObjectiveState) result;

            if (!Validator.equals(mapKey, lfObjectiveState.getMapKey()) ||
                    !Validator.equals(activityStateID,
                        lfObjectiveState.getActivityStateID())) {
                result = null;
            }
        }

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

            query.append(_SQL_SELECT_LFOBJECTIVESTATE_WHERE);

            boolean bindMapKey = false;

            if (mapKey == null) {
                query.append(_FINDER_COLUMN_MAPKEYANDACTIVITYSTATEID_MAPKEY_1);
            } else if (mapKey.equals(StringPool.BLANK)) {
                query.append(_FINDER_COLUMN_MAPKEYANDACTIVITYSTATEID_MAPKEY_3);
            } else {
                bindMapKey = true;

                if (mapKey.equals(StringPool.BLANK)) {
                    query.append(_FINDER_COLUMN_MAPKEYANDACTIVITYSTATEID_MAPKEY_3);
                } else {
                    query.append(_FINDER_COLUMN_MAPKEYANDACTIVITYSTATEID_MAPKEY_2);
                }
            }

            if (activityStateID == null) {
                query.append(_FINDER_COLUMN_MAPKEYANDACTIVITYSTATEID_ACTIVITYSTATEID_NULL_2);
            } else {
                query.append(_FINDER_COLUMN_MAPKEYANDACTIVITYSTATEID_ACTIVITYSTATEID_2);
            }

            String sql = query.toString();

            Session session = null;

            try {
                session = openSession();

                Query q = session.createQuery(sql);

                QueryPos qPos = QueryPos.getInstance(q);

                if (bindMapKey) {
                    if (mapKey != null) {
                        qPos.add(mapKey);
                    }
                }

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

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

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

                    LFObjectiveState lfObjectiveState = list.get(0);

                    result = lfObjectiveState;

                    cacheResult(lfObjectiveState);

                    if ((lfObjectiveState.getMapKey() == null) ||
                            !lfObjectiveState.getMapKey().equals(mapKey) ||
                            (lfObjectiveState.getActivityStateID() != activityStateID)) {
                        FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_MAPKEYANDACTIVITYSTATEID,
                            finderArgs, lfObjectiveState);
                    }
                }
            } catch (Exception e) {
View Full Code Here

     */
    @Override
    public LFObjectiveState removeByMapKeyAndActivityStateID(String mapKey,
        Integer activityStateID)
        throws NoSuchLFObjectiveStateException, SystemException {
        LFObjectiveState lfObjectiveState = findByMapKeyAndActivityStateID(mapKey,
                activityStateID);

        return remove(lfObjectiveState);
    }
View Full Code Here

     */
    @Override
    public LFObjectiveState findByActivityStateID_First(
        Integer activityStateID, OrderByComparator orderByComparator)
        throws NoSuchLFObjectiveStateException, SystemException {
        LFObjectiveState lfObjectiveState = fetchByActivityStateID_First(activityStateID,
                orderByComparator);

        if (lfObjectiveState != null) {
            return lfObjectiveState;
        }
View Full Code Here

     */
    @Override
    public LFObjectiveState findByActivityStateID_Last(
        Integer activityStateID, OrderByComparator orderByComparator)
        throws NoSuchLFObjectiveStateException, SystemException {
        LFObjectiveState lfObjectiveState = fetchByActivityStateID_Last(activityStateID,
                orderByComparator);

        if (lfObjectiveState != null) {
            return lfObjectiveState;
        }
View Full Code Here

     */
    @Override
    public LFObjectiveState[] findByActivityStateID_PrevAndNext(long id,
        Integer activityStateID, OrderByComparator orderByComparator)
        throws NoSuchLFObjectiveStateException, SystemException {
        LFObjectiveState lfObjectiveState = findByPrimaryKey(id);

        Session session = null;

        try {
            session = openSession();
View Full Code Here

     * @param id the primary key for the new l f objective state
     * @return the new l f objective state
     */
    @Override
    public LFObjectiveState create(long id) {
        LFObjectiveState lfObjectiveState = new LFObjectiveStateImpl();

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

        return lfObjectiveState;
    }
View Full Code Here

        Session session = null;

        try {
            session = openSession();

            LFObjectiveState lfObjectiveState = (LFObjectiveState) session.get(LFObjectiveStateImpl.class,
                    primaryKey);

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

     * @throws SystemException if a system exception occurred
     */
    @Override
    public LFObjectiveState findByPrimaryKey(Serializable primaryKey)
        throws NoSuchLFObjectiveStateException, SystemException {
        LFObjectiveState lfObjectiveState = fetchByPrimaryKey(primaryKey);

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

TOP

Related Classes of com.arcusys.learn.persistence.liferay.model.LFObjectiveState

Copyright © 2018 www.massapicom. 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.