|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.objectwave.persist.AttributeTypeColumn
A class that is used to describe an object's attribute. An instance of this class will exist for every attribute defined in the system.
Field Summary | |
static Type |
ATTRIBUTE
|
static Type |
COLLECTION
|
static Type |
FOREIGN
|
static Type |
INSTANCE
|
protected JoinField[] |
joinFields
|
static Type |
PLACEHOLDER
|
static Type |
PRIMARYATT
|
static Type |
TYPEATT
|
Constructor Summary | |
AttributeTypeColumn()
Subclasses such as wrapper classes may need this. |
|
AttributeTypeColumn(java.lang.Class pObj,
java.lang.reflect.Field fd,
Type t)
Used to create instance links that can not be proxied. |
|
AttributeTypeColumn(java.lang.Class pObj,
java.lang.String name,
java.lang.reflect.Field fd,
Type t)
|
|
AttributeTypeColumn(Persistence pObj,
java.lang.String name,
java.lang.reflect.Field fd,
Type t)
|
|
AttributeTypeColumn(java.lang.String name,
java.lang.reflect.Field fd,
Type t)
Most often used for ATTRIBUTE types. |
Method Summary | |
void |
addJoinField(JoinField joinField)
Adds a feature to the JoinField attribute of the AttributeTypeColumn object |
int |
compareTo(java.lang.Object o)
compares |
boolean |
equals(AttributeTypeColumn aValue)
|
static AttributeTypeColumn |
getAttributeRelation(java.lang.String columnName,
java.lang.reflect.Field fd)
Convenience method for creating Attribute relations. |
CollectionAdapter |
getCollectionAdapter()
|
static AttributeTypeColumn |
getCollectionRelation(java.lang.Class c,
java.lang.reflect.Field fd)
Convenience method for creating Collection relations. |
java.lang.String |
getColumnName()
Gets the ColumnName attribute of the AttributeTypeColumn object |
ConstraintCompare |
getConstraint()
Gets the Constraint attribute of the AttributeTypeColumn object |
java.lang.reflect.Field |
getField()
Gets the Field attribute of the AttributeTypeColumn object |
static AttributeTypeColumn |
getForeignRelation(java.lang.Class c,
java.lang.String columnName,
java.lang.reflect.Field fd)
Convenience method for creating Foreign relations. |
static AttributeTypeColumn |
getInstanceRelation(java.lang.Class c,
java.lang.reflect.Field fd)
Convenience method for creating Instance relations. |
static AttributeTypeColumn |
getInstanceRelation(java.lang.Class c,
java.lang.String columnName,
java.lang.reflect.Field fd)
Convenience method for creating Instance relations. |
JoinField[] |
getJoinFields()
Gets the JoinFields attribute of the AttributeTypeColumn object |
java.lang.reflect.Field |
getJoinOn()
By default, foreign key links join on the other object PrimaryKeyField. |
Persistence |
getPersistentType()
A persistentType is the class of the persistent object we wish to build. |
java.lang.Class |
getRelatedType()
A relatedType is the class of the persistent object we wish to build. |
Type |
getType()
Collection, Foreign, Instance, Attribute, PrimaryAttribute |
static AttributeTypeColumn |
getTypeAttributeRelation(java.lang.String columnName,
java.lang.reflect.Field fd)
|
java.lang.Object |
getValue(Persistence obj)
Convenience method to allow one to retrieve a single attribute from a persistent object. |
java.lang.Object |
getValue(Persistence obj,
java.lang.reflect.Field[] fields,
java.lang.Object[] values)
Convenience method to allow one to retrieve a single attribute from a persistent object. |
void |
setAsPrimary()
An easy way change the type to be a primary attribute. |
void |
setCollectionAdpater(CollectionAdapter adapter)
This attribute is only used for the CollectionType. |
void |
setColumnName(java.lang.String nm)
Sets the ColumnName attribute of the AttributeTypeColumn object |
void |
setConstraint(ConstraintCompare comp)
Sets the Constraint attribute of the AttributeTypeColumn object |
void |
setField(java.lang.reflect.Field fd)
All AttributeTypeColumns are required to have a corresponding Field object. |
void |
setJoinOn(java.lang.reflect.Field theOtherField)
By default, foreign key links join on the other object PrimaryKeyField. |
void |
setRelatedType(java.lang.Class c)
This is type object we are going to use to attempt to match a field on one object to a field on another object. |
void |
setType(Type c)
|
void |
setValue(Persistence obj,
java.lang.Object aValue)
Convenience method to allow one to update a single attribute on a persistent object. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final Type INSTANCE
public static final Type FOREIGN
public static final Type COLLECTION
public static final Type ATTRIBUTE
public static final Type PRIMARYATT
public static final Type TYPEATT
public static final Type PLACEHOLDER
protected JoinField[] joinFields
Constructor Detail |
public AttributeTypeColumn()
public AttributeTypeColumn(Persistence pObj, java.lang.String name, java.lang.reflect.Field fd, Type t)
pObj
- name
- fd
- t
- public AttributeTypeColumn(java.lang.Class pObj, java.lang.reflect.Field fd, Type t)
pObj
- fd
- t
- public AttributeTypeColumn(java.lang.Class pObj, java.lang.String name, java.lang.reflect.Field fd, Type t)
pObj
- name
- fd
- t
- public AttributeTypeColumn(java.lang.String name, java.lang.reflect.Field fd, Type t)
name
- fd
- t
- Method Detail |
public static AttributeTypeColumn getAttributeRelation(java.lang.String columnName, java.lang.reflect.Field fd)
columnName
- fd
-
public static AttributeTypeColumn getCollectionRelation(java.lang.Class c, java.lang.reflect.Field fd)
c
- fd
-
public static AttributeTypeColumn getForeignRelation(java.lang.Class c, java.lang.String columnName, java.lang.reflect.Field fd)
c
- columnName
- fd
-
public static AttributeTypeColumn getInstanceRelation(java.lang.Class c, java.lang.reflect.Field fd)
c
- fd
-
public static AttributeTypeColumn getInstanceRelation(java.lang.Class c, java.lang.String columnName, java.lang.reflect.Field fd)
c
- columnName
- fd
-
public static AttributeTypeColumn getTypeAttributeRelation(java.lang.String columnName, java.lang.reflect.Field fd)
columnName
- java.lang.Stringfd
- java.lang.reflect.Field
public void setAsPrimary()
public void setColumnName(java.lang.String nm)
nm
- The new ColumnName valuepublic void setField(java.lang.reflect.Field fd)
fd
- The new Field valuepublic void setRelatedType(java.lang.Class c)
c
- The new RelatedType valuepublic void setType(Type c)
c
- The new Type valuepublic void setValue(Persistence obj, java.lang.Object aValue)
obj
- The new Value valueaValue
- The new Value valuepublic void setCollectionAdpater(CollectionAdapter adapter)
adapter
- com.objectwave.persist.CollectionAdapter An interface that allows building collectionspublic void setConstraint(ConstraintCompare comp)
comp
- The new Constraint valuepublic void setJoinOn(java.lang.reflect.Field theOtherField)
theOtherField
- The new JoinOn valuepublic JoinField[] getJoinFields()
public java.lang.String getColumnName()
public java.lang.reflect.Field getField()
public Persistence getPersistentType()
getRelatedType()
public java.lang.Class getRelatedType()
getPersistentType()
public Type getType()
public final java.lang.Object getValue(Persistence obj, java.lang.reflect.Field[] fields, java.lang.Object[] values)
obj
- fields
- values
-
public java.lang.reflect.Field getJoinOn()
public java.lang.Object getValue(Persistence obj)
obj
- The instance that holds the value represented by this attribute
public CollectionAdapter getCollectionAdapter()
public ConstraintCompare getConstraint()
public void addJoinField(JoinField joinField)
joinField
- The feature to be added to the JoinField attributepublic boolean equals(AttributeTypeColumn aValue)
aValue
-
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
o
-
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |