- java.lang.Object
-
- io.github.mmm.entity.id.IdFactories
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedIdFactories()The constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IdFactoriesget()IdFactory<?,?,?>get(Class<? extends Id<?>> idClass)<I,V extends Comparable<?>,ID extends AbstractId<?,I,V>>
IdFactory<I,V,ID>getGeeneric(Class<ID> idClass)protected voidinit()Initializes the defaults.protected voidregister(IdFactory<?,?,?> factory)
-
-
-
Method Detail
-
init
protected void init()
Initializes the defaults. May be overridden to opt out or replace.
-
register
protected void register(IdFactory<?,?,?> factory)
- Parameters:
factory- theIdFactoryto register.
-
get
public IdFactory<?,?,?> get(Class<? extends Id<?>> idClass)
- Parameters:
idClass-ClassofIdimplementation.- Returns:
- the
IdFactoryresponsible for the given idClass.
-
getGeeneric
public <I,V extends Comparable<?>,ID extends AbstractId<?,I,V>> IdFactory<I,V,ID> getGeeneric(Class<ID> idClass)
- Type Parameters:
I- type of theprimary key.V- type of theversion.ID- type ofIdimplementation.- Parameters:
idClass-ClassofIdimplementation.- Returns:
- the
IdFactoryresponsible for the given idClass.
-
get
public static IdFactories get()
- Returns:
- the singleton instance of
IdFactories.
-
-