public class EntityAdapter<T> extends Object
| Constructor and Description |
|---|
EntityAdapter(Class<?> type) |
| Modifier and Type | Method and Description |
|---|---|
T |
fromDMR(String keyValue,
org.jboss.dmr.ModelNode modelNode)
Converts a DMR
ModelNode to a java entity of type T. |
org.jboss.dmr.ModelNode |
fromEntity(T entity)
Converts an entity of type T into a DMR
ModelNode |
org.jboss.dmr.ModelNode |
fromEntity(T entity,
org.jboss.dmr.ModelNode modelNode) |
org.jboss.jandex.Index |
getIndex() |
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).
|
public EntityAdapter(Class<?> type)
public org.jboss.jandex.Index getIndex()
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(String keyValue, org.jboss.dmr.ModelNode modelNode) throws Exception
ModelNode to a java entity of type T.modelNode - a ModelNodeExceptionpublic org.jboss.dmr.ModelNode fromEntity(T entity) throws Exception
ModelNodeentity - Exceptionpublic org.jboss.dmr.ModelNode fromEntity(T entity, org.jboss.dmr.ModelNode modelNode) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException
Copyright © 2015 JBoss by Red Hat. All rights reserved.