|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jlf.dataMap.DataAttributeDescriptor
This class is an abstract base class to help describe a relational database relationship. This relationship helps tie different business objects together in a manner where coders can simply describe the relationship instead of having to figure out how to hand-code each one.
DataMappedObject
,
DataAttribute
Field Summary | |
protected java.lang.Class |
attributeClass
The DataAttribute subclass. |
protected java.lang.String |
attributeName
The name of the attribute so accessors can conveniently refer to the attribute. |
protected boolean |
canBeNull
When reading the attribute from a data source or writing the attribute to a data source, can the attribute be null? |
protected boolean |
isKeyField
Is the attribute a key field? The default is false. |
protected int |
maximumLength
Maximum length of the attribute. |
Constructor Summary | |
protected |
DataAttributeDescriptor()
Protect the default constructor, please use a paramterized constructor instead! |
|
DataAttributeDescriptor(java.lang.String attributeName,
java.lang.Class attributeClass,
boolean canBeNull)
Constructs a new instance of the descriptor given required information for creating an attribute. |
Method Summary | |
boolean |
canBeNull()
Returns if the attribute can be null. |
java.lang.Class |
getAttributeClass()
Getter for the attributeClass. |
java.lang.String |
getAttributeName()
Getter for the attributeName. |
int |
getMaximumLength()
Returns the maximum length of the attribute, zero if unlimited. |
DataAttribute |
getNewAttributeInstance()
Creates a new instance of an attribute given the characteristics in this attribute descriptor. |
boolean |
isKeyField()
Returns if the attribute is a key field. |
void |
setIsKeyField(boolean isKeyField)
Sets whether the attribute is a key field. |
void |
setMaximumLength(int maximumLength)
Sets the maximum length of the attribute, zero if unlimited. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.String attributeName
protected java.lang.Class attributeClass
DataAttribute
subclass.
protected boolean canBeNull
protected boolean isKeyField
protected int maximumLength
Constructor Detail |
protected DataAttributeDescriptor()
public DataAttributeDescriptor(java.lang.String attributeName, java.lang.Class attributeClass, boolean canBeNull)
Method Detail |
public java.lang.String getAttributeName()
public java.lang.Class getAttributeClass()
DataAttribute
.public boolean canBeNull()
public boolean isKeyField()
public void setIsKeyField(boolean isKeyField)
public int getMaximumLength()
public void setMaximumLength(int maximumLength)
public DataAttribute getNewAttributeInstance()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |