Class PersistenceFileMetaData

  • All Implemented Interfaces:
    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 String filename
        Filename of the "persistence.xml"
    • Constructor Detail

      • PersistenceFileMetaData

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

      • getFilename

        public 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​(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​(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 String toString​(String indent)
        Returns a string representation of the object.
        Parameters:
        indent - The indent
        Returns:
        a string representation of the object.