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

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


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

        LFTincanActProfile lfTincanActProfile = (LFTincanActProfile) obj;

        long primaryKey = lfTincanActProfile.getPrimaryKey();

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


    public List<LFTincanActProfile> findByActivityId(String activityId) throws NoSuchLFTincanActProfileException, SystemException {
        return lfTincanActProfilePersistence.findByActivityId(activityId);
    }

    public LFTincanActProfile createLFTincanLrsActivityProfile(String activityId, String profileId, Integer documentId) throws SystemException {
        LFTincanActProfile activityProfile = createLFTincanActProfile(counterLocalService.increment(LFTincanActProfile.class.getName()));
        activityProfile.setActivityId(activityId);
        activityProfile.setProfileId(profileId);
        activityProfile.setDocumentId(documentId);
        lfTincanActProfilePersistence.update(activityProfile, false);
        return activityProfile;
    }
View Full Code Here

     */
    @Override
    public LFTincanActProfile findByActivityIdAndProfileId(String activityId,
        String profileId)
        throws NoSuchLFTincanActProfileException, SystemException {
        LFTincanActProfile lfTincanActProfile = fetchByActivityIdAndProfileId(activityId,
                profileId);

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

View Full Code Here

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

        if (result instanceof LFTincanActProfile) {
            LFTincanActProfile lfTincanActProfile = (LFTincanActProfile) result;

            if (!Validator.equals(activityId, lfTincanActProfile.getActivityId()) ||
                    !Validator.equals(profileId,
                        lfTincanActProfile.getProfileId())) {
                result = null;
            }
        }

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

            query.append(_SQL_SELECT_LFTINCANACTPROFILE_WHERE);

            boolean bindActivityId = false;

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

                if (activityId.equals(StringPool.BLANK)) {
                    query.append(_FINDER_COLUMN_ACTIVITYIDANDPROFILEID_ACTIVITYID_3);
                } else {
                    query.append(_FINDER_COLUMN_ACTIVITYIDANDPROFILEID_ACTIVITYID_2);
                }
            }

            boolean bindProfileId = false;

            if (profileId == null) {
                query.append(_FINDER_COLUMN_ACTIVITYIDANDPROFILEID_PROFILEID_1);
            } else if (profileId.equals(StringPool.BLANK)) {
                query.append(_FINDER_COLUMN_ACTIVITYIDANDPROFILEID_PROFILEID_3);
            } else {
                bindProfileId = true;

                if (profileId.equals(StringPool.BLANK)) {
                    query.append(_FINDER_COLUMN_ACTIVITYIDANDPROFILEID_PROFILEID_3);
                } else {
                    query.append(_FINDER_COLUMN_ACTIVITYIDANDPROFILEID_PROFILEID_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 (bindProfileId) {
                    if (profileId != null) {
                        qPos.add(profileId);
                    }
                }

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

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

                    LFTincanActProfile lfTincanActProfile = list.get(0);

                    result = lfTincanActProfile;

                    cacheResult(lfTincanActProfile);

                    if ((lfTincanActProfile.getActivityId() == null) ||
                            !lfTincanActProfile.getActivityId()
                                                   .equals(activityId) ||
                            (lfTincanActProfile.getProfileId() == null) ||
                            !lfTincanActProfile.getProfileId().equals(profileId)) {
                        FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_ACTIVITYIDANDPROFILEID,
                            finderArgs, lfTincanActProfile);
                    }
                }
            } catch (Exception e) {
View Full Code Here

     */
    @Override
    public LFTincanActProfile removeByActivityIdAndProfileId(
        String activityId, String profileId)
        throws NoSuchLFTincanActProfileException, SystemException {
        LFTincanActProfile lfTincanActProfile = findByActivityIdAndProfileId(activityId,
                profileId);

        return remove(lfTincanActProfile);
    }
View Full Code Here

     */
    @Override
    public LFTincanActProfile findByActivityId_First(String activityId,
        OrderByComparator orderByComparator)
        throws NoSuchLFTincanActProfileException, SystemException {
        LFTincanActProfile lfTincanActProfile = fetchByActivityId_First(activityId,
                orderByComparator);

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

     */
    @Override
    public LFTincanActProfile findByActivityId_Last(String activityId,
        OrderByComparator orderByComparator)
        throws NoSuchLFTincanActProfileException, SystemException {
        LFTincanActProfile lfTincanActProfile = fetchByActivityId_Last(activityId,
                orderByComparator);

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

     */
    @Override
    public LFTincanActProfile[] findByActivityId_PrevAndNext(long id,
        String activityId, OrderByComparator orderByComparator)
        throws NoSuchLFTincanActProfileException, SystemException {
        LFTincanActProfile lfTincanActProfile = findByPrimaryKey(id);

        Session session = null;

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

     * @param id the primary key for the new l f tincan act profile
     * @return the new l f tincan act profile
     */
    @Override
    public LFTincanActProfile create(long id) {
        LFTincanActProfile lfTincanActProfile = new LFTincanActProfileImpl();

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

        return lfTincanActProfile;
    }
View Full Code Here

        Session session = null;

        try {
            session = openSession();

            LFTincanActProfile lfTincanActProfile = (LFTincanActProfile) session.get(LFTincanActProfileImpl.class,
                    primaryKey);

            if (lfTincanActProfile == 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.LFTincanActProfile

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.