org.jooq.util
Class AbstractGeneratorStrategy

java.lang.Object
  extended by org.jooq.util.AbstractGeneratorStrategy
All Implemented Interfaces:
GeneratorStrategy
Direct Known Subclasses:
DefaultGeneratorStrategy

public abstract class AbstractGeneratorStrategy
extends Object
implements GeneratorStrategy

Common base class for convenience method abstraction

Author:
Lukas Eder

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jooq.util.GeneratorStrategy
GeneratorStrategy.Mode
 
Constructor Summary
AbstractGeneratorStrategy()
           
 
Method Summary
 File getFile(org.jooq.util.Definition definition)
           
 File getFile(org.jooq.util.Definition definition, GeneratorStrategy.Mode mode)
           
 String getFileName(org.jooq.util.Definition definition)
           
 String getFileName(org.jooq.util.Definition definition, GeneratorStrategy.Mode mode)
           
 String getFullJavaClassName(org.jooq.util.Definition definition)
           
 String getFullJavaClassName(org.jooq.util.Definition definition, GeneratorStrategy.Mode mode)
          This is the same as calling getFullJavaClassName(definition, Mode.DEFAULT)
 String getFullJavaIdentifier(org.jooq.util.Definition definition)
          This is applied to definitions that can result in singleton static and instance members.
 String getJavaClassName(org.jooq.util.Definition definition)
          This is the same as calling getJavaClassName(definition, Mode.DEFAULT)
 String getJavaGetterName(org.jooq.util.Definition definition)
          This is applied to definitions that can result in getters of a container.
 String getJavaMemberName(org.jooq.util.Definition definition)
          The "java member name" is applied where a definition is used as a member (for POJOs) or as a method argument (for setters).
 String getJavaMethodName(org.jooq.util.Definition definition)
          This is applied to definitions that can result in methods.
 String getJavaPackageName(org.jooq.util.Definition definition)
          This is the same as calling getJavaPackageName(definition, Mode.DEFAULT)
 String getJavaSetterName(org.jooq.util.Definition definition)
          This is applied to definitions that can result in setters of a container.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jooq.util.GeneratorStrategy
getInstanceFields, getJavaClassName, getJavaGetterName, getJavaIdentifier, getJavaMemberName, getJavaMethodName, getJavaPackageName, getJavaSetterName, getTargetDirectory, getTargetPackage, setInstanceFields, setTargetDirectory, setTargetPackage
 

Constructor Detail

AbstractGeneratorStrategy

public AbstractGeneratorStrategy()
Method Detail

getFileName

public final String getFileName(org.jooq.util.Definition definition)
Specified by:
getFileName in interface GeneratorStrategy
Returns:
The Java class file name representing this object, e.g. [MyTable.java]

getFileName

public final String getFileName(org.jooq.util.Definition definition,
                                GeneratorStrategy.Mode mode)
Specified by:
getFileName in interface GeneratorStrategy
Returns:
The Java class file name representing this object, e.g. [MyTableSuffix.java]

getFile

public final File getFile(org.jooq.util.Definition definition)
Specified by:
getFile in interface GeneratorStrategy
Returns:
The Java class file name representing this object, e.g. [C:\org\jooq\generated\MyTable.java]

getFile

public final File getFile(org.jooq.util.Definition definition,
                          GeneratorStrategy.Mode mode)
Specified by:
getFile in interface GeneratorStrategy
Returns:
The Java class file name representing this object, e.g. [C:\org\jooq\generated\MyTableSuffix.java]

getFullJavaIdentifier

public final String getFullJavaIdentifier(org.jooq.util.Definition definition)
Description copied from interface: GeneratorStrategy
This is applied to definitions that can result in singleton static and instance members. For instance, the singleton instance of a TableDefinition is a java identifier

Specified by:
getFullJavaIdentifier in interface GeneratorStrategy
Returns:
The Java identifier representing this object, e.g. [my_table]

getJavaSetterName

public final String getJavaSetterName(org.jooq.util.Definition definition)
Description copied from interface: GeneratorStrategy
This is applied to definitions that can result in setters of a container. For example, the definition could be a ColumnDefinition, the container a TableDefinition. Then this would apply to records and POJOs. Also, the definition could be an AttributeDefinition and the container a UDTDefinition

This is the same as calling getJavaSetterName(definition, Mode.DEFAULT)

Specified by:
getJavaSetterName in interface GeneratorStrategy
Returns:
The Java setter method name representing this object, e.g. [setMyTable]

getJavaGetterName

public final String getJavaGetterName(org.jooq.util.Definition definition)
Description copied from interface: GeneratorStrategy
This is applied to definitions that can result in getters of a container. For example, the definition could be a ColumnDefinition, the container a TableDefinition. Then this would apply to records and POJOs. Also, the definition could be an AttributeDefinition and the container a UDTDefinition

This is the same as calling getJavaGetterName(definition, Mode.DEFAULT)

Specified by:
getJavaGetterName in interface GeneratorStrategy
Returns:
The Java getter method name representing this object, e.g. [getMyTable]

getJavaMethodName

public final String getJavaMethodName(org.jooq.util.Definition definition)
Description copied from interface: GeneratorStrategy
This is applied to definitions that can result in methods. For example, the definition could be a RoutineDefinition

This is the same as calling getJavaMethodName(definition, Mode.DEFAULT)

Specified by:
getJavaMethodName in interface GeneratorStrategy
Returns:
The Java method name representing this object, e.g. [myFunction]

getJavaClassName

public final String getJavaClassName(org.jooq.util.Definition definition)
Description copied from interface: GeneratorStrategy
This is the same as calling getJavaClassName(definition, Mode.DEFAULT)

Specified by:
getJavaClassName in interface GeneratorStrategy
Returns:
The Java class name representing this object, e.g. [MyTable]

getJavaPackageName

public final String getJavaPackageName(org.jooq.util.Definition definition)
Description copied from interface: GeneratorStrategy
This is the same as calling getJavaPackageName(definition, Mode.DEFAULT)

Specified by:
getJavaPackageName in interface GeneratorStrategy
Returns:
The Java package name of this object, e.g. [org.jooq.generated]

getJavaMemberName

public final String getJavaMemberName(org.jooq.util.Definition definition)
Description copied from interface: GeneratorStrategy
The "java member name" is applied where a definition is used as a member (for POJOs) or as a method argument (for setters). Example definitions are This is the same as calling getJavaMemberName(definition, Mode.DEFAULT)

Specified by:
getJavaMemberName in interface GeneratorStrategy
Returns:
The Java class name representing this object, starting with a lower case character, e.g. [myTable]

getFullJavaClassName

public final String getFullJavaClassName(org.jooq.util.Definition definition)
Specified by:
getFullJavaClassName in interface GeneratorStrategy
Returns:
The full Java class name representing this object, e.g. [org.jooq.generated.MyTable]

getFullJavaClassName

public final String getFullJavaClassName(org.jooq.util.Definition definition,
                                         GeneratorStrategy.Mode mode)
Description copied from interface: GeneratorStrategy
This is the same as calling getFullJavaClassName(definition, Mode.DEFAULT)

Specified by:
getFullJavaClassName in interface GeneratorStrategy
Returns:
The full Java class name representing this object, e.g. [org.jooq.generated.MyTable][suffix]


Copyright © 2012. All Rights Reserved.