org.apache.jackrabbit.ocm.mapper.model
Class CollectionDescriptor

java.lang.Object
  extended by 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

Constructor Summary
CollectionDescriptor()
           
 
Method Summary
 ClassDescriptor getClassDescriptor()
           
 String getCollectionClassName()
           
 String getCollectionConverter()
           
 String getDefaultPrimaryType()
           
 String getElementClassName()
           
 String getFieldName()
           
 String getJcrElementName()
           
 String getJcrName()
           
 String getJcrOnParentVersion()
           
 String getJcrType()
           
 boolean isAutoInsert()
           
 boolean isAutoRetrieve()
           
 boolean isAutoUpdate()
           
 boolean isJcrAutoCreated()
           
 boolean isJcrMandatory()
           
 boolean isJcrMultiple()
           
 boolean isJcrProtected()
           
 boolean isJcrSameNameSiblings()
           
 boolean isProxy()
           
 void setAutoInsert(boolean autoInsert)
           
 void setAutoRetrieve(boolean autoRetrieve)
           
 void setAutoUpdate(boolean autoUpdate)
           
 void setClassDescriptor(ClassDescriptor classDescriptor)
          Set the associated class descriptor
 void setCollectionClassName(String collectionClassName)
          Set the collection class name.
 void setCollectionConverter(String collectionConverterClassName)
           
 void setDefaultPrimaryType(String defaultPrimaryType)
           
 void setElementClassName(String elementClassName)
           
 void setFieldName(String fieldName)
           
 void setJcrAutoCreated(boolean value)
           
 void setJcrElementName(String jcrElementName)
           
 void setJcrMandatory(boolean value)
           
 void setJcrMultiple(boolean value)
           
 void setJcrName(String jcrName)
           
 void setJcrOnParentVersion(String value)
           
 void setJcrProtected(boolean value)
           
 void setJcrSameNameSiblings(boolean value)
           
 void setJcrType(String value)
           
 void setProxy(boolean proxy)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CollectionDescriptor

public CollectionDescriptor()
Method Detail

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.