org.apache.jdo.impl.model.jdo
Class JDOCollectionImplDynamic

java.lang.Object
  extended byorg.apache.jdo.impl.model.jdo.JDOElementImpl
      extended byorg.apache.jdo.impl.model.jdo.JDORelationshipImpl
          extended byorg.apache.jdo.impl.model.jdo.JDOCollectionImplDynamic
All Implemented Interfaces:
JDOCollection, JDOElement, JDORelationship
Direct Known Subclasses:
JDOCollectionImplCaching

public class JDOCollectionImplDynamic
extends JDORelationshipImpl
implements JDOCollection

An instance of this class represents the JDO relationship metadata of a collection relationship field. This dynamic implementation only stores property values explicitly set by setter method.

Since:
1.1
Version:
1.1
Author:
Michael Bouschen

Field Summary
protected  JavaType elementType
          Property elementType.
private  java.lang.String elementTypeName
          Property elementTypeName.
protected  java.lang.Boolean embeddedElement
          Property embeddedElement.
private static I18NHelper msg
          I18N support
 
Fields inherited from class org.apache.jdo.impl.model.jdo.JDORelationshipImpl
 
Fields inherited from class org.apache.jdo.impl.model.jdo.JDOElementImpl
 
Fields inherited from interface org.apache.jdo.model.jdo.JDORelationship
CARDINALITY_N, CARDINALITY_ONE, CARDINALITY_ZERO
 
Constructor Summary
JDOCollectionImplDynamic()
           
 
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 class org.apache.jdo.impl.model.jdo.JDORelationshipImpl
getDeclaringField, getInverseRelationship, getLowerBound, getUpperBound, setDeclaringField, setInverseRelationship, setLowerBound, setUpperBound
 
Methods inherited from class org.apache.jdo.impl.model.jdo.JDOElementImpl
addPropertyChangeListener, addVetoableChangeListener, createJDOExtension, firePropertyChange, fireVetoableChange, getJDOExtensions, removeJDOExtension, removePropertyChangeListener, removeVetoableChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
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
 

Field Detail

embeddedElement

protected java.lang.Boolean embeddedElement
Property embeddedElement.


elementType

protected transient JavaType elementType
Property elementType.


elementTypeName

private java.lang.String elementTypeName
Property elementTypeName. Defaults to java.lang.Object.


msg

private static final I18NHelper msg
I18N support

Constructor Detail

JDOCollectionImplDynamic

public JDOCollectionImplDynamic()
Method Detail

isEmbeddedElement

public 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.

Specified by:
isEmbeddedElement in interface JDOCollection
Returns:
true if the elements should be stored as part of the instance; false otherwise

setEmbeddedElement

public 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.

Specified by:
setEmbeddedElement in interface JDOCollection
Parameters:
embeddedElement - true if elements should be stored as part of the instance

getElementType

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

Specified by:
getElementType in interface JDOCollection
Returns:
the element type

setElementType

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

Specified by:
setElementType in interface JDOCollection
Parameters:
elementType - the type representation of the collection elements

getElementTypeName

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

Specified by:
getElementTypeName in interface JDOCollection
Returns:
the element type as string

setElementTypeName

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

Specified by:
setElementTypeName in interface JDOCollection
Parameters:
elementTypeName - a string representation of the type of elements in the collection.