protected void clearUniqueFindersCache(Shard shard) {
    ShardModelImpl shardModelImpl = (ShardModelImpl) shard;

    Object[] args = new Object[] {shard.getName()};

    FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_NAME, args);
    FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_NAME, args);

    if ((shardModelImpl.getColumnBitmask() & FINDER_PATH_FETCH_BY_NAME.getColumnBitmask()) != 0) {
      args = new Object[] {shardModelImpl.getOriginalName()};

      FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_NAME, args);
      FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_NAME, args);
    }

    args = new Object[] {shard.getClassNameId(), shard.getClassPK()};

    FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_C_C, args);
    FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_C_C, args);

    if ((shardModelImpl.getColumnBitmask() & FINDER_PATH_FETCH_BY_C_C.getColumnBitmask()) != 0) {
      args =
          new Object[] {
            shardModelImpl.getOriginalClassNameId(), shardModelImpl.getOriginalClassPK()
          };

      FinderCacheUtil.removeResult(FINDER_PATH_COUNT_BY_C_C, args);
      FinderCacheUtil.removeResult(FINDER_PATH_FETCH_BY_C_C, args);
    }
  }
  protected void cacheUniqueFindersCache(Shard shard) {
    if (shard.isNew()) {
      Object[] args = new Object[] {shard.getName()};

      FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_NAME, args, Long.valueOf(1));
      FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_NAME, args, shard);

      args = new Object[] {shard.getClassNameId(), shard.getClassPK()};

      FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_C_C, args, Long.valueOf(1));
      FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_C_C, args, shard);
    } else {
      ShardModelImpl shardModelImpl = (ShardModelImpl) shard;

      if ((shardModelImpl.getColumnBitmask() & FINDER_PATH_FETCH_BY_NAME.getColumnBitmask()) != 0) {
        Object[] args = new Object[] {shard.getName()};

        FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_NAME, args, Long.valueOf(1));
        FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_NAME, args, shard);
      }

      if ((shardModelImpl.getColumnBitmask() & FINDER_PATH_FETCH_BY_C_C.getColumnBitmask()) != 0) {
        Object[] args = new Object[] {shard.getClassNameId(), shard.getClassPK()};

        FinderCacheUtil.putResult(FINDER_PATH_COUNT_BY_C_C, args, Long.valueOf(1));
        FinderCacheUtil.putResult(FINDER_PATH_FETCH_BY_C_C, args, shard);
      }
    }
  }