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

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


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

        LFUser lfUser = (LFUser) obj;

        long primaryKey = lfUser.getPrimaryKey();

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


     * @throws SystemException if a system exception occurred
     */
    @Override
    public LFUser findByUserId(Integer id)
        throws NoSuchLFUserException, SystemException {
        LFUser lfUser = fetchByUserId(id);

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

            msg.append(_NO_SUCH_ENTITY_WITH_KEY);
View Full Code Here

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

        if (result instanceof LFUser) {
            LFUser lfUser = (LFUser) result;

            if (!Validator.equals(id, lfUser.getId())) {
                result = null;
            }
        }

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

            query.append(_SQL_SELECT_LFUSER_WHERE);

            if (id == null) {
                query.append(_FINDER_COLUMN_USERID_ID_NULL_2);
            } else {
                query.append(_FINDER_COLUMN_USERID_ID_2);
            }

            String sql = query.toString();

            Session session = null;

            try {
                session = openSession();

                Query q = session.createQuery(sql);

                QueryPos qPos = QueryPos.getInstance(q);

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

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

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

                    LFUser lfUser = list.get(0);

                    result = lfUser;

                    cacheResult(lfUser);

                    if ((lfUser.getId() != id)) {
                        FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_USERID,
                            finderArgs, lfUser);
                    }
                }
            } catch (Exception e) {
View Full Code Here

     * @throws SystemException if a system exception occurred
     */
    @Override
    public LFUser removeByUserId(Integer id)
        throws NoSuchLFUserException, SystemException {
        LFUser lfUser = findByUserId(id);

        return remove(lfUser);
    }
View Full Code Here

     */
    @Override
    public LFUser findByUserIdCollection_First(Integer id,
        OrderByComparator orderByComparator)
        throws NoSuchLFUserException, SystemException {
        LFUser lfUser = fetchByUserIdCollection_First(id, orderByComparator);

        if (lfUser != null) {
            return lfUser;
        }

View Full Code Here

     */
    @Override
    public LFUser findByUserIdCollection_Last(Integer id,
        OrderByComparator orderByComparator)
        throws NoSuchLFUserException, SystemException {
        LFUser lfUser = fetchByUserIdCollection_Last(id, orderByComparator);

        if (lfUser != null) {
            return lfUser;
        }

View Full Code Here

     */
    @Override
    public LFUser[] findByUserIdCollection_PrevAndNext(long lfid, Integer id,
        OrderByComparator orderByComparator)
        throws NoSuchLFUserException, SystemException {
        LFUser lfUser = findByPrimaryKey(lfid);

        Session session = null;

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

     * @param lfid the primary key for the new l f user
     * @return the new l f user
     */
    @Override
    public LFUser create(long lfid) {
        LFUser lfUser = new LFUserImpl();

        lfUser.setNew(true);
        lfUser.setPrimaryKey(lfid);

        return lfUser;
    }
View Full Code Here

        Session session = null;

        try {
            session = openSession();

            LFUser lfUser = (LFUser) session.get(LFUserImpl.class, primaryKey);

            if (lfUser == 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 LFUser findByPrimaryKey(Serializable primaryKey)
        throws NoSuchLFUserException, SystemException {
        LFUser lfUser = fetchByPrimaryKey(primaryKey);

        if (lfUser == 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.LFUser

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.