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

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


                if (pagination) {
                    sql = sql.concat(NotFoundModelImpl.ORDER_BY_JPQL);
                }
            }

            Session session = null;

            try {
                session = openSession();

                Query q = session.createQuery(sql);

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


    public int countAll() throws SystemException {
        Long count = (Long) FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL,
                FINDER_ARGS_EMPTY, this);

        if (count == null) {
            Session session = null;

            try {
                session = openSession();

                Query q = session.createQuery(_SQL_COUNT_NOTFOUND);

                count = (Long) q.uniqueResult();

                FinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL,
                    FINDER_ARGS_EMPTY, count);
View Full Code Here

   * @throws SystemException if a system exception occurred
   */
  @Override
  public Warrant remove(Serializable primaryKey)
    throws NoSuchWarrantException, SystemException {
    Session session = null;

    try {
      session = openSession();

      Warrant warrant = (Warrant)session.get(WarrantImpl.class, primaryKey);

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

  @Override
  protected Warrant removeImpl(Warrant warrant) throws SystemException {
    warrant = toUnwrappedModel(warrant);

    Session session = null;

    try {
      session = openSession();

      BatchSessionUtil.delete(session, warrant);
View Full Code Here

    boolean isNew = warrant.isNew();

    WarrantModelImpl warrantModelImpl = (WarrantModelImpl)warrant;

    Session session = null;

    try {
      session = openSession();

      BatchSessionUtil.update(session, warrant, merge);
View Full Code Here

    if (warrant == _nullWarrant) {
      return null;
    }

    if (warrant == null) {
      Session session = null;

      boolean hasException = false;

      try {
        session = openSession();

        warrant = (Warrant)session.get(WarrantImpl.class,
            Long.valueOf(id));
      }
      catch (Exception e) {
        hasException = true;
View Full Code Here

      query.append(WarrantModelImpl.ORDER_BY_JPQL);

      String sql = query.toString();

      Session session = null;

      try {
        session = openSession();

        Query q = session.createQuery(sql);

        QueryPos qPos = QueryPos.getInstance(q);

        if (status != null) {
          qPos.add(status);
View Full Code Here

      query.append(WarrantModelImpl.ORDER_BY_JPQL);

      String sql = query.toString();

      Session session = null;

      try {
        session = openSession();

        Query q = session.createQuery(sql);

        QueryPos qPos = QueryPos.getInstance(q);

        if (createDate != null) {
          qPos.add(CalendarUtil.getTimestamp(createDate));
View Full Code Here

      query.append(WarrantModelImpl.ORDER_BY_JPQL);

      String sql = query.toString();

      Session session = null;

      try {
        session = openSession();

        Query q = session.createQuery(sql);

        QueryPos qPos = QueryPos.getInstance(q);

        qPos.add(userId);
View Full Code Here

      }
      else {
        sql = _SQL_SELECT_WARRANT.concat(WarrantModelImpl.ORDER_BY_JPQL);
      }

      Session session = null;

      try {
        session = openSession();

        Query q = session.createQuery(sql);

        if (orderByComparator == null) {
          list = (List<Warrant>)QueryUtil.list(q, getDialect(),
              start, end, false);
View Full Code Here

TOP

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

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.