org.hibernate.cfg.reveng
Class ReverseEngineeringSettings

java.lang.Object
  extended by org.hibernate.cfg.reveng.ReverseEngineeringSettings

public class ReverseEngineeringSettings
extends Object


Constructor Summary
ReverseEngineeringSettings(ReverseEngineeringStrategy rootStrategy)
           
 
Method Summary
 boolean createCollectionForForeignKey()
          if true, a collection will be mapped for each foreignkey
 boolean createManyToOneForForeignKey()
          if true, a many-to-one association will be created for each foreignkey found
 String getDefaultPackageName()
          return the default packageName.
 boolean getDetectManyToMany()
           
 boolean getDetectOneToOne()
           
 boolean getDetectOptimsticLock()
          If true, reverse engineering strategy will try and autodetect columns for optimistc locking, e.g.
 ReverseEngineeringStrategy getRootStrategy()
          return the top/root strategy.
 ReverseEngineeringSettings setCreateCollectionForForeignKey(boolean createCollectionForForeignKey)
           
 ReverseEngineeringSettings setCreateManyToOneForForeignKey(boolean createManyToOneForForeignKey)
           
 ReverseEngineeringSettings setDefaultPackageName(String defaultPackageName)
           
 ReverseEngineeringSettings setDetectManyToMany(boolean b)
           
 ReverseEngineeringSettings setDetectOneToOne(boolean b)
           
 ReverseEngineeringSettings setDetectOptimisticLock(boolean optimisticLockSupportEnabled)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReverseEngineeringSettings

public ReverseEngineeringSettings(ReverseEngineeringStrategy rootStrategy)
Method Detail

setDefaultPackageName

public ReverseEngineeringSettings setDefaultPackageName(String defaultPackageName)

getDefaultPackageName

public String getDefaultPackageName()
return the default packageName. Never null, at least the empty string


getDetectOptimsticLock

public boolean getDetectOptimsticLock()
If true, reverse engineering strategy will try and autodetect columns for optimistc locking, e.g. VERSION and TIMESTAMP


setDetectOptimisticLock

public ReverseEngineeringSettings setDetectOptimisticLock(boolean optimisticLockSupportEnabled)

createCollectionForForeignKey

public boolean createCollectionForForeignKey()
if true, a collection will be mapped for each foreignkey


setCreateCollectionForForeignKey

public ReverseEngineeringSettings setCreateCollectionForForeignKey(boolean createCollectionForForeignKey)

createManyToOneForForeignKey

public boolean createManyToOneForForeignKey()
if true, a many-to-one association will be created for each foreignkey found


setCreateManyToOneForForeignKey

public ReverseEngineeringSettings setCreateManyToOneForForeignKey(boolean createManyToOneForForeignKey)

setDetectManyToMany

public ReverseEngineeringSettings setDetectManyToMany(boolean b)

getDetectManyToMany

public boolean getDetectManyToMany()

setDetectOneToOne

public ReverseEngineeringSettings setDetectOneToOne(boolean b)

getDetectOneToOne

public boolean getDetectOneToOne()

getRootStrategy

public ReverseEngineeringStrategy getRootStrategy()
return the top/root strategy. Allows a lower strategy to ask another question. Be aware of possible recursive loops; e.g. do not call the root.tableToClassName in tableToClassName of a custom reversengineeringstrategy.