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

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


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

        LFPackage lfPackage = (LFPackage) obj;

        long primaryKey = lfPackage.getPrimaryKey();

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


    public java.util.List<LFPackage> findByPackageID(Long[] ids) throws SystemException {
        ArrayList<LFPackage> list = new ArrayList<LFPackage>();
        for (Long id: ids) {
            try {
                LFPackage pkg = getLFPackage(id);
                if (pkg != null) list.add(pkg);
            } catch (PortalException e) {
                // do nothing
            }
        }
View Full Code Here

     * @throws SystemException if a system exception occurred
     */
    @Override
    public LFPackage findByRefID(Long assetRefID)
        throws NoSuchLFPackageException, SystemException {
        LFPackage lfPackage = fetchByRefID(assetRefID);

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

            msg.append(_NO_SUCH_ENTITY_WITH_KEY);
View Full Code Here

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

        if (result instanceof LFPackage) {
            LFPackage lfPackage = (LFPackage) result;

            if (!Validator.equals(assetRefID, lfPackage.getAssetRefID())) {
                result = null;
            }
        }

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

            query.append(_SQL_SELECT_LFPACKAGE_WHERE);

            if (assetRefID == null) {
                query.append(_FINDER_COLUMN_REFID_ASSETREFID_NULL_2);
            } else {
                query.append(_FINDER_COLUMN_REFID_ASSETREFID_2);
            }

            String sql = query.toString();

            Session session = null;

            try {
                session = openSession();

                Query q = session.createQuery(sql);

                QueryPos qPos = QueryPos.getInstance(q);

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

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

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

                    LFPackage lfPackage = list.get(0);

                    result = lfPackage;

                    cacheResult(lfPackage);

                    if ((lfPackage.getAssetRefID() != assetRefID)) {
                        FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_REFID,
                            finderArgs, lfPackage);
                    }
                }
            } catch (Exception e) {
View Full Code Here

     * @throws SystemException if a system exception occurred
     */
    @Override
    public LFPackage removeByRefID(Long assetRefID)
        throws NoSuchLFPackageException, SystemException {
        LFPackage lfPackage = findByRefID(assetRefID);

        return remove(lfPackage);
    }
View Full Code Here

     */
    @Override
    public LFPackage findByInstance_First(Integer courseID,
        OrderByComparator orderByComparator)
        throws NoSuchLFPackageException, SystemException {
        LFPackage lfPackage = fetchByInstance_First(courseID, orderByComparator);

        if (lfPackage != null) {
            return lfPackage;
        }

View Full Code Here

     */
    @Override
    public LFPackage findByInstance_Last(Integer courseID,
        OrderByComparator orderByComparator)
        throws NoSuchLFPackageException, SystemException {
        LFPackage lfPackage = fetchByInstance_Last(courseID, orderByComparator);

        if (lfPackage != null) {
            return lfPackage;
        }

View Full Code Here

     */
    @Override
    public LFPackage[] findByInstance_PrevAndNext(long id, Integer courseID,
        OrderByComparator orderByComparator)
        throws NoSuchLFPackageException, SystemException {
        LFPackage lfPackage = findByPrimaryKey(id);

        Session session = null;

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

     */
    @Override
    public LFPackage findByCourseID_First(Integer courseID,
        OrderByComparator orderByComparator)
        throws NoSuchLFPackageException, SystemException {
        LFPackage lfPackage = fetchByCourseID_First(courseID, orderByComparator);

        if (lfPackage != null) {
            return lfPackage;
        }

View Full Code Here

     */
    @Override
    public LFPackage findByCourseID_Last(Integer courseID,
        OrderByComparator orderByComparator)
        throws NoSuchLFPackageException, SystemException {
        LFPackage lfPackage = fetchByCourseID_Last(courseID, orderByComparator);

        if (lfPackage != null) {
            return lfPackage;
        }

View Full Code Here

TOP

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

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.