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

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


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

        LFTincanClientApiStorage lfTincanClientApiStorage = (LFTincanClientApiStorage) obj;

        long primaryKey = lfTincanClientApiStorage.getPrimaryKey();

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


     * @throws SystemException if a system exception occurred
     */
    @Override
    public LFTincanClientApiStorage findByToken(String token)
        throws NoSuchLFTincanClientApiStorageException, SystemException {
        LFTincanClientApiStorage lfTincanClientApiStorage = fetchByToken(token);

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

            msg.append(_NO_SUCH_ENTITY_WITH_KEY);
View Full Code Here

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

        if (result instanceof LFTincanClientApiStorage) {
            LFTincanClientApiStorage lfTincanClientApiStorage = (LFTincanClientApiStorage) result;

            if (!Validator.equals(token, lfTincanClientApiStorage.getToken())) {
                result = null;
            }
        }

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

            query.append(_SQL_SELECT_LFTINCANCLIENTAPISTORAGE_WHERE);

            boolean bindToken = false;

            if (token == null) {
                query.append(_FINDER_COLUMN_TOKEN_TOKEN_1);
            } else if (token.equals(StringPool.BLANK)) {
                query.append(_FINDER_COLUMN_TOKEN_TOKEN_3);
            } else {
                bindToken = true;

                if (token.equals(StringPool.BLANK)) {
                    query.append(_FINDER_COLUMN_TOKEN_TOKEN_3);
                } else {
                    query.append(_FINDER_COLUMN_TOKEN_TOKEN_2);
                }
            }

            String sql = query.toString();

            Session session = null;

            try {
                session = openSession();

                Query q = session.createQuery(sql);

                QueryPos qPos = QueryPos.getInstance(q);

                if (bindToken) {
                    if (token != null) {
                        qPos.add(token);
                    }
                }

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

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

                    LFTincanClientApiStorage lfTincanClientApiStorage = list.get(0);

                    result = lfTincanClientApiStorage;

                    cacheResult(lfTincanClientApiStorage);

                    if ((lfTincanClientApiStorage.getToken() == null) ||
                            !lfTincanClientApiStorage.getToken().equals(token)) {
                        FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_TOKEN,
                            finderArgs, lfTincanClientApiStorage);
                    }
                }
            } catch (Exception e) {
View Full Code Here

     * @throws SystemException if a system exception occurred
     */
    @Override
    public LFTincanClientApiStorage removeByToken(String token)
        throws NoSuchLFTincanClientApiStorageException, SystemException {
        LFTincanClientApiStorage lfTincanClientApiStorage = findByToken(token);

        return remove(lfTincanClientApiStorage);
    }
View Full Code Here

     * @throws SystemException if a system exception occurred
     */
    @Override
    public LFTincanClientApiStorage findByCode(String code)
        throws NoSuchLFTincanClientApiStorageException, SystemException {
        LFTincanClientApiStorage lfTincanClientApiStorage = fetchByCode(code);

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

            msg.append(_NO_SUCH_ENTITY_WITH_KEY);
View Full Code Here

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

        if (result instanceof LFTincanClientApiStorage) {
            LFTincanClientApiStorage lfTincanClientApiStorage = (LFTincanClientApiStorage) result;

            if (!Validator.equals(code, lfTincanClientApiStorage.getCode())) {
                result = null;
            }
        }

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

            query.append(_SQL_SELECT_LFTINCANCLIENTAPISTORAGE_WHERE);

            boolean bindCode = false;

            if (code == null) {
                query.append(_FINDER_COLUMN_CODE_CODE_1);
            } else if (code.equals(StringPool.BLANK)) {
                query.append(_FINDER_COLUMN_CODE_CODE_3);
            } else {
                bindCode = true;

                if (code.equals(StringPool.BLANK)) {
                    query.append(_FINDER_COLUMN_CODE_CODE_3);
                } else {
                    query.append(_FINDER_COLUMN_CODE_CODE_2);
                }
            }

            String sql = query.toString();

            Session session = null;

            try {
                session = openSession();

                Query q = session.createQuery(sql);

                QueryPos qPos = QueryPos.getInstance(q);

                if (bindCode) {
                    if (code != null) {
                        qPos.add(code);
                    }
                }

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

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

                    LFTincanClientApiStorage lfTincanClientApiStorage = list.get(0);

                    result = lfTincanClientApiStorage;

                    cacheResult(lfTincanClientApiStorage);

                    if ((lfTincanClientApiStorage.getCode() == null) ||
                            !lfTincanClientApiStorage.getCode().equals(code)) {
                        FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_CODE,
                            finderArgs, lfTincanClientApiStorage);
                    }
                }
            } catch (Exception e) {
View Full Code Here

     * @throws SystemException if a system exception occurred
     */
    @Override
    public LFTincanClientApiStorage removeByCode(String code)
        throws NoSuchLFTincanClientApiStorageException, SystemException {
        LFTincanClientApiStorage lfTincanClientApiStorage = findByCode(code);

        return remove(lfTincanClientApiStorage);
    }
View Full Code Here

     * @param id the primary key for the new l f tincan client api storage
     * @return the new l f tincan client api storage
     */
    @Override
    public LFTincanClientApiStorage create(long id) {
        LFTincanClientApiStorage lfTincanClientApiStorage = new LFTincanClientApiStorageImpl();

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

        return lfTincanClientApiStorage;
    }
View Full Code Here

        Session session = null;

        try {
            session = openSession();

            LFTincanClientApiStorage lfTincanClientApiStorage = (LFTincanClientApiStorage) session.get(LFTincanClientApiStorageImpl.class,
                    primaryKey);

            if (lfTincanClientApiStorage == 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 LFTincanClientApiStorage findByPrimaryKey(Serializable primaryKey)
        throws NoSuchLFTincanClientApiStorageException, SystemException {
        LFTincanClientApiStorage lfTincanClientApiStorage = fetchByPrimaryKey(primaryKey);

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

TOP

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

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.