|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.odata4j.producer.inmemory.BeanBasedPropertyModel
public class BeanBasedPropertyModel
Constructor Summary | |
---|---|
BeanBasedPropertyModel(Class<?> clazz)
|
|
BeanBasedPropertyModel(Class<?> clazz,
boolean flatten)
construct |
Method Summary | |
---|---|
Class<?> |
getCollectionElementType(String collectionName)
|
Iterable<String> |
getCollectionNames()
gets the names of all collections defined by the model |
Iterable<?> |
getCollectionValue(Object target,
String collectionName)
|
Iterable<String> |
getDeclaredCollectionNames()
gets the names of collections defined only at this inheritance level in the model |
Iterable<String> |
getDeclaredPropertyNames()
gets the names of properties defined only at this inheritance level in the model |
Iterable<String> |
getPropertyNames()
gets the names of all properties defined by the model |
Class<?> |
getPropertyType(String propertyName)
|
Object |
getPropertyValue(Object target,
String propertyName)
|
void |
setCollectionValue(Object target,
String collectionName,
Collection<?> value)
|
void |
setPropertyValue(Object target,
String propertyName,
Object value)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BeanBasedPropertyModel(Class<?> clazz)
public BeanBasedPropertyModel(Class<?> clazz, boolean flatten)
clazz
- - the POJO class that defines the modelflatten
- - if true, the model will flatten property names and
collection names.
if false, the model will distinguish *declared* property/collection names
from *all* (i.e. include inherited) property/collection names. This is
the same terminology used in the Edm classes and the Java Class class.
Note that all model methods that are value centric (getPropertyValue, etc)
will automatically work up the hierarchy if necessary.Method Detail |
---|
public Class<?> getCollectionElementType(String collectionName)
getCollectionElementType
in interface PropertyModel
public Iterable<String> getCollectionNames()
PropertyModel
getCollectionNames
in interface PropertyModel
public Iterable<?> getCollectionValue(Object target, String collectionName)
getCollectionValue
in interface PropertyModel
public Iterable<String> getDeclaredCollectionNames()
PropertyModel
getDeclaredCollectionNames
in interface PropertyModel
public Iterable<String> getDeclaredPropertyNames()
PropertyModel
getDeclaredPropertyNames
in interface PropertyModel
public Iterable<String> getPropertyNames()
PropertyModel
getPropertyNames
in interface PropertyModel
public Class<?> getPropertyType(String propertyName)
getPropertyType
in interface PropertyModel
public Object getPropertyValue(Object target, String propertyName)
getPropertyValue
in interface PropertyModel
public void setCollectionValue(Object target, String collectionName, Collection<?> value)
setCollectionValue
in interface PropertyModel
public void setPropertyValue(Object target, String propertyName, Object value)
setPropertyValue
in interface PropertyModel
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |