java.lang.Object
software.xdev.spring.data.eclipse.store.repository.support.id.IdManager<T,ID>
All Implemented Interfaces:
EntityGetterById<T,ID>, IdGetter<T,ID>

public class IdManager<T,ID> extends Object implements EntityGetterById<T,ID>, IdGetter<T,ID>
  • Constructor Details

  • Method Details

    • ensureIdField

      public Field ensureIdField()
    • findById

      public Optional<T> findById(@Nonnull ID id)
      Specified by:
      findById in interface EntityGetterById<T,ID>
    • findAllById

      public List<T> findAllById(@Nonnull Iterable<ID> idsToFind)
    • getIdSetter

      public IdSetter<T> getIdSetter()
    • getId

      public ID getId(T entity)
      Specified by:
      getId in interface IdGetter<T,ID>
    • hasIdField

      public boolean hasIdField()
    • ensureId

      public 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.
    • checkIds

      public <S extends T> void checkIds(Collection<S> entities)