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

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


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

        LFActivityStateTree lfActivityStateTree = (LFActivityStateTree) obj;

        long primaryKey = lfActivityStateTree.getPrimaryKey();

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


     * @throws SystemException if a system exception occurred
     */
    @Override
    public LFActivityStateTree findByAttemptID(Integer attemptID)
        throws NoSuchLFActivityStateTreeException, SystemException {
        LFActivityStateTree lfActivityStateTree = fetchByAttemptID(attemptID);

        if (lfActivityStateTree == null) {
            StringBundler msg = new StringBundler(4);

            msg.append(_NO_SUCH_ENTITY_WITH_KEY);
View Full Code Here

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

        if (result instanceof LFActivityStateTree) {
            LFActivityStateTree lfActivityStateTree = (LFActivityStateTree) result;

            if (!Validator.equals(attemptID, lfActivityStateTree.getAttemptID())) {
                result = null;
            }
        }

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

            query.append(_SQL_SELECT_LFACTIVITYSTATETREE_WHERE);

            if (attemptID == null) {
                query.append(_FINDER_COLUMN_ATTEMPTID_ATTEMPTID_NULL_2);
            } else {
                query.append(_FINDER_COLUMN_ATTEMPTID_ATTEMPTID_2);
            }

            String sql = query.toString();

            Session session = null;

            try {
                session = openSession();

                Query q = session.createQuery(sql);

                QueryPos qPos = QueryPos.getInstance(q);

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

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

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

                    LFActivityStateTree lfActivityStateTree = list.get(0);

                    result = lfActivityStateTree;

                    cacheResult(lfActivityStateTree);

                    if ((lfActivityStateTree.getAttemptID() != attemptID)) {
                        FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_ATTEMPTID,
                            finderArgs, lfActivityStateTree);
                    }
                }
            } catch (Exception e) {
View Full Code Here

     * @throws SystemException if a system exception occurred
     */
    @Override
    public LFActivityStateTree removeByAttemptID(Integer attemptID)
        throws NoSuchLFActivityStateTreeException, SystemException {
        LFActivityStateTree lfActivityStateTree = findByAttemptID(attemptID);

        return remove(lfActivityStateTree);
    }
View Full Code Here

     * @param id the primary key for the new l f activity state tree
     * @return the new l f activity state tree
     */
    @Override
    public LFActivityStateTree create(long id) {
        LFActivityStateTree lfActivityStateTree = new LFActivityStateTreeImpl();

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

        return lfActivityStateTree;
    }
View Full Code Here

        Session session = null;

        try {
            session = openSession();

            LFActivityStateTree lfActivityStateTree = (LFActivityStateTree) session.get(LFActivityStateTreeImpl.class,
                    primaryKey);

            if (lfActivityStateTree == 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 LFActivityStateTree findByPrimaryKey(Serializable primaryKey)
        throws NoSuchLFActivityStateTreeException, SystemException {
        LFActivityStateTree lfActivityStateTree = fetchByPrimaryKey(primaryKey);

        if (lfActivityStateTree == 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 LFActivityStateTree fetchByPrimaryKey(Serializable primaryKey)
        throws SystemException {
        LFActivityStateTree lfActivityStateTree = (LFActivityStateTree) EntityCacheUtil.getResult(LFActivityStateTreeModelImpl.ENTITY_CACHE_ENABLED,
                LFActivityStateTreeImpl.class, primaryKey);

        if (lfActivityStateTree == _nullLFActivityStateTree) {
            return null;
        }
View Full Code Here

TOP

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

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.