Class CollectionMetaData

    • Field Detail

      • element

        protected org.datanucleus.metadata.ContainerComponent element
        Representation of the element of the collection.
      • singleElement

        protected boolean singleElement
        Whether this collection handles more than one element. Some collection, e.g. java.lang.Optional, will always hold only one element.
    • Constructor Detail

      • CollectionMetaData

        public CollectionMetaData​(CollectionMetaData collmd)
        Constructor to create a copy of the passed metadata.
        Parameters:
        collmd - The metadata to copy
      • CollectionMetaData

        public CollectionMetaData()
        Default constructor. Set the fields using setters, before populate().
    • Method Detail

      • populate

        public void populate​(ClassLoaderResolver clr,
                             ClassLoader primary)
        Method to populate any defaults, and check the validity of the MetaData.
        Parameters:
        clr - ClassLoaderResolver to use for any loading operations
        primary - the primary ClassLoader to use (or null)
      • elementIsPersistent

        public boolean elementIsPersistent()
      • getElementClassMetaData

        public AbstractClassMetaData getElementClassMetaData​(ClassLoaderResolver clr)
        Convenience accessor for the Element ClassMetaData.
        Parameters:
        clr - ClassLoader resolver (in case we need to initialise it)
        Returns:
        element ClassMetaData
      • isEmbeddedElement

        public boolean isEmbeddedElement()
        Accessor for the embedded-element tag value
        Returns:
        embedded-element tag value
      • isDependentElement

        public boolean isDependentElement()
        Accessor for The dependent-element attribute indicates that the collection's element contains a reference that is to be deleted if the referring instance is deleted.
        Returns:
        dependent-element tag value
      • isSerializedElement

        public boolean isSerializedElement()
        Accessor for the serialized-element tag value
        Returns:
        serialized-element tag value
      • getElementType

        public String getElementType()
        Accessor for the element-type tag value.
        Returns:
        element-type tag value
      • getElementTypes

        public String[] getElementTypes()
      • setSerializedElement

        public CollectionMetaData setSerializedElement​(boolean serialized)
      • setDependentElement

        public CollectionMetaData setDependentElement​(boolean dependent)
      • setSingleElement

        public CollectionMetaData setSingleElement​(boolean singleElement)