public class EntityAdapter<T> extends Object
| Constructor and Description |
|---|
EntityAdapter(Class<?> type,
ApplicationMetaData metaData) |
| Modifier and Type | Method and Description |
|---|---|
ModelNode |
fromBaseTypeList(List<?> baseTypeValues,
Class<?> baseType) |
ModelNode |
fromChangeset(Map<String,Object> changeSet,
ModelNode address,
ModelNode... extraSteps)
Turns a changeset into a composite write attribute operation.
|
T |
fromDMR(ModelNode dmr)
The ModelNode can be of any type supported by ModelType except BigInteger.
|
List<T> |
fromDMRList(List<ModelNode> dmr)
Parse a ModelNode of type ModelType.List
Basically calls
fromDMR(org.jboss.dmr.client.ModelNode) for each item. |
List<PropertyRecord> |
fromDMRPropertyList(List<Property> dmr) |
ModelNode |
fromEntity(T entity)
Create a plain DMR representation of an entity.
|
ModelNode |
fromEntityList(List<T> entities)
Creates a composite operation to create entities.
|
ModelNode |
fromEntityPropertyList(List<PropertyRecord> entities) |
boolean |
isBaseType(Class<?> clazz)
Is the given class one of the supported ModelNode base classes (String, Long, BigDecimal, etc.)
|
boolean |
isBaseTypeAdapter()
Determine if this is an EntityAdapter for a one of the supported ModelNode
base classes (String, Long, BigDecimal, etc).
|
static List<String> |
modelToList(ModelNode model,
String elementName) |
EntityAdapter<T> |
with(KeyAssignment keyAssignment) |
public EntityAdapter(Class<?> type, ApplicationMetaData metaData)
public EntityAdapter<T> with(KeyAssignment keyAssignment)
public boolean isBaseTypeAdapter()
true if this is a base class EntityAdapter, false otherwise.public boolean isBaseType(Class<?> clazz)
clazz - The class to be tested.true if the given class is a base class, false otherwise.public T fromDMR(ModelNode dmr)
dmr - a ModelNodepublic List<T> fromDMRList(List<ModelNode> dmr)
fromDMR(org.jboss.dmr.client.ModelNode) for each item.dmr - a ModelNodepublic List<PropertyRecord> fromDMRPropertyList(List<Property> dmr)
public ModelNode fromEntity(T entity)
entity - public ModelNode fromEntityList(List<T> entities)
fromEntity(Object)entities - public ModelNode fromEntityPropertyList(List<PropertyRecord> entities)
public ModelNode fromChangeset(Map<String,Object> changeSet, ModelNode address, ModelNode... extraSteps)
changeSet - address - the entity addressCopyright © 2014 JBoss, a division of Red Hat. All rights reserved.