Class NumberIdCache

java.lang.Object
io.jmix.data.impl.NumberIdCache

@Component("data_NumberIdCache") public class NumberIdCache extends Object
Intermediate cache for generated ids of entities with long/integer PK. The cache size is determined by the jmix.data.numberIdCacheSize property.
  • Field Details

  • Constructor Details

    • NumberIdCache

      public NumberIdCache()
  • Method Details

    • createLongId

      public Long createLongId(String entityName)
      Generates next id.
      Parameters:
      entityName - entity name
      Returns:
      next id
    • getSequenceParams

      protected NumberIdCache.SequenceParams getSequenceParams(MetaClass metaClass)
    • reset

      public void reset()
      INTERNAL. Used by tests.
    • getCacheKey

      protected String getCacheKey(String entityName, @Nullable String sequenceName)