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

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


    throws SystemException {
    MeetupsEntry meetupsEntry = (MeetupsEntry)EntityCacheUtil.getResult(MeetupsEntryModelImpl.ENTITY_CACHE_ENABLED,
        MeetupsEntryImpl.class, meetupsEntryId, this);

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

      try {
        session = openSession();

        meetupsEntry = (MeetupsEntry)session.get(MeetupsEntryImpl.class,
            new Long(meetupsEntryId));
      }
      catch (Exception e) {
        throw processException(e);
      }
View Full Code Here


    List<MeetupsEntry> list = (List<MeetupsEntry>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_COMPANYID,
        finderArgs, this);

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

      try {
        session = openSession();

        StringBundler query = null;

        if (orderByComparator != null) {
          query = new StringBundler(3 +
              (orderByComparator.getOrderByFields().length * 3));
        }
        else {
          query = new StringBundler(3);
        }

        query.append(_SQL_SELECT_MEETUPSENTRY_WHERE);

        query.append(_FINDER_COLUMN_COMPANYID_COMPANYID_2);

        if (orderByComparator != null) {
          appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
            orderByComparator);
        }

        else {
          query.append(MeetupsEntryModelImpl.ORDER_BY_JPQL);
        }

        String sql = query.toString();

        Query q = session.createQuery(sql);

        QueryPos qPos = QueryPos.getInstance(q);

        qPos.add(companyId);

View Full Code Here

  public MeetupsEntry[] findByCompanyId_PrevAndNext(long meetupsEntryId,
    long companyId, OrderByComparator orderByComparator)
    throws NoSuchMeetupsEntryException, SystemException {
    MeetupsEntry meetupsEntry = findByPrimaryKey(meetupsEntryId);

    Session session = null;

    try {
      session = openSession();

      MeetupsEntry[] array = new MeetupsEntryImpl[3];
View Full Code Here

    List<MeetupsEntry> list = (List<MeetupsEntry>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_USERID,
        finderArgs, this);

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

      try {
        session = openSession();

        StringBundler query = null;

        if (orderByComparator != null) {
          query = new StringBundler(3 +
              (orderByComparator.getOrderByFields().length * 3));
        }
        else {
          query = new StringBundler(3);
        }

        query.append(_SQL_SELECT_MEETUPSENTRY_WHERE);

        query.append(_FINDER_COLUMN_USERID_USERID_2);

        if (orderByComparator != null) {
          appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
            orderByComparator);
        }

        else {
          query.append(MeetupsEntryModelImpl.ORDER_BY_JPQL);
        }

        String sql = query.toString();

        Query q = session.createQuery(sql);

        QueryPos qPos = QueryPos.getInstance(q);

        qPos.add(userId);

View Full Code Here

  public MeetupsEntry[] findByUserId_PrevAndNext(long meetupsEntryId,
    long userId, OrderByComparator orderByComparator)
    throws NoSuchMeetupsEntryException, SystemException {
    MeetupsEntry meetupsEntry = findByPrimaryKey(meetupsEntryId);

    Session session = null;

    try {
      session = openSession();

      MeetupsEntry[] array = new MeetupsEntryImpl[3];
View Full Code Here

    List<MeetupsEntry> list = (List<MeetupsEntry>)FinderCacheUtil.getResult(FINDER_PATH_FIND_ALL,
        finderArgs, this);

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

      try {
        session = openSession();

        StringBundler query = null;
        String sql = null;

        if (orderByComparator != null) {
          query = new StringBundler(2 +
              (orderByComparator.getOrderByFields().length * 3));

          query.append(_SQL_SELECT_MEETUPSENTRY);

          appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
            orderByComparator);

          sql = query.toString();
        }
        else {
          sql = _SQL_SELECT_MEETUPSENTRY.concat(MeetupsEntryModelImpl.ORDER_BY_JPQL);
        }

        Query q = session.createQuery(sql);

        if (orderByComparator == null) {
          list = (List<MeetupsEntry>)QueryUtil.list(q, getDialect(),
              start, end, false);

View Full Code Here

    Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_COMPANYID,
        finderArgs, this);

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

      try {
        session = openSession();

        StringBundler query = new StringBundler(2);

        query.append(_SQL_COUNT_MEETUPSENTRY_WHERE);

        query.append(_FINDER_COLUMN_COMPANYID_COMPANYID_2);

        String sql = query.toString();

        Query q = session.createQuery(sql);

        QueryPos qPos = QueryPos.getInstance(q);

        qPos.add(companyId);
View Full Code Here

    Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_BY_USERID,
        finderArgs, this);

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

      try {
        session = openSession();

        StringBundler query = new StringBundler(2);

        query.append(_SQL_COUNT_MEETUPSENTRY_WHERE);

        query.append(_FINDER_COLUMN_USERID_USERID_2);

        String sql = query.toString();

        Query q = session.createQuery(sql);

        QueryPos qPos = QueryPos.getInstance(q);

        qPos.add(userId);
View Full Code Here

    Long count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL,
        finderArgs, this);

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

      try {
        session = openSession();

        Query q = session.createQuery(_SQL_COUNT_MEETUPSENTRY);

        count = (Long)q.uniqueResult();
      }
      catch (Exception e) {
        throw processException(e);
View Full Code Here

   * @throws com.liferay.socialnetworking.NoSuchMeetupsRegistrationException if a meetups registration with the primary key could not be found
   * @throws SystemException if a system exception occurred
   */
  public MeetupsRegistration remove(long meetupsRegistrationId)
    throws NoSuchMeetupsRegistrationException, SystemException {
    Session session = null;

    try {
      session = openSession();

      MeetupsRegistration meetupsRegistration = (MeetupsRegistration)session.get(MeetupsRegistrationImpl.class,
          new Long(meetupsRegistrationId));

      if (meetupsRegistration == null) {
        if (_log.isWarnEnabled()) {
          _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY +
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.