javax.jdo.metadata
Interface PackageMetadata

All Superinterfaces:
Metadata

public interface PackageMetadata
extends Metadata

Represents a package within a JDOMetadata.

Since:
3.0

Method Summary
 java.lang.String getCatalog()
          Accessor for the catalog (ORM) that all classes in this package default to.
 ClassMetadata[] getClasses()
          Accessor for all classes defined in this package.
 InterfaceMetadata[] getInterfaces()
          Accessor for all interfaces defined in this package.
 java.lang.String getName()
          Accessor for the name of this package (set on construction).
 int getNumberOfClasses()
          Accessor for the number of classes defined in this package.
 int getNumberOfInterfaces()
          Accessor for the number of interfaces defined in this package.
 int getNumberOfSequences()
          Accessor for the number of sequences defined for this package.
 java.lang.String getSchema()
          Accessor for the schema (ORM) that all classes in this package default to.
 SequenceMetadata[] getSequences()
          Accessor for any sequences defined on the package.
 ClassMetadata newClassMetadata(java.lang.Class cls)
          Add a new class to this package.
 ClassMetadata newClassMetadata(java.lang.String name)
          Add a new class to this package.
 InterfaceMetadata newInterfaceMetadata(java.lang.Class cls)
          Add a new interface to this package.
 InterfaceMetadata newInterfaceMetadata(java.lang.String name)
          Add a new interface to this package.
 SequenceMetadata newSequenceMetadata(java.lang.String name, SequenceStrategy strategy)
          Add a new sequence to this package.
 PackageMetadata setCatalog(java.lang.String catalog)
          Method to set the catalog (ORM) to apply to all classes in this package.
 PackageMetadata setSchema(java.lang.String schema)
          Method to set the schema (ORM) to apply to all classes in this package.
 
Methods inherited from interface javax.jdo.metadata.Metadata
getExtensions, getNumberOfExtensions, getParent, newExtensionMetadata
 

Method Detail

getName

java.lang.String getName()
Accessor for the name of this package (set on construction).

Returns:
The name

setCatalog

PackageMetadata setCatalog(java.lang.String catalog)
Method to set the catalog (ORM) to apply to all classes in this package.

Parameters:
catalog - Catalog name

getCatalog

java.lang.String getCatalog()
Accessor for the catalog (ORM) that all classes in this package default to.

Returns:
The catalog

setSchema

PackageMetadata setSchema(java.lang.String schema)
Method to set the schema (ORM) to apply to all classes in this package.

Parameters:
schema - Schema name

getSchema

java.lang.String getSchema()
Accessor for the schema (ORM) that all classes in this package default to.

Returns:
The schema

getClasses

ClassMetadata[] getClasses()
Accessor for all classes defined in this package.

Returns:
The classes

newClassMetadata

ClassMetadata newClassMetadata(java.lang.String name)
Add a new class to this package.

Parameters:
name - Name of the class
Returns:
The ClassMetadata

newClassMetadata

ClassMetadata newClassMetadata(java.lang.Class cls)
Add a new class to this package.

Parameters:
cls - The class
Returns:
The ClassMetadata

getNumberOfClasses

int getNumberOfClasses()
Accessor for the number of classes defined in this package.

Returns:
The number of classes.

getInterfaces

InterfaceMetadata[] getInterfaces()
Accessor for all interfaces defined in this package.

Returns:
The interfaces

newInterfaceMetadata

InterfaceMetadata newInterfaceMetadata(java.lang.String name)
Add a new interface to this package.

Parameters:
name - The interface name
Returns:
The InterfaceMetadata

newInterfaceMetadata

InterfaceMetadata newInterfaceMetadata(java.lang.Class cls)
Add a new interface to this package.

Parameters:
cls - The class
Returns:
The ClassMetadata

getNumberOfInterfaces

int getNumberOfInterfaces()
Accessor for the number of interfaces defined in this package.

Returns:
The number of interfaces.

getSequences

SequenceMetadata[] getSequences()
Accessor for any sequences defined on the package.

Returns:
The sequences

newSequenceMetadata

SequenceMetadata newSequenceMetadata(java.lang.String name,
                                     SequenceStrategy strategy)
Add a new sequence to this package.

Parameters:
name - Name of the sequence
strategy - Strategy for the sequence
Returns:
The SequenceMetadata

getNumberOfSequences

int getNumberOfSequences()
Accessor for the number of sequences defined for this package.

Returns:
The number of sequences.


Copyright © 2005-2010 Apache Software Foundation. All Rights Reserved.