T - the generic type of the model objectpublic abstract 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 <C> de.alpharogroup.model.api.Model<Collection<C>> |
ofCollection(Collection<C> collection)
Factory method for models that contain collections.
|
static <C> de.alpharogroup.model.api.Model<List<C>> |
ofList(List<C> list)
Factory method for models that contain lists.
|
static <K,V> de.alpharogroup.model.api.Model<Map<K,V>> |
ofMap(Map<K,V> map)
Factory method for models that contain maps.
|
static <C> de.alpharogroup.model.api.Model<Set<C>> |
ofSet(Set<C> set)
Factory method for models that contain sets.
|
public GenericModel(T object)
GenericModel.object - the objectpublic static <C> de.alpharogroup.model.api.Model<Collection<C>> ofCollection(Collection<C> collection)
collection into a serializable ArrayList.C - model typecollection - The Collection, which may or may not be Serializablepublic static <C> de.alpharogroup.model.api.Model<List<C>> ofList(List<C> list)
list into a serializable one.C - model typelist - The List, which may or may not be Serializablepublic static <K,V> de.alpharogroup.model.api.Model<Map<K,V>> ofMap(Map<K,V> map)
map into a serializable one.K - key type in mapV - value type in mapmap - The Map, which may or may not be Serializablepublic static <C> de.alpharogroup.model.api.Model<Set<C>> ofSet(Set<C> set)
set into a serializable one.C - model typeset - The Set, which may or may not be Serializablepublic void attach()
attach in interface de.alpharogroup.model.api.Attachablepublic void detach()
detach in interface de.alpharogroup.model.api.DetachableCopyright © 2015–2017 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.