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

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


  protected MeetupsRegistration removeImpl(
    MeetupsRegistration meetupsRegistration) throws SystemException {
    meetupsRegistration = toUnwrappedModel(meetupsRegistration);

    Session session = null;

    try {
      session = openSession();

      if (meetupsRegistration.isCachedModel() ||
          BatchSessionUtil.isEnabled()) {
        Object staleObject = session.get(MeetupsRegistrationImpl.class,
            meetupsRegistration.getPrimaryKeyObj());

        if (staleObject != null) {
          session.evict(staleObject);
        }
      }

      session.delete(meetupsRegistration);

      session.flush();
    }
    catch (Exception e) {
      throw processException(e);
    }
    finally {
View Full Code Here


    boolean isNew = meetupsRegistration.isNew();

    MeetupsRegistrationModelImpl meetupsRegistrationModelImpl = (MeetupsRegistrationModelImpl)meetupsRegistration;

    Session session = null;

    try {
      session = openSession();

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

    throws SystemException {
    MeetupsRegistration meetupsRegistration = (MeetupsRegistration)EntityCacheUtil.getResult(MeetupsRegistrationModelImpl.ENTITY_CACHE_ENABLED,
        MeetupsRegistrationImpl.class, meetupsRegistrationId, this);

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

      try {
        session = openSession();

        meetupsRegistration = (MeetupsRegistration)session.get(MeetupsRegistrationImpl.class,
            new Long(meetupsRegistrationId));
      }
      catch (Exception e) {
        throw processException(e);
      }
View Full Code Here

    List<MeetupsRegistration> list = (List<MeetupsRegistration>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_MEETUPSENTRYID,
        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_MEETUPSREGISTRATION_WHERE);

        query.append(_FINDER_COLUMN_MEETUPSENTRYID_MEETUPSENTRYID_2);

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

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

        String sql = query.toString();

        Query q = session.createQuery(sql);

        QueryPos qPos = QueryPos.getInstance(q);

        qPos.add(meetupsEntryId);

View Full Code Here

    long meetupsRegistrationId, long meetupsEntryId,
    OrderByComparator orderByComparator)
    throws NoSuchMeetupsRegistrationException, SystemException {
    MeetupsRegistration meetupsRegistration = findByPrimaryKey(meetupsRegistrationId);

    Session session = null;

    try {
      session = openSession();

      MeetupsRegistration[] array = new MeetupsRegistrationImpl[3];
View Full Code Here

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

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

      try {
        session = openSession();

        StringBundler query = new StringBundler(4);

        query.append(_SQL_SELECT_MEETUPSREGISTRATION_WHERE);

        query.append(_FINDER_COLUMN_U_ME_USERID_2);

        query.append(_FINDER_COLUMN_U_ME_MEETUPSENTRYID_2);

        query.append(MeetupsRegistrationModelImpl.ORDER_BY_JPQL);

        String sql = query.toString();

        Query q = session.createQuery(sql);

        QueryPos qPos = QueryPos.getInstance(q);

        qPos.add(userId);
View Full Code Here

    List<MeetupsRegistration> list = (List<MeetupsRegistration>)FinderCacheUtil.getResult(FINDER_PATH_FIND_BY_ME_S,
        finderArgs, this);

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

      try {
        session = openSession();

        StringBundler query = null;

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

        query.append(_SQL_SELECT_MEETUPSREGISTRATION_WHERE);

        query.append(_FINDER_COLUMN_ME_S_MEETUPSENTRYID_2);

        query.append(_FINDER_COLUMN_ME_S_STATUS_2);

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

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

        String sql = query.toString();

        Query q = session.createQuery(sql);

        QueryPos qPos = QueryPos.getInstance(q);

        qPos.add(meetupsEntryId);

View Full Code Here

    long meetupsRegistrationId, long meetupsEntryId, int status,
    OrderByComparator orderByComparator)
    throws NoSuchMeetupsRegistrationException, SystemException {
    MeetupsRegistration meetupsRegistration = findByPrimaryKey(meetupsRegistrationId);

    Session session = null;

    try {
      session = openSession();

      MeetupsRegistration[] array = new MeetupsRegistrationImpl[3];
View Full Code Here

    List<MeetupsRegistration> list = (List<MeetupsRegistration>)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_MEETUPSREGISTRATION);

          appendOrderByComparator(query, _ORDER_BY_ENTITY_ALIAS,
            orderByComparator);

          sql = query.toString();
        }
        else {
          sql = _SQL_SELECT_MEETUPSREGISTRATION.concat(MeetupsRegistrationModelImpl.ORDER_BY_JPQL);
        }

        Query q = session.createQuery(sql);

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

View Full Code Here

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

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

      try {
        session = openSession();

        StringBundler query = new StringBundler(2);

        query.append(_SQL_COUNT_MEETUPSREGISTRATION_WHERE);

        query.append(_FINDER_COLUMN_MEETUPSENTRYID_MEETUPSENTRYID_2);

        String sql = query.toString();

        Query q = session.createQuery(sql);

        QueryPos qPos = QueryPos.getInstance(q);

        qPos.add(meetupsEntryId);
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.