net.sf.beanform.prop
Class BeanProperty

java.lang.Object
  extended by net.sf.beanform.prop.BeanProperty
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
PseudoProperty

public class BeanProperty
extends Object
implements Serializable

A property of a Java bean, identified by the owner class and the name of the property.

Note that the name of the property may be recursive; for example, if the owner class is Person, and the property name is address.state.abbreviation, then this bean property represents a person's address's state's 2-letter abbreviation, and its type is java.lang.String (not Address or State).

Author:
Daniel Gredler
See Also:
Serialized Form

Constructor Summary
BeanProperty(Class ownerClass, String name, String validators, String input)
           
 
Method Summary
 boolean equals(Object o)
          Compares two BeanProperty instances based on the same fields that hashCode() uses: ownerClass, name, validators and input.
<T extends java.lang.annotation.Annotation>
T
getAnnotation(Class<T> clazz)
           
 List<java.lang.annotation.Annotation> getAnnotations()
           
 String getInput()
           
 String getName()
           
 Class getOwnerClass()
           
 Class getType()
           
 String getTypeName()
           
 String getValidators()
           
 Object getValue()
           
 int hashCode()
          Builds a hashCode based on the same fields that equals(Object) uses: ownerClass, name, validators and input.
 boolean isBoolean()
           
 boolean isByteArray()
           
 boolean isDate()
           
 boolean isDouble()
           
 boolean isEditableType()
           
 boolean isEnum()
           
 boolean isFloat()
           
 boolean isInteger()
           
 boolean isLong()
           
 boolean isLongString()
           
 boolean isNullable()
           
 boolean isNumber()
           
 boolean isReadable()
           
 boolean isShort()
           
 boolean isShortString()
           
 boolean isString()
           
 boolean isWriteable()
           
 void setBean(Object bean)
           
 void setValue(Object value)
           
 String toString()
           
 boolean usesCheckbox()
           
 boolean usesDatePicker()
           
 boolean usesInsert()
           
 boolean usesTextArea()
           
 boolean usesTextField()
           
 boolean usesUpload()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BeanProperty

public BeanProperty(Class ownerClass,
                    String name,
                    String validators,
                    String input)
Method Detail

getOwnerClass

public Class getOwnerClass()

getName

public String getName()

getValidators

public String getValidators()

getInput

public String getInput()

usesTextField

public boolean usesTextField()

usesTextArea

public boolean usesTextArea()

usesCheckbox

public boolean usesCheckbox()

usesDatePicker

public boolean usesDatePicker()

usesUpload

public boolean usesUpload()

usesInsert

public boolean usesInsert()

getAnnotations

public List<java.lang.annotation.Annotation> getAnnotations()

getAnnotation

public <T extends java.lang.annotation.Annotation> T getAnnotation(Class<T> clazz)

isReadable

public boolean isReadable()

isWriteable

public boolean isWriteable()

isNullable

public boolean isNullable()

getType

public Class getType()

getTypeName

public String getTypeName()

isEnum

public boolean isEnum()

isString

public boolean isString()

isShortString

public boolean isShortString()

isLongString

public boolean isLongString()

isBoolean

public boolean isBoolean()

isShort

public boolean isShort()

isInteger

public boolean isInteger()

isLong

public boolean isLong()

isFloat

public boolean isFloat()

isDouble

public boolean isDouble()

isNumber

public boolean isNumber()

isDate

public boolean isDate()

isByteArray

public boolean isByteArray()

isEditableType

public boolean isEditableType()

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Compares two BeanProperty instances based on the same fields that hashCode() uses: ownerClass, name, validators and input.

Overrides:
equals in class Object

hashCode

public int hashCode()
Builds a hashCode based on the same fields that equals(Object) uses: ownerClass, name, validators and input.

Overrides:
hashCode in class Object
See Also:
http://jakarta.apache.org/commons/lang/xref/org/apache/commons/lang/builder/HashCodeBuilder.html

setBean

public void setBean(Object bean)

getValue

public Object getValue()

setValue

public void setValue(Object value)


Copyright © 2005-2008 SourceForge.net. All Rights Reserved.