- java.lang.Object
-
- io.github.mmm.entity.id.IdFactories
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
IdFactories()
The constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IdFactories
get()
IdFactory<?,?,?>
get(Class<? extends Id<?>> idClass)
<I,V extends Comparable<?>,ID extends AbstractId<?,I,V>>
IdFactory<I,V,ID>getGeeneric(Class<ID> idClass)
protected void
init()
Initializes the defaults.protected void
register(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
- theIdFactory
to register.
-
get
public IdFactory<?,?,?> get(Class<? extends Id<?>> idClass)
- Parameters:
idClass
-Class
ofId
implementation.- Returns:
- the
IdFactory
responsible 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 ofId
implementation.- Parameters:
idClass
-Class
ofId
implementation.- Returns:
- the
IdFactory
responsible for the given idClass
.
-
get
public static IdFactories get()
- Returns:
- the singleton instance of
IdFactories
.
-
-