Class PackageMetaData

  • All Implemented Interfaces:
    java.io.Serializable

    public class PackageMetaData
    extends MetaData
    Representation of the Meta-Data for a package.
    See Also:
    Serialized Form
    • Field Detail

      • interfaces

        protected java.util.List<InterfaceMetaData> interfaces
        List of interfaces (uses List to retain positioning).
      • classes

        protected java.util.List<ClassMetaData> classes
        List of classes (uses List to retain positioning).
      • sequences

        protected java.util.Collection<SequenceMetaData> sequences
        Sequence generators.
      • name

        protected final java.lang.String name
        Package name
      • catalog

        protected java.lang.String catalog
        Catalog name for all classes in this package
      • schema

        protected java.lang.String schema
        Schema name for all classes in this package
    • Constructor Detail

      • PackageMetaData

        PackageMetaData​(java.lang.String name)
        Constructor. Create packages using FileMetaData.newPackageMetaData()
        Parameters:
        name - Name of package
    • Method Detail

      • getFileMetaData

        public FileMetaData getFileMetaData()
        Accessor for the parent FileMetaData.
        Returns:
        File MetaData.
      • getName

        public java.lang.String getName()
        Accessor for the name of the package
        Returns:
        package name
      • getCatalog

        public java.lang.String getCatalog()
        Accessor for the catalog name for all classes in this package
        Returns:
        Catalog name to use.
      • getSchema

        public java.lang.String getSchema()
        Accessor for the schema name for all classes in this package
        Returns:
        Schema name to use.
      • getNoOfInterfaces

        public int getNoOfInterfaces()
        Accessor for the number of interfaces.
        Returns:
        Number of interfaces.
      • getInterface

        public InterfaceMetaData getInterface​(int i)
        Accessor for the Meta-Data of a interface in this package.
        Parameters:
        i - interface index
        Returns:
        Meta-Data for the interface
      • getInterface

        public InterfaceMetaData getInterface​(java.lang.String name)
        Accessor for the Meta-Data of an interface with the specified name.
        Parameters:
        name - the name of the interface
        Returns:
        Meta-Data for the interface
      • getNoOfClasses

        public int getNoOfClasses()
        Accessor for the number of classes.
        Returns:
        Number of classes.
      • getClass

        public ClassMetaData getClass​(int i)
        Accessor for the Meta-Data of a class in this package.
        Parameters:
        i - class index
        Returns:
        Meta-Data for the class
      • getClass

        public ClassMetaData getClass​(java.lang.String name)
        Accessor for the Meta-Data of a class with the specified name.
        Parameters:
        name - the name of the class
        Returns:
        Meta-Data for the class.
      • getNoOfSequences

        public int getNoOfSequences()
        Accessor for the number of sequences.
        Returns:
        Number of sequences.
      • getSequences

        public SequenceMetaData[] getSequences()
        Accessor for the Meta-Data for the sequences in this package.
        Returns:
        Meta-Data for the sequences
      • getSequence

        public SequenceMetaData getSequence​(java.lang.String name)
        Accessor for the Meta-Data of an sequence with the specified name.
        Parameters:
        name - the name of the sequence
        Returns:
        Meta-Data for the sequence
      • getNoOfTableGenerators

        public int getNoOfTableGenerators()
        Accessor for the number of table generators.
        Returns:
        Number of table generators.
      • getTableGenerators

        public TableGeneratorMetaData[] getTableGenerators()
        Accessor for the Meta-Data for the table generators in this package.
        Returns:
        Meta-Data for the table generators
      • getTableGenerator

        public TableGeneratorMetaData getTableGenerator​(java.lang.String name)
        Accessor for the Meta-Data of a table generator with the specified name.
        Parameters:
        name - the name of the table generator
        Returns:
        Meta-Data for the table generator
      • addClass

        public ClassMetaData addClass​(ClassMetaData cmd)
        Method to add a class Meta-Data to the package.
        Parameters:
        cmd - Meta-Data for the class
        Returns:
        The class metadata that was added (or already existing)
      • removeClass

        public void removeClass​(AbstractClassMetaData cmd)
        Method to remove a class from this metadata definition. This is of use where we read in metadata only to find that the class that it pertains to is not in the CLASSPATH.
        Parameters:
        cmd - Metadata for the class to remove
      • newClassMetaData

        public ClassMetaData newClassMetaData​(java.lang.String className)
        Method to create a new class metadata, add it, and return it.
        Parameters:
        className - Name of the class (in this package)
        Returns:
        The class metadata
      • addInterface

        public InterfaceMetaData addInterface​(InterfaceMetaData imd)
        Method to add a interface Meta-Data to the package.
        Parameters:
        imd - Meta-Data for the interface
        Returns:
        The interface metadata that was added (or already existing)
      • newInterfaceMetaData

        public InterfaceMetaData newInterfaceMetaData​(java.lang.String intfName)
        Method to create a new interface metadata, add it, and return it.
        Parameters:
        intfName - Name of the interface (in this package)
        Returns:
        The interface metadata
      • addSequence

        public void addSequence​(SequenceMetaData seqmd)
        Method to add a sequence Meta-Data to the package.
        Parameters:
        seqmd - Meta-Data for the sequence
      • newSequenceMetaData

        public SequenceMetaData newSequenceMetaData​(java.lang.String seqName,
                                                    java.lang.String seqStrategy)
        Method to create a new Sequence metadata, add it, and return it.
        Parameters:
        seqName - Name of the sequence
        seqStrategy - Strategy for the sequence
        Returns:
        The sequence metadata
      • addTableGenerator

        public void addTableGenerator​(TableGeneratorMetaData tabmd)
        Method to add a TableGenerator Meta-Data to the package.
        Parameters:
        tabmd - Meta-Data for the TableGenerator
      • newTableGeneratorMetaData

        public TableGeneratorMetaData newTableGeneratorMetaData​(java.lang.String name)
        Method to create a new TableGenerator metadata, add it and return it.
        Parameters:
        name - Name of the table generator
        Returns:
        The metadata
      • setCatalog

        public PackageMetaData setCatalog​(java.lang.String catalog)
      • setSchema

        public PackageMetaData setSchema​(java.lang.String schema)