|
|||||||||
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 |
Constructor Summary | |
---|---|
CollectionDescriptor(ClassDescriptor descriptor)
|
Method Summary | |
---|---|
void |
addAttribute(java.lang.String attributeName,
java.lang.String attributeValue)
Store the specified attribute and it's value. |
void |
addFkToItemClass(java.lang.String column)
add a FK column pointing to the item Class |
void |
addFkToThisClass(java.lang.String column)
add a FK column pointing to This Class |
void |
addOrderBy(java.lang.String fieldName,
boolean sortAscending)
Adds a field for orderBy |
java.lang.String |
getAttribute(java.lang.String attributeName)
Get the value of an attribute |
java.lang.String |
getAttribute(java.lang.String attributeName,
java.lang.String defaultValue)
Get the value of an attribute |
java.lang.String[] |
getAttributeNames()
Returns an array of the names of all atributes of this descriptor. |
java.util.Map |
getAttributes()
Returns the attribute map (name, value) of this descriptor. |
java.lang.Class |
getCollectionClass()
returns the type of the collection. |
java.lang.String |
getCollectionClassName()
Retrieve the classname of the collection. |
java.lang.String[] |
getFksToItemClass()
|
java.lang.String[] |
getFksToThisClass()
|
java.lang.String |
getIndirectionTable()
|
java.util.Collection |
getOrderBy()
Returns the orderby Collection of Fields. |
QueryCustomizer |
getQueryCustomizer()
|
boolean |
hasProxyItems()
|
boolean |
isMtoNRelation()
|
void |
setCollectionClass(java.lang.Class c)
set the type of the collection |
void |
setFksToItemClass(java.util.Vector fksToItemClass)
|
void |
setFksToThisClass(java.util.Vector fksToThisClass)
|
void |
setIndirectionTable(java.lang.String indirectionTable)
|
void |
setQueryCustomizer(QueryCustomizer queryCustomizer)
Sets the queryCustomizer. |
java.lang.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 |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CollectionDescriptor(ClassDescriptor descriptor)
Method Detail |
---|
public java.lang.String[] getFksToThisClass()
public void setFksToThisClass(java.util.Vector fksToThisClass)
public void addFkToThisClass(java.lang.String column)
public void addFkToItemClass(java.lang.String column)
public java.lang.Class getCollectionClass()
public void setCollectionClass(java.lang.Class c)
c
- the collection typepublic java.lang.String getCollectionClassName()
public java.lang.String getIndirectionTable()
public void setIndirectionTable(java.lang.String indirectionTable)
public java.lang.String[] getFksToItemClass()
public void setFksToItemClass(java.util.Vector fksToItemClass)
public boolean isMtoNRelation()
public void addOrderBy(java.lang.String fieldName, boolean sortAscending)
fieldName
- The field name to be usedsortAscending
- true for ASCENDING, false for DESCENDINGpublic java.util.Collection getOrderBy()
public java.lang.String toXML()
XmlCapable
toXML
in interface XmlCapable
toXML
in class ObjectReferenceDescriptor
public QueryCustomizer getQueryCustomizer()
public void setQueryCustomizer(QueryCustomizer queryCustomizer)
queryCustomizer
- The queryCustomizer to setpublic boolean hasProxyItems() throws PersistenceBrokerException
PersistenceBrokerException
public void addAttribute(java.lang.String attributeName, java.lang.String attributeValue)
AttributeContainer
addAttribute
in interface AttributeContainer
attributeName
- the name of the attribute to retrieveattributeValue
- the attribute's valueAttributeContainer.addAttribute(String, String)
public java.lang.String getAttribute(java.lang.String attributeName, java.lang.String defaultValue)
AttributeContainer
getAttribute
in interface AttributeContainer
attributeName
- the attribute to retrievedefaultValue
- the value to return if the attribute is not present
AttributeContainer.getAttribute(String, String)
public java.lang.String getAttribute(java.lang.String attributeName)
AttributeContainer
getAttribute
in interface AttributeContainer
attributeName
- the attribute to retrieve
AttributeContainer.getAttribute(String)
public java.util.Map getAttributes()
public java.lang.String[] getAttributeNames()
null
)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |