org.onemind.commons.relabean
Class RelationDescriptor

java.lang.Object
  extended byjava.beans.FeatureDescriptor
      extended byorg.onemind.commons.relabean.RelationDescriptor

public class RelationDescriptor
extends java.beans.FeatureDescriptor

Describe relation between a bean and another bean

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

Constructor Summary
RelationDescriptor(java.lang.String name, java.lang.Class type, java.lang.reflect.Method readMethod, java.lang.reflect.Method writeMethod)
          Constructor {@inheritDoc}
RelationDescriptor(java.lang.String name, java.lang.Class type, java.lang.reflect.Method readMethod, java.lang.reflect.Method writeMethod, java.lang.Class memberType, java.lang.reflect.Method addMethod, java.lang.reflect.Method removeMethod)
          Constructor {@inheritDoc}
 
Method Summary
 void dump(java.lang.String prefix, java.io.Writer writer)
          Dump the property
 java.lang.reflect.Method getAddMethod()
          Get the add method
 java.lang.Class getMemberType()
          Get the member type
 java.lang.String getName()
          Returns the name.
 java.lang.reflect.Method getReadMethod()
          Returns the getMethod.
 java.lang.Class getRelationType()
          Return relation type
 java.lang.reflect.Method getRemoveMethod()
          Returns the removeMethod.
 java.lang.reflect.Method getWriteMethod()
          Returns the writeMethod.
 void setAddMethod(java.lang.reflect.Method method)
          Set the method
 void setMemberType(java.lang.Class c)
          Set the member type
 void setReadMethod(java.lang.reflect.Method method)
          Set the read method
 void setRelationType(java.lang.Class class1)
          Set the relation type
 void setRemoveMethod(java.lang.reflect.Method method)
          Set the remove method
 void setWriteMethod(java.lang.reflect.Method method)
          Set the write method
 
Methods inherited from class java.beans.FeatureDescriptor
attributeNames, getDisplayName, getShortDescription, getValue, isExpert, isHidden, isPreferred, setDisplayName, setExpert, setHidden, setName, setPreferred, setShortDescription, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RelationDescriptor

public RelationDescriptor(java.lang.String name,
                          java.lang.Class type,
                          java.lang.reflect.Method readMethod,
                          java.lang.reflect.Method writeMethod)
Constructor {@inheritDoc}


RelationDescriptor

public RelationDescriptor(java.lang.String name,
                          java.lang.Class type,
                          java.lang.reflect.Method readMethod,
                          java.lang.reflect.Method writeMethod,
                          java.lang.Class memberType,
                          java.lang.reflect.Method addMethod,
                          java.lang.reflect.Method removeMethod)
Constructor {@inheritDoc}

Method Detail

getReadMethod

public java.lang.reflect.Method getReadMethod()
Returns the getMethod.

Returns:
the getMethod.

getName

public java.lang.String getName()
Returns the name.

Returns:
the name

getRemoveMethod

public java.lang.reflect.Method getRemoveMethod()
Returns the removeMethod.

Returns:
the remove method

getWriteMethod

public java.lang.reflect.Method getWriteMethod()
Returns the writeMethod.

Returns:
the writeMethod

getAddMethod

public java.lang.reflect.Method getAddMethod()
Get the add method

Returns:
the add method

setAddMethod

public void setAddMethod(java.lang.reflect.Method method)
Set the method

Parameters:
method - the set method

getRelationType

public java.lang.Class getRelationType()
Return relation type

Returns:
the relation type

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

getMemberType

public java.lang.Class getMemberType()
Get the member type

Returns:
the member type

setMemberType

public void setMemberType(java.lang.Class c)
Set the member type

Parameters:
c - the member type to set

setReadMethod

public void setReadMethod(java.lang.reflect.Method method)
Set the read method

Parameters:
method - the read method

setRelationType

public void setRelationType(java.lang.Class class1)
Set the relation type

Parameters:
class1 - the type

setRemoveMethod

public void setRemoveMethod(java.lang.reflect.Method method)
Set the remove method

Parameters:
method - the method

setWriteMethod

public void setWriteMethod(java.lang.reflect.Method method)
Set the write method

Parameters:
method - the method


Copyright © 2004-2005 . All Rights Reserved.