All Known Implementing Classes:
NotSettingIdSetter, SimpleIdSetter

public interface IdSetter<T>
A IdSetter must be unique in one storage for one entity-class. It creates Ids and therefore must know all existing entities of one class.
  • Method Details

    • createIdSetter

      static <T> IdSetter<T> createIdSetter(Class<T> classWithId, Consumer<Object> lastIdPersister, Supplier<Object> lastIdGetter)
    • ensureId

      void ensureId(T objectToSetIdIn)
      This method makes sure, that an id is set for the given object. If it is already set (not null), then nothing is done. If it is not set, a new one will be generated and set.
    • isAutomaticSetter

      boolean isAutomaticSetter()
    • getDefaultValue

      Object getDefaultValue()