T - the generic type of the model objectpublic class GenericModel<T> extends Object implements de.alpharogroup.model.api.Model<T>, de.alpharogroup.model.api.ObjectClassAware<T>
GenericModel is the basic implementation of an Model. Decorates a
simple object. This class is only for small object, if you want to store large objects consider
to use LoadableDetachableModel instead.| Constructor and Description |
|---|
GenericModel(T object)
Instantiates a new
GenericModel. |
| Modifier and Type | Method and Description |
|---|---|
void |
attach() |
void |
detach() |
Class<T> |
getObjectClass() |
static <T> GenericModel<T> |
of()
Factory methods for
GenericModel which uses type inference to make code shorter. |
static <T> GenericModel<T> |
of(T object)
Factory methods for
GenericModel which uses type inference to make code shorter. |
public GenericModel(T object)
GenericModel.object - the objectpublic static <T> GenericModel<T> of(T object)
GenericModel which uses type inference to make code shorter.
Equivalent to new GenericModel<TypeOfObject>(object).T - the generic typeobject - the objectobjectpublic static <T> GenericModel<T> of()
GenericModel which uses type inference to make code shorter.
Equivalent to new GenericModel<TypeOfObject>().T - the generic typeGenericModel with no objectpublic void detach()
detach in interface de.alpharogroup.model.api.Detachablepublic Class<T> getObjectClass()
getObjectClass in interface de.alpharogroup.model.api.ObjectClassAware<T>public void attach()
attach in interface de.alpharogroup.model.api.AttachableCopyright © 2015–2017 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.