org.apache.jackrabbit.ocm.mapper.model
Class CollectionDescriptor
java.lang.Object
org.apache.jackrabbit.ocm.mapper.model.CollectionDescriptor
- All Implemented Interfaces:
- ChildNodeDefDescriptor, PropertyDefDescriptor
public class CollectionDescriptor
- extends Object
- implements ChildNodeDefDescriptor, PropertyDefDescriptor
CollectionDescriptor is used by the mapper to read general information on a collection field
- Author:
- Lombart Christophe
CollectionDescriptor
public CollectionDescriptor()
getFieldName
public String getFieldName()
- Specified by:
getFieldName
in interface PropertyDefDescriptor
setFieldName
public void setFieldName(String fieldName)
getJcrName
public String getJcrName()
- Specified by:
getJcrName
in interface ChildNodeDefDescriptor
- Specified by:
getJcrName
in interface PropertyDefDescriptor
- Returns:
- Returns the name of the property.
setJcrName
public void setJcrName(String jcrName)
getElementClassName
public String getElementClassName()
setElementClassName
public void setElementClassName(String elementClassName)
getJcrElementName
public String getJcrElementName()
setJcrElementName
public void setJcrElementName(String jcrElementName)
isProxy
public boolean isProxy()
setProxy
public void setProxy(boolean proxy)
isAutoInsert
public boolean isAutoInsert()
setAutoInsert
public void setAutoInsert(boolean autoInsert)
isAutoRetrieve
public boolean isAutoRetrieve()
setAutoRetrieve
public void setAutoRetrieve(boolean autoRetrieve)
isAutoUpdate
public boolean isAutoUpdate()
setAutoUpdate
public void setAutoUpdate(boolean autoUpdate)
getCollectionConverter
public String getCollectionConverter()
setCollectionConverter
public void setCollectionConverter(String collectionConverterClassName)
getCollectionClassName
public String getCollectionClassName()
- Returns:
- the collection class name (can be also a Map)
setCollectionClassName
public void setCollectionClassName(String collectionClassName)
- Set the collection class name.
This collection class has to implement
ManageableCollection
- Parameters:
collectionClassName
- The collection class name to set
getClassDescriptor
public ClassDescriptor getClassDescriptor()
- Returns:
- The associated class descriptor
setClassDescriptor
public void setClassDescriptor(ClassDescriptor classDescriptor)
- Set the associated class descriptor
- Parameters:
classDescriptor
- the class descriptor to set
getJcrType
public String getJcrType()
- Specified by:
getJcrType
in interface ChildNodeDefDescriptor
- Specified by:
getJcrType
in interface PropertyDefDescriptor
- Returns:
- Returns the child node type name.
setJcrType
public void setJcrType(String value)
isJcrAutoCreated
public boolean isJcrAutoCreated()
- Specified by:
isJcrAutoCreated
in interface ChildNodeDefDescriptor
- Specified by:
isJcrAutoCreated
in interface PropertyDefDescriptor
- Returns:
- Whether the child node is auto created.
setJcrAutoCreated
public void setJcrAutoCreated(boolean value)
isJcrMandatory
public boolean isJcrMandatory()
- Specified by:
isJcrMandatory
in interface ChildNodeDefDescriptor
- Specified by:
isJcrMandatory
in interface PropertyDefDescriptor
- Returns:
- Whether the child node is mandatory.
setJcrMandatory
public void setJcrMandatory(boolean value)
getJcrOnParentVersion
public String getJcrOnParentVersion()
- Specified by:
getJcrOnParentVersion
in interface ChildNodeDefDescriptor
- Specified by:
getJcrOnParentVersion
in interface PropertyDefDescriptor
- Returns:
- What to do on parent version creation.
setJcrOnParentVersion
public void setJcrOnParentVersion(String value)
isJcrProtected
public boolean isJcrProtected()
- Specified by:
isJcrProtected
in interface ChildNodeDefDescriptor
- Specified by:
isJcrProtected
in interface PropertyDefDescriptor
- Returns:
- Whether the child node is protected.
setJcrProtected
public void setJcrProtected(boolean value)
isJcrSameNameSiblings
public boolean isJcrSameNameSiblings()
- Specified by:
isJcrSameNameSiblings
in interface ChildNodeDefDescriptor
- Returns:
- Whether the child node definition allows for same name sibblings.
setJcrSameNameSiblings
public void setJcrSameNameSiblings(boolean value)
isJcrMultiple
public boolean isJcrMultiple()
- Specified by:
isJcrMultiple
in interface PropertyDefDescriptor
- Returns:
- Whether the property is multi-valued.
setJcrMultiple
public void setJcrMultiple(boolean value)
toString
public String toString()
- Overrides:
toString
in class Object
getDefaultPrimaryType
public String getDefaultPrimaryType()
- Specified by:
getDefaultPrimaryType
in interface ChildNodeDefDescriptor
- Returns:
- Whether the default not type to use when create new instances of this child
setDefaultPrimaryType
public void setDefaultPrimaryType(String defaultPrimaryType)
Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.