java.lang.Object
org.jbpm.util.client.Relations
- public class Relations
- extends java.lang.Object
specifies which related objects should be resolved for data-transfer-objects,
returned from a session-facade.
A session facade is supposed to collect data from the persistency-layer
and return data-transfer-objects to the client. If the datamodel has a lot
of relations, a problem arises : Which related objects should be resolved in
the object that is returned to the client. A Relations-object is a convenient way of specifying
which related objects you want to be resolve on the objects returned by the session facade.
You can specify these Relations with dot-separated property-names.
E.g. if the returned object is a Flow, "attributeInstance.attribute" specifies that
for every returned Flow-object the methods Collection getAttributeInstance() must
be resolved and that these AttributeInstances have the Attribute getAttribute()
resolved.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
relationsMap
private java.util.Map relationsMap
log
private static final org.apache.log4j.Logger log
Relations
public Relations(java.lang.String property)
- creates a Relation from one dot-separated property descriptor.
Relations
public Relations(java.lang.String[] properties)
- creates a Relation from multiple dot-separated property descriptor.
add
private void add(java.lang.String fullyQualifiedProperty)
getRelationsMap
public java.util.Map getRelationsMap()
resolve
public void resolve(java.lang.Object object)
resolve
private static void resolve(java.lang.Object object,
java.util.Map relationsMap)
resolveObject
private static void resolveObject(java.lang.Object persistentObject,
java.util.Map relationsMap)