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

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


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

        LFActivity lfActivity = (LFActivity) obj;

        long primaryKey = lfActivity.getPrimaryKey();

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


     * @throws SystemException if a system exception occurred
     */
    @Override
    public LFActivity findByPackageAndID(Integer packageID, String id)
        throws NoSuchLFActivityException, SystemException {
        LFActivity lfActivity = fetchByPackageAndID(packageID, id);

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

            msg.append(_NO_SUCH_ENTITY_WITH_KEY);
View Full Code Here

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

        if (result instanceof LFActivity) {
            LFActivity lfActivity = (LFActivity) result;

            if (!Validator.equals(packageID, lfActivity.getPackageID()) ||
                    !Validator.equals(id, lfActivity.getId())) {
                result = null;
            }
        }

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

            query.append(_SQL_SELECT_LFACTIVITY_WHERE);

            if (packageID == null) {
                query.append(_FINDER_COLUMN_PACKAGEANDID_PACKAGEID_NULL_2);
            } else {
                query.append(_FINDER_COLUMN_PACKAGEANDID_PACKAGEID_2);
            }

            boolean bindId = false;

            if (id == null) {
                query.append(_FINDER_COLUMN_PACKAGEANDID_ID_1);
            } else if (id.equals(StringPool.BLANK)) {
                query.append(_FINDER_COLUMN_PACKAGEANDID_ID_3);
            } else {
                bindId = true;

                if (id.equals(StringPool.BLANK)) {
                    query.append(_FINDER_COLUMN_PACKAGEANDID_ID_3);
                } else {
                    query.append(_FINDER_COLUMN_PACKAGEANDID_ID_2);
                }
            }

            String sql = query.toString();

            Session session = null;

            try {
                session = openSession();

                Query q = session.createQuery(sql);

                QueryPos qPos = QueryPos.getInstance(q);

                if (packageID != null) {
                    qPos.add(packageID.intValue());
                }

                if (bindId) {
                    if (id != null) {
                        qPos.add(id);
                    }
                }

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

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

                    LFActivity lfActivity = list.get(0);

                    result = lfActivity;

                    cacheResult(lfActivity);

                    if ((lfActivity.getPackageID() != packageID) ||
                            (lfActivity.getId() == null) ||
                            !lfActivity.getId().equals(id)) {
                        FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_PACKAGEANDID,
                            finderArgs, lfActivity);
                    }
                }
            } catch (Exception e) {
View Full Code Here

     * @throws SystemException if a system exception occurred
     */
    @Override
    public LFActivity removeByPackageAndID(Integer packageID, String id)
        throws NoSuchLFActivityException, SystemException {
        LFActivity lfActivity = findByPackageAndID(packageID, id);

        return remove(lfActivity);
    }
View Full Code Here

     */
    @Override
    public LFActivity findByPackageID_First(Integer packageID,
        OrderByComparator orderByComparator)
        throws NoSuchLFActivityException, SystemException {
        LFActivity lfActivity = fetchByPackageID_First(packageID,
                orderByComparator);

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

     */
    @Override
    public LFActivity findByPackageID_Last(Integer packageID,
        OrderByComparator orderByComparator)
        throws NoSuchLFActivityException, SystemException {
        LFActivity lfActivity = fetchByPackageID_Last(packageID,
                orderByComparator);

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

     */
    @Override
    public LFActivity[] findByPackageID_PrevAndNext(long indexNumber,
        Integer packageID, OrderByComparator orderByComparator)
        throws NoSuchLFActivityException, SystemException {
        LFActivity lfActivity = findByPrimaryKey(indexNumber);

        Session session = null;

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

    @Override
    public LFActivity findByPackageIDAndOrganizationID_First(
        Integer packageID, String organizationID,
        OrderByComparator orderByComparator)
        throws NoSuchLFActivityException, SystemException {
        LFActivity lfActivity = fetchByPackageIDAndOrganizationID_First(packageID,
                organizationID, orderByComparator);

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

     */
    @Override
    public LFActivity findByPackageIDAndOrganizationID_Last(Integer packageID,
        String organizationID, OrderByComparator orderByComparator)
        throws NoSuchLFActivityException, SystemException {
        LFActivity lfActivity = fetchByPackageIDAndOrganizationID_Last(packageID,
                organizationID, orderByComparator);

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

    @Override
    public LFActivity[] findByPackageIDAndOrganizationID_PrevAndNext(
        long indexNumber, Integer packageID, String organizationID,
        OrderByComparator orderByComparator)
        throws NoSuchLFActivityException, SystemException {
        LFActivity lfActivity = findByPrimaryKey(indexNumber);

        Session session = null;

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

TOP

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

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.