|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.ojb.broker.metadata.AttributeDescriptorBase
org.apache.ojb.broker.metadata.ObjectReferenceDescriptor
org.apache.ojb.broker.metadata.CollectionDescriptor
public class CollectionDescriptor
mapping Description for member fields that are Collections
Note: Be careful when use references of this class or caching instances of this class,
because instances could become invalid (see MetadataManager).
| Field Summary |
|---|
| Fields inherited from class org.apache.ojb.broker.metadata.ObjectReferenceDescriptor |
|---|
CASCADE_LINK, CASCADE_NONE, CASCADE_OBJECT |
| Fields inherited from class org.apache.ojb.broker.metadata.AttributeDescriptorBase |
|---|
m_ClassDescriptor, m_PersistentField |
| Constructor Summary | |
|---|---|
CollectionDescriptor(ClassDescriptor descriptor)
|
|
| Method Summary | |
|---|---|
void |
addAttribute(String attributeName,
String attributeValue)
Store the specified attribute and it's value. |
void |
addFkToItemClass(String column)
add a FK column pointing to the item Class |
void |
addFkToThisClass(String column)
add a FK column pointing to This Class |
void |
addOrderBy(String fieldName,
boolean sortAscending)
Adds a field for orderBy |
String |
getAttribute(String attributeName)
Get the value of an attribute |
String |
getAttribute(String attributeName,
String defaultValue)
Get the value of an attribute |
String[] |
getAttributeNames()
Returns an array of the names of all atributes of this descriptor. |
Map |
getAttributes()
Returns the attribute map (name, value) of this descriptor. |
protected int |
getCascadeDeleteValue(String cascade)
|
Class |
getCollectionClass()
returns the type of the collection. |
String |
getCollectionClassName()
Retrieve the classname of the collection. |
String[] |
getFksToItemClass()
|
String[] |
getFksToThisClass()
|
String |
getIndirectionTable()
|
Collection |
getOrderBy()
Returns the orderby Collection of Fields. |
QueryCustomizer |
getQueryCustomizer()
|
boolean |
hasProxyItems()
|
boolean |
isMtoNRelation()
|
void |
setCollectionClass(Class c)
set the type of the collection |
void |
setFksToItemClass(Vector fksToItemClass)
|
void |
setFksToThisClass(Vector fksToThisClass)
|
void |
setIndirectionTable(String indirectionTable)
|
void |
setQueryCustomizer(QueryCustomizer queryCustomizer)
Sets the queryCustomizer. |
String |
toXML()
returns the XML marshalled version of this instance. |
| Methods inherited from class org.apache.ojb.broker.metadata.AttributeDescriptorBase |
|---|
getAttributeName, getClassDescriptor, getPersistentField, setClassDescriptor, setPersistentField, setPersistentField |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public CollectionDescriptor(ClassDescriptor descriptor)
| Method Detail |
|---|
public String[] getFksToThisClass()
public void setFksToThisClass(Vector fksToThisClass)
public void addFkToThisClass(String column)
public void addFkToItemClass(String column)
public Class getCollectionClass()
public void setCollectionClass(Class c)
c - the collection typepublic String getCollectionClassName()
public String getIndirectionTable()
public void setIndirectionTable(String indirectionTable)
public String[] getFksToItemClass()
public void setFksToItemClass(Vector fksToItemClass)
public boolean isMtoNRelation()
public void addOrderBy(String fieldName,
boolean sortAscending)
fieldName - The field name to be usedsortAscending - true for ASCENDING, false for DESCENDINGpublic Collection getOrderBy()
protected int getCascadeDeleteValue(String cascade)
getCascadeDeleteValue in class ObjectReferenceDescriptorpublic String toXML()
XmlCapable
toXML in interface XmlCapabletoXML in class ObjectReferenceDescriptorpublic QueryCustomizer getQueryCustomizer()
public void setQueryCustomizer(QueryCustomizer queryCustomizer)
queryCustomizer - The queryCustomizer to set
public boolean hasProxyItems()
throws PersistenceBrokerException
PersistenceBrokerException
public void addAttribute(String attributeName,
String attributeValue)
AttributeContainer
addAttribute in interface AttributeContainerattributeName - the name of the attribute to retrieveattributeValue - the attribute's valueAttributeContainer.addAttribute(String, String)
public String getAttribute(String attributeName,
String defaultValue)
AttributeContainer
getAttribute in interface AttributeContainerattributeName - the attribute to retrievedefaultValue - the value to return if the attribute is not present
AttributeContainer.getAttribute(String, String)public String getAttribute(String attributeName)
AttributeContainer
getAttribute in interface AttributeContainerattributeName - the attribute to retrieve
AttributeContainer.getAttribute(String)public Map getAttributes()
public String[] getAttributeNames()
null)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||