Package com.liferay.portal.kernel.dao.orm

Examples of com.liferay.portal.kernel.dao.orm.Query


            Session session = null;

            try {
                session = openSession();

                Query q = session.createQuery(sql);

                QueryPos qPos = QueryPos.getInstance(q);

                if (bindTincanID) {
                    if (tincanID != null) {
                        qPos.add(tincanID);
                    }
                }

                count = (Long) q.uniqueResult();

                FinderCacheUtil.putResult(finderPath, finderArgs, count);
            } catch (Exception e) {
                FinderCacheUtil.removeResult(finderPath, finderArgs);
View Full Code Here


            Session session = null;

            try {
                session = openSession();

                Query q = session.createQuery(sql);

                QueryPos qPos = QueryPos.getInstance(q);

                if (bindMemberOf) {
                    if (memberOf != null) {
View Full Code Here

            query.append(LFTincanActorModelImpl.ORDER_BY_JPQL);
        }

        String sql = query.toString();

        Query q = session.createQuery(sql);

        q.setFirstResult(0);
        q.setMaxResults(2);

        QueryPos qPos = QueryPos.getInstance(q);

        if (bindMemberOf) {
            if (memberOf != null) {
                qPos.add(memberOf);
            }
        }

        if (orderByComparator != null) {
            Object[] values = orderByComparator.getOrderByConditionValues(lfTincanActor);

            for (Object value : values) {
                qPos.add(value);
            }
        }

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

        if (list.size() == 2) {
            return list.get(1);
        } else {
            return null;
View Full Code Here

            Session session = null;

            try {
                session = openSession();

                Query q = session.createQuery(sql);

                QueryPos qPos = QueryPos.getInstance(q);

                if (bindMemberOf) {
                    if (memberOf != null) {
                        qPos.add(memberOf);
                    }
                }

                count = (Long) q.uniqueResult();

                FinderCacheUtil.putResult(finderPath, finderArgs, count);
            } catch (Exception e) {
                FinderCacheUtil.removeResult(finderPath, finderArgs);
View Full Code Here

            Session session = null;

            try {
                session = openSession();

                Query q = session.createQuery(sql);

                QueryPos qPos = QueryPos.getInstance(q);

                if (bindObjectType) {
                    if (objectType != null) {
View Full Code Here

            query.append(LFTincanActorModelImpl.ORDER_BY_JPQL);
        }

        String sql = query.toString();

        Query q = session.createQuery(sql);

        q.setFirstResult(0);
        q.setMaxResults(2);

        QueryPos qPos = QueryPos.getInstance(q);

        if (bindObjectType) {
            if (objectType != null) {
                qPos.add(objectType);
            }
        }

        if (bindMbox) {
            if (mbox != null) {
                qPos.add(mbox);
            }
        }

        if (bindMbox_sha1sum) {
            if (mbox_sha1sum != null) {
                qPos.add(mbox_sha1sum);
            }
        }

        if (bindOpenid) {
            if (openid != null) {
                qPos.add(openid);
            }
        }

        if (bindAccount) {
            if (account != null) {
                qPos.add(account);
            }
        }

        if (orderByComparator != null) {
            Object[] values = orderByComparator.getOrderByConditionValues(lfTincanActor);

            for (Object value : values) {
                qPos.add(value);
            }
        }

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

        if (list.size() == 2) {
            return list.get(1);
        } else {
            return null;
View Full Code Here

            Session session = null;

            try {
                session = openSession();

                Query q = session.createQuery(sql);

                QueryPos qPos = QueryPos.getInstance(q);

                if (bindObjectType) {
                    if (objectType != null) {
                        qPos.add(objectType);
                    }
                }

                if (bindMbox) {
                    if (mbox != null) {
                        qPos.add(mbox);
                    }
                }

                if (bindMbox_sha1sum) {
                    if (mbox_sha1sum != null) {
                        qPos.add(mbox_sha1sum);
                    }
                }

                if (bindOpenid) {
                    if (openid != null) {
                        qPos.add(openid);
                    }
                }

                if (bindAccount) {
                    if (account != null) {
                        qPos.add(account);
                    }
                }

                count = (Long) q.uniqueResult();

                FinderCacheUtil.putResult(finderPath, finderArgs, count);
            } catch (Exception e) {
                FinderCacheUtil.removeResult(finderPath, finderArgs);
View Full Code Here

            Session session = null;

            try {
                session = openSession();

                Query q = session.createQuery(sql);

                if (!pagination) {
                    list = (List<LFTincanActor>) QueryUtil.list(q,
                            getDialect(), start, end, false);
View Full Code Here

            Session session = null;

            try {
                session = openSession();

                Query q = session.createQuery(_SQL_COUNT_LFTINCANACTOR);

                count = (Long) q.uniqueResult();

                FinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL,
                    FINDER_ARGS_EMPTY, count);
            } catch (Exception e) {
                FinderCacheUtil.removeResult(FINDER_PATH_COUNT_ALL,
View Full Code Here

            Session session = null;

            try {
                session = openSession();

                Query q = session.createQuery(sql);

                QueryPos qPos = QueryPos.getInstance(q);

                if (bindDocumentId) {
                    if (documentId != null) {
                        qPos.add(documentId);
                    }
                }

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

                if (list.isEmpty()) {
                    FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_DOCUMENTID,
                        finderArgs, list);
                } else {
View Full Code Here

TOP

Related Classes of com.liferay.portal.kernel.dao.orm.Query

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.