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

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


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

        LFCertificateUser lfCertificateUser = (LFCertificateUser) obj;

        LFCertificateUserPK primaryKey = lfCertificateUser.getPrimaryKey();

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


     */
    @Override
    public LFCertificateUser findByCertificateID_First(Long certificateID,
        OrderByComparator orderByComparator)
        throws NoSuchLFCertificateUserException, SystemException {
        LFCertificateUser lfCertificateUser = fetchByCertificateID_First(certificateID,
                orderByComparator);

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

     */
    @Override
    public LFCertificateUser findByCertificateID_Last(Long certificateID,
        OrderByComparator orderByComparator)
        throws NoSuchLFCertificateUserException, SystemException {
        LFCertificateUser lfCertificateUser = fetchByCertificateID_Last(certificateID,
                orderByComparator);

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

    @Override
    public LFCertificateUser[] findByCertificateID_PrevAndNext(
        LFCertificateUserPK lfCertificateUserPK, Long certificateID,
        OrderByComparator orderByComparator)
        throws NoSuchLFCertificateUserException, SystemException {
        LFCertificateUser lfCertificateUser = findByPrimaryKey(lfCertificateUserPK);

        Session session = null;

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

     */
    @Override
    public LFCertificateUser findByUserID_First(Long userID,
        OrderByComparator orderByComparator)
        throws NoSuchLFCertificateUserException, SystemException {
        LFCertificateUser lfCertificateUser = fetchByUserID_First(userID,
                orderByComparator);

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

     */
    @Override
    public LFCertificateUser findByUserID_Last(Long userID,
        OrderByComparator orderByComparator)
        throws NoSuchLFCertificateUserException, SystemException {
        LFCertificateUser lfCertificateUser = fetchByUserID_Last(userID,
                orderByComparator);

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

    @Override
    public LFCertificateUser[] findByUserID_PrevAndNext(
        LFCertificateUserPK lfCertificateUserPK, Long userID,
        OrderByComparator orderByComparator)
        throws NoSuchLFCertificateUserException, SystemException {
        LFCertificateUser lfCertificateUser = findByPrimaryKey(lfCertificateUserPK);

        Session session = null;

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

     */
    @Override
    public LFCertificateUser findByUserIDAndCertificateID(Long userID,
        Long certificateID)
        throws NoSuchLFCertificateUserException, SystemException {
        LFCertificateUser lfCertificateUser = fetchByUserIDAndCertificateID(userID,
                certificateID);

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

View Full Code Here

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

        if (result instanceof LFCertificateUser) {
            LFCertificateUser lfCertificateUser = (LFCertificateUser) result;

            if (!Validator.equals(userID, lfCertificateUser.getUserID()) ||
                    !Validator.equals(certificateID,
                        lfCertificateUser.getCertificateID())) {
                result = null;
            }
        }

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

            query.append(_SQL_SELECT_LFCERTIFICATEUSER_WHERE);

            if (userID == null) {
                query.append(_FINDER_COLUMN_USERIDANDCERTIFICATEID_USERID_NULL_2);
            } else {
                query.append(_FINDER_COLUMN_USERIDANDCERTIFICATEID_USERID_2);
            }

            if (certificateID == null) {
                query.append(_FINDER_COLUMN_USERIDANDCERTIFICATEID_CERTIFICATEID_NULL_2);
            } else {
                query.append(_FINDER_COLUMN_USERIDANDCERTIFICATEID_CERTIFICATEID_2);
            }

            String sql = query.toString();

            Session session = null;

            try {
                session = openSession();

                Query q = session.createQuery(sql);

                QueryPos qPos = QueryPos.getInstance(q);

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

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

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

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

                    LFCertificateUser lfCertificateUser = list.get(0);

                    result = lfCertificateUser;

                    cacheResult(lfCertificateUser);

                    if ((lfCertificateUser.getUserID() != userID) ||
                            (lfCertificateUser.getCertificateID() != certificateID)) {
                        FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_USERIDANDCERTIFICATEID,
                            finderArgs, lfCertificateUser);
                    }
                }
            } catch (Exception e) {
View Full Code Here

     */
    @Override
    public LFCertificateUser removeByUserIDAndCertificateID(Long userID,
        Long certificateID)
        throws NoSuchLFCertificateUserException, SystemException {
        LFCertificateUser lfCertificateUser = findByUserIDAndCertificateID(userID,
                certificateID);

        return remove(lfCertificateUser);
    }
View Full Code Here

TOP

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

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.