org.apache.jdo.model.jdo
Interface JDOCollection

All Superinterfaces:
JDOElement, JDORelationship
All Known Implementing Classes:
JDOCollectionImplCaching, JDOCollectionImplDynamic

public interface JDOCollection
extends JDORelationship

A JDOCollection instance represents the JDO relationship metadata of a collection relationship field.

Author:
Michael Bouschen

Field Summary
 
Fields inherited from interface org.apache.jdo.model.jdo.JDORelationship
CARDINALITY_N, CARDINALITY_ONE, CARDINALITY_ZERO
 
Method Summary
 JavaType getElementType()
          Get the type representation of the collection elements.
 java.lang.String getElementTypeName()
          Get the type of collection elements as string.
 boolean isEmbeddedElement()
          Determines whether the values of the elements should be stored if possible as part of the instance instead of as their own instances in the datastore.
 void setElementType(JavaType elementType)
          Set the type representation of the collection elements.
 void setElementTypeName(java.lang.String elementTypeName)
          Set string representation of the type of collection elements.
 void setEmbeddedElement(boolean embeddedElement)
          Set whether the values of the elements should be stored if possible as part of the instance instead of as their own instances in the datastore.
 
Methods inherited from interface org.apache.jdo.model.jdo.JDORelationship
getDeclaringField, getInverseRelationship, getLowerBound, getUpperBound, setDeclaringField, setInverseRelationship, setLowerBound, setUpperBound
 
Methods inherited from interface org.apache.jdo.model.jdo.JDOElement
addPropertyChangeListener, addVetoableChangeListener, createJDOExtension, getJDOExtensions, removeJDOExtension, removePropertyChangeListener, removeVetoableChangeListener
 

Method Detail

isEmbeddedElement

boolean isEmbeddedElement()
Determines whether the values of the elements should be stored if possible as part of the instance instead of as their own instances in the datastore.

Returns:
true if the elements should be stored as part of the instance; false otherwise

setEmbeddedElement

void setEmbeddedElement(boolean embeddedElement)
                        throws ModelException
Set whether the values of the elements should be stored if possible as part of the instance instead of as their own instances in the datastore.

Parameters:
embeddedElement - true if elements should be stored as part of the instance
Throws:
ModelException - if impossible

getElementType

JavaType getElementType()
Get the type representation of the collection elements.

Returns:
the element type

setElementType

void setElementType(JavaType elementType)
                    throws ModelException
Set the type representation of the collection elements.

Parameters:
elementType - the type representation of the collection elements
Throws:
ModelException - if impossible

getElementTypeName

java.lang.String getElementTypeName()
Get the type of collection elements as string.

Returns:
the element type as string

setElementTypeName

void setElementTypeName(java.lang.String elementTypeName)
                        throws ModelException
Set string representation of the type of collection elements.

Parameters:
elementTypeName - a string representation of the type of elements in the collection.
Throws:
ModelException - if impossible


Copyright © 2005-2011 Apache Software Foundation. All Rights Reserved.