Class PersistenceFileMetaData

  • All Implemented Interfaces:
    java.io.Serializable

    public class PersistenceFileMetaData
    extends MetaData
    Representation of a Meta-Data "persistence.xml" file. Contains a set of "persistence-unit" meta-data.
    See Also:
    Serialized Form
    • Field Detail

      • filename

        protected java.lang.String filename
        Filename of the "persistence.xml"
      • persistenceUnits

        protected java.util.Set<PersistenceUnitMetaData> persistenceUnits
        Persistence units defined in this file.
    • Constructor Detail

      • PersistenceFileMetaData

        public PersistenceFileMetaData​(java.lang.String filename)
        Constructor.
        Parameters:
        filename - The file where this is stored (or null).
    • Method Detail

      • getFilename

        public java.lang.String getFilename()
        Accessor for the filename
        Returns:
        The filename of this MetaData file.
      • getNoOfPersistenceUnits

        public int getNoOfPersistenceUnits()
        Accessor for the number of persistence units.
        Returns:
        no of persistence units.
      • getPersistenceUnit

        public PersistenceUnitMetaData getPersistenceUnit​(java.lang.String name)
        Accessor for the Meta-Data of a persistence unit with a given name.
        Parameters:
        name - Name of the persistence unit
        Returns:
        Meta-Data for the persistence unit
      • getPersistenceUnits

        public PersistenceUnitMetaData[] getPersistenceUnits()
        Accessor for the persistence units in this "persistence.xml" file.
        Returns:
        The persistence units
      • setFilename

        public void setFilename​(java.lang.String filename)
        Mutator for the filename for this MetaData file.
        Parameters:
        filename - The filename of this MetaData file.
      • addPersistenceUnit

        public void addPersistenceUnit​(PersistenceUnitMetaData pumd)
        Method to add a persistence unit
        Parameters:
        pumd - The PersistenceUnitMetaData to add.
      • toString

        public java.lang.String toString​(java.lang.String indent)
        Returns a string representation of the object.
        Parameters:
        indent - The indent
        Returns:
        a string representation of the object.