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

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


     * @throws SystemException if a system exception occurred
     */
    @Override
    public LFChildrenSelection findBySequencingID(Integer sequencingID)
        throws NoSuchLFChildrenSelectionException, SystemException {
        LFChildrenSelection lfChildrenSelection = fetchBySequencingID(sequencingID);

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

            msg.append(_NO_SUCH_ENTITY_WITH_KEY);
View Full Code Here


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

        if (result instanceof LFChildrenSelection) {
            LFChildrenSelection lfChildrenSelection = (LFChildrenSelection) result;

            if (!Validator.equals(sequencingID,
                        lfChildrenSelection.getSequencingID())) {
                result = null;
            }
        }

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

            query.append(_SQL_SELECT_LFCHILDRENSELECTION_WHERE);

            if (sequencingID == null) {
                query.append(_FINDER_COLUMN_SEQUENCINGID_SEQUENCINGID_NULL_2);
            } else {
                query.append(_FINDER_COLUMN_SEQUENCINGID_SEQUENCINGID_2);
            }

            String sql = query.toString();

            Session session = null;

            try {
                session = openSession();

                Query q = session.createQuery(sql);

                QueryPos qPos = QueryPos.getInstance(q);

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

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

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

                    LFChildrenSelection lfChildrenSelection = list.get(0);

                    result = lfChildrenSelection;

                    cacheResult(lfChildrenSelection);

                    if ((lfChildrenSelection.getSequencingID() != sequencingID)) {
                        FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_SEQUENCINGID,
                            finderArgs, lfChildrenSelection);
                    }
                }
            } catch (Exception e) {
View Full Code Here

     * @throws SystemException if a system exception occurred
     */
    @Override
    public LFChildrenSelection removeBySequencingID(Integer sequencingID)
        throws NoSuchLFChildrenSelectionException, SystemException {
        LFChildrenSelection lfChildrenSelection = findBySequencingID(sequencingID);

        return remove(lfChildrenSelection);
    }
View Full Code Here

     * @param id the primary key for the new l f children selection
     * @return the new l f children selection
     */
    @Override
    public LFChildrenSelection create(long id) {
        LFChildrenSelection lfChildrenSelection = new LFChildrenSelectionImpl();

        lfChildrenSelection.setNew(true);
        lfChildrenSelection.setPrimaryKey(id);

        return lfChildrenSelection;
    }
View Full Code Here

        Session session = null;

        try {
            session = openSession();

            LFChildrenSelection lfChildrenSelection = (LFChildrenSelection) session.get(LFChildrenSelectionImpl.class,
                    primaryKey);

            if (lfChildrenSelection == null) {
                if (_log.isWarnEnabled()) {
                    _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey);
View Full Code Here

     * @throws SystemException if a system exception occurred
     */
    @Override
    public LFChildrenSelection findByPrimaryKey(Serializable primaryKey)
        throws NoSuchLFChildrenSelectionException, SystemException {
        LFChildrenSelection lfChildrenSelection = fetchByPrimaryKey(primaryKey);

        if (lfChildrenSelection == null) {
            if (_log.isWarnEnabled()) {
                _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + primaryKey);
            }
View Full Code Here

     * @throws SystemException if a system exception occurred
     */
    @Override
    public LFChildrenSelection fetchByPrimaryKey(Serializable primaryKey)
        throws SystemException {
        LFChildrenSelection lfChildrenSelection = (LFChildrenSelection) EntityCacheUtil.getResult(LFChildrenSelectionModelImpl.ENTITY_CACHE_ENABLED,
                LFChildrenSelectionImpl.class, primaryKey);

        if (lfChildrenSelection == _nullLFChildrenSelection) {
            return null;
        }
View Full Code Here

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

        LFChildrenSelection lfChildrenSelection = (LFChildrenSelection) obj;

        long primaryKey = lfChildrenSelection.getPrimaryKey();

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

TOP

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

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.