Package com.warrantchange.model.impl

Examples of com.warrantchange.model.impl.WarrantUserUniqueIdModelImpl


    boolean merge) throws SystemException {
    warrantUserUniqueId = toUnwrappedModel(warrantUserUniqueId);

    boolean isNew = warrantUserUniqueId.isNew();

    WarrantUserUniqueIdModelImpl warrantUserUniqueIdModelImpl = (WarrantUserUniqueIdModelImpl)warrantUserUniqueId;

    Session session = null;

    try {
      session = openSession();

      BatchSessionUtil.update(session, warrantUserUniqueId, merge);

      warrantUserUniqueId.setNew(false);
    }
    catch (Exception e) {
      throw processException(e);
    }
    finally {
      closeSession(session);
    }

    FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);

    if (isNew || !WarrantUserUniqueIdModelImpl.COLUMN_BITMASK_ENABLED) {
      FinderCacheUtil.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
    }

    EntityCacheUtil.putResult(WarrantUserUniqueIdModelImpl.ENTITY_CACHE_ENABLED,
      WarrantUserUniqueIdImpl.class, warrantUserUniqueId.getPrimaryKey(),
      warrantUserUniqueId);

    if (isNew) {
      FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UNIQUEID,
        new Object[] { warrantUserUniqueId.getUniqueId() },
        warrantUserUniqueId);

      FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_USERID,
        new Object[] { Long.valueOf(warrantUserUniqueId.getUserId()) },
        warrantUserUniqueId);
    }
    else {
      if ((warrantUserUniqueIdModelImpl.getColumnBitmask() &
          FINDER_PATH_FETCH_BY_UNIQUEID.getColumnBitmask()) != 0) {
        Object[] args = new Object[] {
            warrantUserUniqueIdModelImpl.getOriginalUniqueId()
          };

        FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_UNIQUEID, args);
        FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_UNIQUEID, args);

        FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_UNIQUEID,
          new Object[] { warrantUserUniqueId.getUniqueId() },
          warrantUserUniqueId);
      }

      if ((warrantUserUniqueIdModelImpl.getColumnBitmask() &
          FINDER_PATH_FETCH_BY_USERID.getColumnBitmask()) != 0) {
        Object[] args = new Object[] {
            Long.valueOf(warrantUserUniqueIdModelImpl.getOriginalUserId())
          };

        FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_USERID, args);
        FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_USERID, args);
View Full Code Here

TOP

Related Classes of com.warrantchange.model.impl.WarrantUserUniqueIdModelImpl

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.