de.mguennewig.pobjects.metadata
Class Module

java.lang.Object
  extended by de.mguennewig.pobjects.metadata.Module

public class Module
extends java.lang.Object

A Module is a collection of type definitions, table expressions and form declarations which belong to one JAVA Package.

Author:
Michael Günnewig

Constructor Summary
Module(java.lang.String name, java.lang.String javaPackage, TypeDecl[] types, TableExpr[] tableExprs, Workflow[] workflows, FormDecl[] forms, CommandDecl[] commands)
          Creates a new Module.
 
Method Summary
 CommandDecl getCommand(int idx)
          Returns the command declaration at index idx.
 Description getDescription()
           
 boolean getForeignOwnership()
          If true, then tables, views, and sequences of this module are not owned by this application.
 FormDecl getForm(int idx)
          Returns the form declaration at index idx.
 java.lang.String getJavaPackage()
          Returns the JAVA package name for this module.
 java.lang.String getName()
          Returns the name of this module.
 int getNumCommands()
          Returns the number of known command declarations.
 int getNumForms()
          Returns the number of known form declarations.
 int getNumTableExprs()
          Returns the number of known table expressions.
 int getNumTypeDecls()
          Returns the number of known module-global types.
 int getNumWorkflows()
          Returns the number of known workflows.
 java.lang.String getSchemaPrefix()
          Returns the schema prefix for table names from this module.
 TableExpr getTableExpr(int idx)
          Returns the table expression at index idx.
 TableExpr getTableExpr(java.lang.String tableName)
          Reutrns the table expression with the specified name.
 TypeDecl getTypeDecl(int idx)
          Returns the module-global type at index idx.
 Workflow getWorkflow(int idx)
          Returns the workflow at index idx.
 void setDescription(Description descr)
           
 void setForeignOwnership(boolean foreignOwnership)
          Set the schema prefix for table names from this module.
 void setSchemaPrefix(java.lang.String schemaPrefix)
          Set the schema prefix for table names from this module.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Module

public Module(java.lang.String name,
              java.lang.String javaPackage,
              TypeDecl[] types,
              TableExpr[] tableExprs,
              Workflow[] workflows,
              FormDecl[] forms,
              CommandDecl[] commands)
Creates a new Module.

Method Detail

getName

public final java.lang.String getName()
Returns the name of this module.


getJavaPackage

public final java.lang.String getJavaPackage()
Returns the JAVA package name for this module.


getSchemaPrefix

public final java.lang.String getSchemaPrefix()
Returns the schema prefix for table names from this module. null means to take the dictionary's prefix, the empty string means no prefix, and any other string that qualified names are build as prefix.name.


setSchemaPrefix

public void setSchemaPrefix(java.lang.String schemaPrefix)
Set the schema prefix for table names from this module.


getForeignOwnership

public final boolean getForeignOwnership()
If true, then tables, views, and sequences of this module are not owned by this application. The corresponding SQL statements to create and drop them are omitted from the DDL files. Default for this attribute is false.


setForeignOwnership

public void setForeignOwnership(boolean foreignOwnership)
Set the schema prefix for table names from this module.


getDescription

public final Description getDescription()

setDescription

public void setDescription(Description descr)

getNumCommands

public final int getNumCommands()
Returns the number of known command declarations.


getNumForms

public final int getNumForms()
Returns the number of known form declarations.


getNumTableExprs

public final int getNumTableExprs()
Returns the number of known table expressions.


getNumTypeDecls

public final int getNumTypeDecls()
Returns the number of known module-global types.


getNumWorkflows

public final int getNumWorkflows()
Returns the number of known workflows.


getCommand

public final CommandDecl getCommand(int idx)
Returns the command declaration at index idx.

Throws:
java.lang.ArrayIndexOutOfBoundsException - when the index doesn't exists.

getForm

public final FormDecl getForm(int idx)
Returns the form declaration at index idx.

Throws:
java.lang.ArrayIndexOutOfBoundsException - when the index doesn't exists.

getTableExpr

public final TableExpr getTableExpr(int idx)
Returns the table expression at index idx.

Throws:
java.lang.ArrayIndexOutOfBoundsException - when the index doesn't exists.

getTableExpr

public final TableExpr getTableExpr(java.lang.String tableName)
Reutrns the table expression with the specified name.


getTypeDecl

public final TypeDecl getTypeDecl(int idx)
Returns the module-global type at index idx.

Throws:
java.lang.ArrayIndexOutOfBoundsException - when the index doesn't exists.

getWorkflow

public final Workflow getWorkflow(int idx)
Returns the workflow at index idx.

Throws:
java.lang.ArrayIndexOutOfBoundsException - when the index doesn't exists.