EXPERIMENTAL Provides a set of classes to store metadata about data object types and the database schema used to persist data objects.
When the system starts up, the persistence layer reads the PDL files into an Abstract Syntax Tree using the files within {@link com.arsdigita.persistence.pdl.ast}. The Abstract Syntax Tree then populates the classes within this package. These classes are then used by the operational persistence layer (the classes within the {@link com.arsdigita.persistence} package) to perform the standard operations.
Every item that can be represented in PDL extends the {@link com.arsdigita.persistence.metadata.Element} class. This class stores general information about object models and is able to output itself in the form of a PDL file.
The metadata is divided into {@link com.arsdigita.persistence.metadata.Model}s. These models act as the namespace for all of the metadata information (such as object types, data queries, and data operations). The model itself is composed of {@link com.arsdigita.persistence.metadata.ModelElement}s. These elements are what make up the model.
There are three types of ModelElements: {@link com.arsdigita.persistence.metadata.Association}, {@link com.arsdigita.persistence.metadata.DataOperationType}, and {@link com.arsdigita.persistence.metadata.DataType}. The Association model type holds information for associations between object types. DataOperationTypes contain Operations and potentially mappings outlining how the results of the operation should be returned. Finally, DataTypes contain both CompoundTypes and SimpleTypes.
{@link com.arsdigita.persistence.metadata.SimpleType}s are used to represent the primitive DataTypes that the persistence layer knows how to store. For instance, there are SimpleTypes for BigDecimal, Integer, Date, and String as well as many others. These are used for describing Properties as well as Attributes defined within MAP blocks.
A {@link com.arsdigita.persistence.metadata.CompoundType} can either be a {@link com.arsdigita.persistence.metadata.ObjectType} or a {@link com.arsdigita.persistence.metadata.QueryType}. ObjectTypes provide specific access special events that act on rows within the tables. Each {@link com.arsdigita.persistence.DataObject} contains a single ObjectType and that ObjectType is what contains references to the events allowing the user to easily manipulate data within the database. An ObjectType is made up of Attributes (columns in the database), Associations (mappings between database tables), and Events (SQL statements that dictate how information is stored and retrieved within the database.
A QueryType is composed of a set of Operations and Mappings that allow the user to retrieve arbitrary information from the database.
The final section of the Metadata class is the collection of classes that automatically generate and persist events for object types. Specifically, {@link com.arsdigita.persistence.metadata.MDSQLGenerator} is used to automatically generate events for Object Types. {@link com.arsdigita.persistence.metadata.DynamicObjectType} allows developers to create their own object types and {@link com.arsdigita.persistence.metadata.DDLGenerator} generates the tables to store information for these new object types.