butler.ext.domain
Class DomainPrefixSchema

java.lang.Object
  extended by butler.util.BaseGroovyObjectSupport
      extended by butler.sql.metadata.Schema
          extended by butler.sql.metadata.GeneratedSchema
              extended by butler.ext.domain.DomainPrefixSchema
All Implemented Interfaces:
groovy.lang.GroovyObject

public class DomainPrefixSchema
extends GeneratedSchema

Author:
Fredrik Bertilsson

Constructor Summary
DomainPrefixSchema(java.lang.String alias, Catalog cat)
           
 
Method Summary
 Table getTable(java.lang.String name)
          Returns the table with the given name.
protected  void setDomainTable(Table tab)
           
 void upgrade()
          Upgrades every table in this schema.
 
Methods inherited from class butler.sql.metadata.GeneratedSchema
getTable, registerTableClass
 
Methods inherited from class butler.sql.metadata.Schema
addRecordListener, addTable, createTable, equals, equals, getAlias, getCatalog, getDatatype, getName, getPath, getProperty, getRecordComparator, getRecordListeners, getResourceBundleBaseName, getSchema, getTableNames, getTables, loadTables, setAlias, setCatalog, setDescriptor, setDictionaryFile, setRecordComparator, setResourceBundleBaseName, setUseName, toXML, useName
 
Methods inherited from class butler.util.BaseGroovyObjectSupport
getMetaClass, invokeMethod, setMetaClass, setProperty
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DomainPrefixSchema

public DomainPrefixSchema(java.lang.String alias,
                          Catalog cat)
Method Detail

setDomainTable

protected void setDomainTable(Table tab)
                       throws java.lang.Exception
Throws:
java.lang.Exception

upgrade

public void upgrade()
             throws java.lang.Exception
Description copied from class: Schema
Upgrades every table in this schema.

Overrides:
upgrade in class Schema
Throws:
java.lang.Exception

getTable

public Table getTable(java.lang.String name)
               throws java.lang.Exception
Description copied from class: GeneratedSchema
Returns the table with the given name. First it looks for any registered table classes and returns an instance. Otherwise the table class is expected to be in the same package as the GeneretedSchema subclass and have the name that starts with the table name and ends with the suffix "Table". The first letter should be a capital.

Overrides:
getTable in class GeneratedSchema
Throws:
java.lang.Exception