Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.jbpm.util.client
Class Relations  view Relations download Relations.java

java.lang.Object
  extended byorg.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.


Field Summary
private static org.apache.log4j.Logger log
           
private  java.util.Map relationsMap
           
 
Constructor Summary
Relations(java.lang.String property)
          creates a Relation from one dot-separated property descriptor.
Relations(java.lang.String[] properties)
          creates a Relation from multiple dot-separated property descriptor.
 
Method Summary
private  void add(java.lang.String fullyQualifiedProperty)
           
 java.util.Map getRelationsMap()
           
 void resolve(java.lang.Object object)
           
private static void resolve(java.lang.Object object, java.util.Map relationsMap)
           
private static void resolveObject(java.lang.Object persistentObject, java.util.Map relationsMap)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

relationsMap

private java.util.Map relationsMap

log

private static final org.apache.log4j.Logger log
Constructor Detail

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.

Method Detail

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)