org.codehaus.mojo.appfuse.reveng
Class AppfuseReverseEngineeringDelegator

java.lang.Object
  extended by org.hibernate.cfg.reveng.DelegatingReverseEngineeringStrategy
      extended by org.codehaus.mojo.appfuse.reveng.AppfuseReverseEngineeringDelegator
All Implemented Interfaces:
org.hibernate.cfg.reveng.ReverseEngineeringStrategy

public class AppfuseReverseEngineeringDelegator
extends org.hibernate.cfg.reveng.DelegatingReverseEngineeringStrategy

This class is a sample of a reverse engineering strategy processing class. This class will add Value to all the model objects and the hbm.xml files as well as using the column name OPTIMISTIC_VERSION as the version column within the hbm.xml files.

Version:
$Id$
Author:
Scott Ryan

Field Summary
static org.apache.commons.logging.Log LOG
          A static logger for the class.
 
Constructor Summary
AppfuseReverseEngineeringDelegator(org.hibernate.cfg.reveng.ReverseEngineeringStrategy inDelegate)
          Creates a new AuroraReverseEngineeringDelegator object.
 
Method Summary
 java.lang.String getOptimisticLockColumnName(org.hibernate.cfg.reveng.TableIdentifier inTableIdentifier)
          This method is called to determine a generic column name to use for the optimistic lock or version entry.
 java.lang.String tableToClassName(org.hibernate.cfg.reveng.TableIdentifier inTableIdentifier)
          This method will add Value to the table name to create the model objects.
 
Methods inherited from class org.hibernate.cfg.reveng.DelegatingReverseEngineeringStrategy
classNameToCompositeIdName, close, columnToHibernateTypeName, columnToMetaAttributes, columnToPropertyName, configure, excludeColumn, excludeForeignKeyAsCollection, excludeForeignKeyAsManytoOne, excludeTable, foreignKeyToCollectionName, foreignKeyToEntityName, foreignKeyToManyToManyName, getForeignKeys, getPrimaryKeyColumnNames, getSchemaSelections, getTableIdentifierProperties, getTableIdentifierStrategyName, isForeignKeyCollectionInverse, isForeignKeyCollectionLazy, isManyToManyTable, setSettings, tableToCompositeIdName, tableToIdentifierPropertyName, tableToMetaAttributes, useColumnForOptimisticLock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

public static final org.apache.commons.logging.Log LOG
A static logger for the class.

Constructor Detail

AppfuseReverseEngineeringDelegator

public AppfuseReverseEngineeringDelegator(org.hibernate.cfg.reveng.ReverseEngineeringStrategy inDelegate)
Creates a new AuroraReverseEngineeringDelegator object.

Parameters:
inDelegate - A delegat for this object.
Method Detail

tableToClassName

public java.lang.String tableToClassName(org.hibernate.cfg.reveng.TableIdentifier inTableIdentifier)
This method will add Value to the table name to create the model objects.

Specified by:
tableToClassName in interface org.hibernate.cfg.reveng.ReverseEngineeringStrategy
Overrides:
tableToClassName in class org.hibernate.cfg.reveng.DelegatingReverseEngineeringStrategy
Parameters:
inTableIdentifier - The table name that is being processed.
Returns:
The class name to use for the model and hbm file for this table. It consists of the table name appended with Value. So for table USER_DATA the model object created would be UserDataValue.

getOptimisticLockColumnName

public java.lang.String getOptimisticLockColumnName(org.hibernate.cfg.reveng.TableIdentifier inTableIdentifier)
This method is called to determine a generic column name to use for the optimistic lock or version entry.

Specified by:
getOptimisticLockColumnName in interface org.hibernate.cfg.reveng.ReverseEngineeringStrategy
Overrides:
getOptimisticLockColumnName in class org.hibernate.cfg.reveng.DelegatingReverseEngineeringStrategy
Parameters:
inTableIdentifier - The Table identifier to locate the optimistic column name for.
Returns:
The value of the optimistic lock column name for the requested table.


Copyright © 2006-2009. All Rights Reserved.