org.hypergraphdb.type
Class BeanPropertyBasedProjection

java.lang.Object
  extended by org.hypergraphdb.type.BeanPropertyBasedProjection
All Implemented Interfaces:
HGProjection

public class BeanPropertyBasedProjection
extends java.lang.Object
implements HGProjection

Author:
Borislav Iordanov

Constructor Summary
BeanPropertyBasedProjection(HGProjection wrapped)
           
 
Method Summary
 int[] getLayoutPath()
          Return the layout path in the HGStore from the composite value to the value along this dimension.
 java.lang.String getName()
          Return the name of the dimension that this projection represents.
 HGHandle getType()
          Return the handle of the type of the dimension that this projection represents.
 void inject(java.lang.Object bean, java.lang.Object value)
          Modify an atom's projections.
 java.lang.Object project(java.lang.Object value)
          Return the projection of the passed in value along the dimension represented by this object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanPropertyBasedProjection

public BeanPropertyBasedProjection(HGProjection wrapped)
Method Detail

getName

public java.lang.String getName()
Description copied from interface: HGProjection

Return the name of the dimension that this projection represents.

Specified by:
getName in interface HGProjection

getType

public HGHandle getType()
Description copied from interface: HGProjection

Return the handle of the type of the dimension that this projection represents.

Specified by:
getType in interface HGProjection

getLayoutPath

public int[] getLayoutPath()
Description copied from interface: HGProjection

Return the layout path in the HGStore from the composite value to the value along this dimension. May return null if the precise layout is not know, or not well-defined.

TODO: not sure this is needed...

Specified by:
getLayoutPath in interface HGProjection

project

public java.lang.Object project(java.lang.Object value)
Description copied from interface: HGProjection

Return the projection of the passed in value along the dimension represented by this object.

Specified by:
project in interface HGProjection
Parameters:
value - The value of the atom whose projection value is desired.
Returns:
The value along the dimension embedded within the HGProjection.

inject

public void inject(java.lang.Object bean,
                   java.lang.Object value)
Description copied from interface: HGProjection

Modify an atom's projections.

Specified by:
inject in interface HGProjection
Parameters:
bean - The value of the atom whose projection value is desired.