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

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


     */
    @Override
    public LFCertificateCourse findByCertificateID_First(Long certificateID,
        OrderByComparator orderByComparator)
        throws NoSuchLFCertificateCourseException, SystemException {
        LFCertificateCourse lfCertificateCourse = fetchByCertificateID_First(certificateID,
                orderByComparator);

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


     */
    @Override
    public LFCertificateCourse findByCertificateID_Last(Long certificateID,
        OrderByComparator orderByComparator)
        throws NoSuchLFCertificateCourseException, SystemException {
        LFCertificateCourse lfCertificateCourse = fetchByCertificateID_Last(certificateID,
                orderByComparator);

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

    @Override
    public LFCertificateCourse[] findByCertificateID_PrevAndNext(
        LFCertificateCoursePK lfCertificateCoursePK, Long certificateID,
        OrderByComparator orderByComparator)
        throws NoSuchLFCertificateCourseException, SystemException {
        LFCertificateCourse lfCertificateCourse = findByPrimaryKey(lfCertificateCoursePK);

        Session session = null;

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

     */
    @Override
    public LFCertificateCourse findByCourseID_First(Long courseID,
        OrderByComparator orderByComparator)
        throws NoSuchLFCertificateCourseException, SystemException {
        LFCertificateCourse lfCertificateCourse = fetchByCourseID_First(courseID,
                orderByComparator);

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

     */
    @Override
    public LFCertificateCourse findByCourseID_Last(Long courseID,
        OrderByComparator orderByComparator)
        throws NoSuchLFCertificateCourseException, SystemException {
        LFCertificateCourse lfCertificateCourse = fetchByCourseID_Last(courseID,
                orderByComparator);

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

    @Override
    public LFCertificateCourse[] findByCourseID_PrevAndNext(
        LFCertificateCoursePK lfCertificateCoursePK, Long courseID,
        OrderByComparator orderByComparator)
        throws NoSuchLFCertificateCourseException, SystemException {
        LFCertificateCourse lfCertificateCourse = findByPrimaryKey(lfCertificateCoursePK);

        Session session = null;

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

     */
    @Override
    public LFCertificateCourse findByCertificateIDAndCourseID(
        Long certificateID, Long courseID)
        throws NoSuchLFCertificateCourseException, SystemException {
        LFCertificateCourse lfCertificateCourse = fetchByCertificateIDAndCourseID(certificateID,
                courseID);

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

View Full Code Here

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

        if (result instanceof LFCertificateCourse) {
            LFCertificateCourse lfCertificateCourse = (LFCertificateCourse) result;

            if (!Validator.equals(certificateID,
                        lfCertificateCourse.getCertificateID()) ||
                    !Validator.equals(courseID,
                        lfCertificateCourse.getCourseID())) {
                result = null;
            }
        }

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

            query.append(_SQL_SELECT_LFCERTIFICATECOURSE_WHERE);

            if (certificateID == null) {
                query.append(_FINDER_COLUMN_CERTIFICATEIDANDCOURSEID_CERTIFICATEID_NULL_2);
            } else {
                query.append(_FINDER_COLUMN_CERTIFICATEIDANDCOURSEID_CERTIFICATEID_2);
            }

            if (courseID == null) {
                query.append(_FINDER_COLUMN_CERTIFICATEIDANDCOURSEID_COURSEID_NULL_2);
            } else {
                query.append(_FINDER_COLUMN_CERTIFICATEIDANDCOURSEID_COURSEID_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 (courseID != null) {
                    qPos.add(courseID.longValue());
                }

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

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

                    LFCertificateCourse lfCertificateCourse = list.get(0);

                    result = lfCertificateCourse;

                    cacheResult(lfCertificateCourse);

                    if ((lfCertificateCourse.getCertificateID() != certificateID) ||
                            (lfCertificateCourse.getCourseID() != courseID)) {
                        FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_CERTIFICATEIDANDCOURSEID,
                            finderArgs, lfCertificateCourse);
                    }
                }
            } catch (Exception e) {
View Full Code Here

     */
    @Override
    public LFCertificateCourse removeByCertificateIDAndCourseID(
        Long certificateID, Long courseID)
        throws NoSuchLFCertificateCourseException, SystemException {
        LFCertificateCourse lfCertificateCourse = findByCertificateIDAndCourseID(certificateID,
                courseID);

        return remove(lfCertificateCourse);
    }
View Full Code Here

     * @return the new l f certificate course
     */
    @Override
    public LFCertificateCourse create(
        LFCertificateCoursePK lfCertificateCoursePK) {
        LFCertificateCourse lfCertificateCourse = new LFCertificateCourseImpl();

        lfCertificateCourse.setNew(true);
        lfCertificateCourse.setPrimaryKey(lfCertificateCoursePK);

        return lfCertificateCourse;
    }
View Full Code Here

TOP

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

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.