public class AdapterFactory extends Object
KomodoObject
into its
relational object instance.Constructor and Description |
---|
AdapterFactory() |
Modifier and Type | Method and Description |
---|---|
<T> T |
adapt(Repository.UnitOfWork transaction,
Object object,
Class<T> adaptedClass)
Attempts to adapt the given object to a relational model typed class.
|
public <T> T adapt(Repository.UnitOfWork transaction, Object object, Class<T> adaptedClass)
KomodoObject
then null is
returned.
The type id of the KomodoObject
is extracted and the correct
relational model object created. If the latter is not assignable from the
given adapted class then it is concluded the adaption should fail and
null is returned, otherwise the new object is returned.T
- the result's typetransaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)object
- object to adaptadaptedClass
- the expected class that the object should be adapted toCopyright © 2013–2019. All rights reserved.