com.bm.introspectors.relations
Class GlobalRelationStore

java.lang.Object
  extended by com.bm.introspectors.relations.GlobalRelationStore

public final class GlobalRelationStore
extends java.lang.Object

The problems in finding releations using introspectors is to avaid cyclic dependencies. This singelton is used as such a store of properties (OneToMany, OneToOne,...) to avoid such dependencies

Author:
Daniel Wiese

Method Summary
 Property getProperty(java.lang.Class forClass, java.lang.Class forType)
          Returns the releation properties for special class (entity bean).
 Property getProperty(java.lang.Class forClass, java.lang.String propertyName)
          Returns the property based on the class and the name.
static GlobalRelationStore getStore()
          Returns the singelton instance.
 void put(java.lang.Class forClass, Property toSave)
          Save a property wich represents a relation in a class (bean).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getStore

public static GlobalRelationStore getStore()
Returns the singelton instance.

Returns:
- the singelton instance

put

public void put(java.lang.Class forClass,
                Property toSave)
Save a property wich represents a relation in a class (bean).

Parameters:
forClass - - the entity bean class
toSave - - the property to save

getProperty

public Property getProperty(java.lang.Class forClass,
                            java.lang.String propertyName)
Returns the property based on the class and the name.

Parameters:
forClass - - the class where the property is in
propertyName - - the name of the property
Returns:
- the property or null (if not found)

getProperty

public Property getProperty(java.lang.Class forClass,
                            java.lang.Class forType)
Returns the releation properties for special class (entity bean).

Parameters:
forClass - - the class where the property is in
forType - - the type of the property
Returns:
- the property or null (if not found)


Copyright © 2008. All Rights Reserved.