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

Examples of com.arcusys.learn.persistence.liferay.model.impl.LFAttemptModelImpl


        throws SystemException {
        lfAttempt = toUnwrappedModel(lfAttempt);

        boolean isNew = lfAttempt.isNew();

        LFAttemptModelImpl lfAttemptModelImpl = (LFAttemptModelImpl) lfAttempt;

        Session session = null;

        try {
            session = openSession();

            if (lfAttempt.isNew()) {
                session.save(lfAttempt);

                lfAttempt.setNew(false);
            } else {
                session.merge(lfAttempt);
            }
        } catch (Exception e) {
            throw processException(e);
        } finally {
            closeSession(session);
        }

        FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);

        if (isNew || !LFAttemptModelImpl.COLUMN_BITMASK_ENABLED) {
            FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
        }
        else {
            if ((lfAttemptModelImpl.getColumnBitmask() &
                    FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_PACKAGEID.getColumnBitmask()) != 0) {
                Object[] args = new Object[] {
                        lfAttemptModelImpl.getOriginalPackageID()
                    };

                FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_PACKAGEID,
                    args);
                FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_PACKAGEID,
                    args);

                args = new Object[] { lfAttemptModelImpl.getPackageID() };

                FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_PACKAGEID,
                    args);
                FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_PACKAGEID,
                    args);
            }

            if ((lfAttemptModelImpl.getColumnBitmask() &
                    FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_USERID.getColumnBitmask()) != 0) {
                Object[] args = new Object[] {
                        lfAttemptModelImpl.getOriginalUserID()
                    };

                FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_USERID, args);
                FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_USERID,
                    args);

                args = new Object[] { lfAttemptModelImpl.getUserID() };

                FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_USERID, args);
                FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_USERID,
                    args);
            }

            if ((lfAttemptModelImpl.getColumnBitmask() &
                    FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_USERIDPACKAGEIDISCOMPLETE.getColumnBitmask()) != 0) {
                Object[] args = new Object[] {
                        lfAttemptModelImpl.getOriginalUserID(),
                        lfAttemptModelImpl.getOriginalPackageID(),
                        lfAttemptModelImpl.getOriginalIsComplete()
                    };

                FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_USERIDPACKAGEIDISCOMPLETE,
                    args);
                FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_USERIDPACKAGEIDISCOMPLETE,
                    args);

                args = new Object[] {
                        lfAttemptModelImpl.getUserID(),
                        lfAttemptModelImpl.getPackageID(),
                        lfAttemptModelImpl.getIsComplete()
                    };

                FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_USERIDPACKAGEIDISCOMPLETE,
                    args);
                FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_USERIDPACKAGEIDISCOMPLETE,
View Full Code Here

TOP

Related Classes of com.arcusys.learn.persistence.liferay.model.impl.LFAttemptModelImpl

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.