Class PersistenceElementCollection


  • public class PersistenceElementCollection
    extends Object
    Version:
    %I%
    Author:
    raccah
    • Constructor Detail

      • PersistenceElementCollection

        public PersistenceElementCollection()
        Create new PersistenceElementCollection with no owner, property, or template. This constructor should only be used for cloning and archiving.
      • PersistenceElementCollection

        public PersistenceElementCollection​(PersistenceElementImpl owner,
                                            String propertyName,
                                            Object[] template)
        Creates new PersistenceElementCollection
    • Method Detail

      • getElements

        public PersistenceElement[] getElements()
        Returns the collection of elements maintained by this holder in the form of an array.
        Returns:
        the elements maintained by this collection
      • getElement

        public PersistenceElement getElement​(String name)
        Returns the element with the supplied name from the collection of elements maintained by this collection.
        Parameters:
        name - the name to match
        Returns:
        the element with the supplied name, null if none exists
      • getOwner

        public PersistenceElementImpl getOwner()
        Returns the owner of this collection. This method should only be used internally and for cloning and archiving.
        Returns:
        the owner of this collection
      • setOwner

        public void setOwner​(PersistenceElementImpl owner)
        Set the owner of this collection to the supplied implementation. This method should only be used internally and for cloning and archiving.
        Parameters:
        owner - the owner of this collection
      • getTemplate

        public Object[] getTemplate()
        Returns the template for the array of this collection. This method should only be used internally and for cloning and archiving.
        Returns:
        the typed template of this collection
      • setTemplate

        public void setTemplate​(Object[] template)
        Set the template for the array of this collection to the supplied array. This template is used so the array returned by getElements is properly typed. This method should only be used internally and for cloning and archiving.
        Parameters:
        template - the typed template of this collection
      • getPropertyName

        public String getPropertyName()
        Returns the property name of this collection. This method should only be used internally and for cloning and archiving.
        Returns:
        the property name for this collection
      • setPropertyName

        public void setPropertyName​(String propertyName)
        Set the property name of this collection to the supplied name. This name is used to generate the correct property change event on changes to the collection. This method should only be used internally and for cloning and archiving.
        Parameters:
        propertyName - the property name for this collection
      • setElements

        public void setElements​(PersistenceElement[] elements)
        Set the collection of elements maintained by this holder to the supplied array. This method should only be used internally and for cloning and archiving.
        Parameters:
        elements - the collection of elements maintained by this holder