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

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


        throws SystemException {
        lfAttemptData = toUnwrappedModel(lfAttemptData);

        boolean isNew = lfAttemptData.isNew();

        LFAttemptDataModelImpl lfAttemptDataModelImpl = (LFAttemptDataModelImpl) lfAttemptData;

        Session session = null;

        try {
            session = openSession();

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

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

        FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);

        if (isNew || !LFAttemptDataModelImpl.COLUMN_BITMASK_ENABLED) {
            FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
        }
        else {
            if ((lfAttemptDataModelImpl.getColumnBitmask() &
                    FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ATTEMPTIDWITHACTIVITYID.getColumnBitmask()) != 0) {
                Object[] args = new Object[] {
                        lfAttemptDataModelImpl.getOriginalAttemptID(),
                        lfAttemptDataModelImpl.getOriginalActivityID()
                    };

                FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_ATTEMPTIDWITHACTIVITYID,
                    args);
                FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ATTEMPTIDWITHACTIVITYID,
                    args);

                args = new Object[] {
                        lfAttemptDataModelImpl.getAttemptID(),
                        lfAttemptDataModelImpl.getActivityID()
                    };

                FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_ATTEMPTIDWITHACTIVITYID,
                    args);
                FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ATTEMPTIDWITHACTIVITYID,
                    args);
            }

            if ((lfAttemptDataModelImpl.getColumnBitmask() &
                    FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ATTEMPTIDWITHDATAKEY.getColumnBitmask()) != 0) {
                Object[] args = new Object[] {
                        lfAttemptDataModelImpl.getOriginalAttemptID(),
                        lfAttemptDataModelImpl.getOriginalDataKey()
                    };

                FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_ATTEMPTIDWITHDATAKEY,
                    args);
                FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ATTEMPTIDWITHDATAKEY,
                    args);

                args = new Object[] {
                        lfAttemptDataModelImpl.getAttemptID(),
                        lfAttemptDataModelImpl.getDataKey()
                    };

                FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_ATTEMPTIDWITHDATAKEY,
                    args);
                FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_ATTEMPTIDWITHDATAKEY,
                    args);
            }

            if ((lfAttemptDataModelImpl.getColumnBitmask() &
                    FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_SINGLEKEY.getColumnBitmask()) != 0) {
                Object[] args = new Object[] {
                        lfAttemptDataModelImpl.getOriginalAttemptID(),
                        lfAttemptDataModelImpl.getOriginalActivityID(),
                        lfAttemptDataModelImpl.getOriginalDataKey()
                    };

                FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_SINGLEKEY,
                    args);
                FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_SINGLEKEY,
                    args);

                args = new Object[] {
                        lfAttemptDataModelImpl.getAttemptID(),
                        lfAttemptDataModelImpl.getActivityID(),
                        lfAttemptDataModelImpl.getDataKey()
                    };

                FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_SINGLEKEY,
                    args);
                FinderCacheUtil.removeResult(FINDER_PATH_WITHOUT_PAGINATION_FIND_BY_SINGLEKEY,
View Full Code Here

TOP

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

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.