Пример #1
0
 public long getHighestPossibleIdInUse(Class<?> clazz) {
   Store store = idGenerators.get(clazz);
   if (store == null) {
     throw new IdGenerationFailedException("No IdGenerator for: " + clazz);
   }
   return store.getHighestPossibleIdInUse();
 }
Пример #2
0
 public long getNumberOfIdsInUse(Class<?> clazz) {
   Store store = idGenerators.get(clazz);
   if (store == null) {
     throw new IdGenerationFailedException("No IdGenerator for: " + clazz);
   }
   return store.getNumberOfIdsInUse();
 }
Пример #3
0
  public long nextId(Class<?> clazz) {
    Store store = idGenerators.get(clazz);

    if (store == null) {
      throw new IdGenerationFailedException("No IdGenerator for: " + clazz);
    }
    return store.nextId();
  }