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

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


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

        LFCertificateActivity lfCertificateActivity = (LFCertificateActivity) obj;

        LFCertificateActivityPK primaryKey = lfCertificateActivity.getPrimaryKey();

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


     */
    @Override
    public LFCertificateActivity findByCertificateID_First(Long certificateID,
        OrderByComparator orderByComparator)
        throws NoSuchLFCertificateActivityException, SystemException {
        LFCertificateActivity lfCertificateActivity = fetchByCertificateID_First(certificateID,
                orderByComparator);

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

     */
    @Override
    public LFCertificateActivity findByCertificateID_Last(Long certificateID,
        OrderByComparator orderByComparator)
        throws NoSuchLFCertificateActivityException, SystemException {
        LFCertificateActivity lfCertificateActivity = fetchByCertificateID_Last(certificateID,
                orderByComparator);

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

    @Override
    public LFCertificateActivity[] findByCertificateID_PrevAndNext(
        LFCertificateActivityPK lfCertificateActivityPK, Long certificateID,
        OrderByComparator orderByComparator)
        throws NoSuchLFCertificateActivityException, SystemException {
        LFCertificateActivity lfCertificateActivity = findByPrimaryKey(lfCertificateActivityPK);

        Session session = null;

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

     */
    @Override
    public LFCertificateActivity findByActivityName_First(String activityName,
        OrderByComparator orderByComparator)
        throws NoSuchLFCertificateActivityException, SystemException {
        LFCertificateActivity lfCertificateActivity = fetchByActivityName_First(activityName,
                orderByComparator);

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

     */
    @Override
    public LFCertificateActivity findByActivityName_Last(String activityName,
        OrderByComparator orderByComparator)
        throws NoSuchLFCertificateActivityException, SystemException {
        LFCertificateActivity lfCertificateActivity = fetchByActivityName_Last(activityName,
                orderByComparator);

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

    @Override
    public LFCertificateActivity[] findByActivityName_PrevAndNext(
        LFCertificateActivityPK lfCertificateActivityPK, String activityName,
        OrderByComparator orderByComparator)
        throws NoSuchLFCertificateActivityException, SystemException {
        LFCertificateActivity lfCertificateActivity = findByPrimaryKey(lfCertificateActivityPK);

        Session session = null;

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

     */
    @Override
    public LFCertificateActivity findByCertificateIDAndActivityName(
        Long certificateID, String activityName)
        throws NoSuchLFCertificateActivityException, SystemException {
        LFCertificateActivity lfCertificateActivity = fetchByCertificateIDAndActivityName(certificateID,
                activityName);

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

View Full Code Here

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

        if (result instanceof LFCertificateActivity) {
            LFCertificateActivity lfCertificateActivity = (LFCertificateActivity) result;

            if (!Validator.equals(certificateID,
                        lfCertificateActivity.getCertificateID()) ||
                    !Validator.equals(activityName,
                        lfCertificateActivity.getActivityName())) {
                result = null;
            }
        }

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

            query.append(_SQL_SELECT_LFCERTIFICATEACTIVITY_WHERE);

            if (certificateID == null) {
                query.append(_FINDER_COLUMN_CERTIFICATEIDANDACTIVITYNAME_CERTIFICATEID_NULL_2);
            } else {
                query.append(_FINDER_COLUMN_CERTIFICATEIDANDACTIVITYNAME_CERTIFICATEID_2);
            }

            boolean bindActivityName = false;

            if (activityName == null) {
                query.append(_FINDER_COLUMN_CERTIFICATEIDANDACTIVITYNAME_ACTIVITYNAME_1);
            } else if (activityName.equals(StringPool.BLANK)) {
                query.append(_FINDER_COLUMN_CERTIFICATEIDANDACTIVITYNAME_ACTIVITYNAME_3);
            } else {
                bindActivityName = true;

                if (activityName.equals(StringPool.BLANK)) {
                    query.append(_FINDER_COLUMN_CERTIFICATEIDANDACTIVITYNAME_ACTIVITYNAME_3);
                } else {
                    query.append(_FINDER_COLUMN_CERTIFICATEIDANDACTIVITYNAME_ACTIVITYNAME_2);
                }
            }

            String sql = query.toString();

            Session session = null;

            try {
                session = openSession();

                Query q = session.createQuery(sql);

                QueryPos qPos = QueryPos.getInstance(q);

                if (certificateID != null) {
                    qPos.add(certificateID.longValue());
                }

                if (bindActivityName) {
                    if (activityName != null) {
                        qPos.add(activityName);
                    }
                }

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

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

                    LFCertificateActivity lfCertificateActivity = list.get(0);

                    result = lfCertificateActivity;

                    cacheResult(lfCertificateActivity);

                    if ((lfCertificateActivity.getCertificateID() != certificateID) ||
                            (lfCertificateActivity.getActivityName() == null) ||
                            !lfCertificateActivity.getActivityName()
                                                      .equals(activityName)) {
                        FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_CERTIFICATEIDANDACTIVITYNAME,
                            finderArgs, lfCertificateActivity);
                    }
                }
View Full Code Here

     */
    @Override
    public LFCertificateActivity removeByCertificateIDAndActivityName(
        Long certificateID, String activityName)
        throws NoSuchLFCertificateActivityException, SystemException {
        LFCertificateActivity lfCertificateActivity = findByCertificateIDAndActivityName(certificateID,
                activityName);

        return remove(lfCertificateActivity);
    }
View Full Code Here

TOP

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

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.