|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ClassDescriptor
A runtime descriptor of an persistent class.
Method Summary | |
---|---|
Object |
createObject()
Creates a new instance of a class described by this object. |
Property |
getDeclaredProperty(String propertyName)
Returns a Java Bean property descriptor matching property name or null if no such property is found. |
Iterator<DbAttribute> |
getDiscriminatorColumns()
Returns a collection of DbAttributes for the described class, its superclasses and subclasses, that participate in inheritance qualifier, but are not mapped as object properties. |
ObjEntity |
getEntity()
Returns an ObjEntity associated with this descriptor. |
Expression |
getEntityQualifier()
Returns entity qualifier as a Cayenne expression that includes qualifiers for this entity and all subentities. |
Iterator<Property> |
getIdProperties()
Returns an iterator over the properties mapped to id columns. |
Iterator<ArcProperty> |
getMapArcProperties()
Returns an iterator over the arc properties whose reverse arcs are to-many maps. |
Class<?> |
getObjectClass()
Returns a class mapped by this descriptor. |
Iterator<Property> |
getProperties()
Deprecated. since 3.0. Use visitProperties(PropertyVisitor) method
instead. |
Property |
getProperty(String propertyName)
Returns a property descriptor matching property name, or null if no such property is found. |
ClassDescriptor |
getSubclassDescriptor(Class<?> objectClass)
Returns the most "specialized" descriptor for a given class. |
ClassDescriptor |
getSuperclassDescriptor()
Returns a descriptor of the mapped superclass or null if the descriptor's entity sits at the top of inheritance hierarchy or no inheritance is mapped. |
void |
injectValueHolders(Object object)
Prepares object properties for access. |
boolean |
isFault(Object object)
Returns true if an object is not fully resolved. |
void |
shallowMerge(Object from,
Object to)
Merges object properties from one object to another, avoiding traversal of the ArcProperties. |
boolean |
visitAllProperties(PropertyVisitor visitor)
Passes the visitor to the properties "visit" method for all properties declared in this descriptor, its super and subdescriptors, terminating properties walkthrough in case one of the properties returns false. |
boolean |
visitDeclaredProperties(PropertyVisitor visitor)
Passes the visitor to the properties "visit" method for all properties declared in this descriptor, terminating properties walkthrough in case one of the properties returns false. |
boolean |
visitProperties(PropertyVisitor visitor)
Passes the visitor to all properties "visit" method, terminating properties walkthrough in case one of the properties returns false. |
Method Detail |
---|
ObjEntity getEntity()
Class<?> getObjectClass()
ClassDescriptor getSuperclassDescriptor()
ClassDescriptor getSubclassDescriptor(Class<?> objectClass)
this.getObjectClass().isAssignableFrom(objectClass)
Object createObject()
void injectValueHolders(Object object) throws PropertyException
PropertyException
void shallowMerge(Object from, Object to) throws PropertyException
PropertyException
Property getProperty(String propertyName)
AttributeProperty
,
ToManyProperty
, ToOneProperty
.
Property getDeclaredProperty(String propertyName)
AttributeProperty
,
ToManyProperty
, ToOneProperty
.
Iterator<Property> getProperties()
visitProperties(PropertyVisitor)
method
instead.
Iterator<Property> getIdProperties()
Iterator<DbAttribute> getDiscriminatorColumns()
Expression getEntityQualifier()
Iterator<ArcProperty> getMapArcProperties()
arc.getComplimentaryReverseArc() instanceof ToManyMapProperty
boolean visitProperties(PropertyVisitor visitor)
boolean visitDeclaredProperties(PropertyVisitor visitor)
boolean visitAllProperties(PropertyVisitor visitor)
boolean isFault(Object object)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |