org.onemind.commons.relabean
Class RelationalBeanInfo

java.lang.Object
  extended byorg.onemind.commons.relabean.RelationalBeanInfo

public class RelationalBeanInfo
extends java.lang.Object

Describes the properties of a bean class and the relations of the bean class to other classes

Version:
$Id: RelationalBeanInfo.java,v 1.2 2004/08/26 16:28:58 thlee Exp $ $Name: $
Author:
TiongHiang Lee (thlee@onemindsoft.org)

Constructor Summary
RelationalBeanInfo(java.lang.Class beanClass)
          Constructor {@inheritDoc}
 
Method Summary
 void addProperty(PropertyDescriptor prop)
          Add a new property
 void addRelation(RelationDescriptor prop)
          Add a new relation
 void dump(java.lang.String prefix, java.io.Writer writer)
          Dump the property
 java.lang.Class getBeanClass()
          Returns the beanClass.
 java.util.Collection getProperties()
          Returns the properties.
 PropertyDescriptor getProperty(java.lang.String name)
          Get the PropertyDescriptor by the property name
 RelationDescriptor getRelation(java.lang.String name)
          Get the relation descriptor by the relation name
 java.util.Collection getRelations()
          Returns the relations.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RelationalBeanInfo

public RelationalBeanInfo(java.lang.Class beanClass)
Constructor {@inheritDoc}

Method Detail

addProperty

public void addProperty(PropertyDescriptor prop)
Add a new property

Parameters:
prop - the property descriptor

addRelation

public void addRelation(RelationDescriptor prop)
Add a new relation

Parameters:
prop - the property relation

getBeanClass

public java.lang.Class getBeanClass()
Returns the beanClass.

Returns:
the bean class

getProperties

public java.util.Collection getProperties()
Returns the properties.

Returns:
the properties

getProperty

public PropertyDescriptor getProperty(java.lang.String name)
Get the PropertyDescriptor by the property name

Parameters:
name - the name
Returns:
the descriptor, or null

getRelation

public RelationDescriptor getRelation(java.lang.String name)
Get the relation descriptor by the relation name

Parameters:
name - the name
Returns:
the descriptor, or null

getRelations

public java.util.Collection getRelations()
Returns the relations.

Returns:
the relations

toString

public java.lang.String toString()


dump

public void dump(java.lang.String prefix,
                 java.io.Writer writer)
          throws java.io.IOException
Dump the property

Parameters:
prefix - the prefix
writer - the writer
Throws:
java.io.IOException - if there's IO problem


Copyright © 2004-2005 . All Rights Reserved.