Package org.apache.torque.templates
Enum TemplateOptionName
- java.lang.Object
-
- java.lang.Enum<TemplateOptionName>
-
- org.apache.torque.templates.TemplateOptionName
-
- All Implemented Interfaces:
Serializable
,Comparable<TemplateOptionName>
,OptionName
public enum TemplateOptionName extends Enum<TemplateOptionName> implements OptionName
The option names which are used in the java code of the templates. Other options may exist which are not used in the java code of the templates. $Id: TemplateOptionName.java 1869103 2019-10-29 09:25:21Z gk $
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DATABASE
The database vendor.DEFAULT_TYPE
The default type for a column if no type is given.OM_ADD_SAVE_METHODS
The name of the option which controls whether save methods are generated at all.OM_ADDER_PREFIX
The name of the option for the prefix of the adder methods.OM_ADDER_SUFFIX
The name of the option for the suffix of the adder methods.OM_BASE_DATABASE_MAP_INIT_CLASS_NAME_PREFIX
The additional prefix of the name of the baseMapInit class.OM_DATABASE_MAP_INIT_CLASS_NAME_PREFIX
The prefix of the name of the mapInit class.OM_DATABASE_MAP_INIT_CLASS_NAME_SUFFIX
The suffix of the name of the mapInit class.OM_DB_OBJECT_DEFAULT_BASE_CLASS
The default base class for dbObjects.OM_ENUM_TYPE_PREFIX
The prefix for the name of enum types.OM_ENUM_TYPE_SUFFIX
The suffix for the name of enum types.OM_FILLER_PREFIX
The name of the option for the prefix of the filler methods.OM_FILLER_REFERENCING_DISTICTION
The name of the option for the part added to the referencing direction if naming conflicts occur.OM_FILLER_SUFFIX
The name of the option for the suffix of the filler methods.OM_FOREIGN_FIELD_INIT_TYPE
The name of the option for the java type for the initial value of the foreign field (must not be an interface).OM_FOREIGN_FIELD_NAME_PREFIX
The name of the option containing the prefix for the foreign field name of a foreign-key reference.OM_FOREIGN_FIELD_NAME_RELATED_BY
The name of the option for the part between referenced table name and referencing column name (only used if the same local table is referenced several times) as used in the foreign field name.OM_FOREIGN_FIELD_NAME_SUFFIX
The name of the option containing the suffix for the foreign field name of a foreign-key reference.OM_FOREIGN_FIELD_TYPE
The name of the option for the java type for the foreign field (can be an interface),OM_FOREIGN_KEY_GETTER_PREFIX
The name of the option containing the prefix for the getter of the foreign key.OM_FOREIGN_KEY_GETTER_SUFFIX
The name of the option containing the suffix for the getter of the foreign key.OM_GENERATE_BEANS
Whether bean objects should be generated.OM_GENERATE_JOIN_GETTERS
Whether joinGetter methods are generated in the data object classes which fetch related objects in one database query.OM_GENERATE_MAP_INIT
Whether the map init classes which initialize all database maps at once should be generated.OM_INITIALIZER_PREFIX
The name of the option for the prefix of the initializer methods.OM_INITIALIZER_SUFFIX
The name of the option for the suffix of the initializer methods.OM_IS_INITIALIZED_PREFIX
The name of the option for the prefix of the initializer methods.OM_IS_INITIALIZED_SUFFIX
The name of the option for the suffix of the initializer methods.OM_JOIN_GETTER_SEPARATOR
The separator in the joinGetter Methods between the two name parts.OM_JOIN_GETTER_VISIBILITY
The visibility of the joinGetter methods.OM_LOCAL_FIELD_NAME_PREFIX
The name of the option containing the prefix for the local field name of a foreign-key reference.OM_LOCAL_FIELD_NAME_RELATED_BY
The name of the option for the part between referenced table name and referencing column name (only used if the same foreign table is referenced several times) as used in the local field name.OM_LOCAL_FIELD_NAME_SUFFIX
The name of the option containing the suffix for the local field name of a foreign-key reference.OM_MANAGER_CLASS_NAME_PREFIX
The prefix of the name of the manager class.OM_MANAGER_CLASS_NAME_SUFFIX
The suffix of the name of the manager class.OM_OPTIMISTIC_LOCKING_DEFAULT_VALUE
The name of the option for the default value used in optimistic locking if no explicit default value is set.OM_OPTIMISTIC_LOCKING_MODE
The name of the option for the mode used in optimistic locking.OM_PACKAGE
The base package of the OM classes.OM_RESETTER_PREFIX
The name of the option for the prefix of the resetter methods.OM_RESETTER_SUFFIX
The name of the option for the suffix of the resetter methods.OM_RETAIN_SCHEMA_NAMES_IN_JAVA_NAME
Whether to retain schema names in java names.OM_SAVE_EXCEPTION
The name of the option for the name of the exception thrown by the save methods.OM_SAVE_METHODS_IN_DB_OBJECTS
The name of the option which controls whether save methods are generated in the db objects (true) or in the peers (false).OM_SET_AND_SAVE_PREFIX
The name of the option for the prefix of the setAndSave methods.OM_SET_AND_SAVE_SUFFIX
The name of the option for the suffix of the setAndSave methods.OM_USE_IS_FOR_BOOLEAN_GETTERS
Whether getters for boolean fields should use "is" instead of "get" as prefix.OM_USE_MANAGERS
Whether manager classes should be used.SQL_ENUM_CONSTRAINT_NAME_PREFIX
The prefix for the constraint name for enum types.SQL_ENUM_CONSTRAINT_NAME_SUFFIX
The suffix for the constraint name for enum types.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
checkRequiredOptions(ControllerState controllerState, TemplateOptionName... requiredOptions)
Checks whether all required options are set.String
getName()
Returns the name of the option.String
toString()
static TemplateOptionName
valueOf(String name)
Returns the enum constant of this type with the specified name.static TemplateOptionName[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DATABASE
public static final TemplateOptionName DATABASE
The database vendor. See the schema for possible values.
-
OM_PACKAGE
public static final TemplateOptionName OM_PACKAGE
The base package of the OM classes.
-
OM_USE_IS_FOR_BOOLEAN_GETTERS
public static final TemplateOptionName OM_USE_IS_FOR_BOOLEAN_GETTERS
Whether getters for boolean fields should use "is" instead of "get" as prefix.
-
OM_RETAIN_SCHEMA_NAMES_IN_JAVA_NAME
public static final TemplateOptionName OM_RETAIN_SCHEMA_NAMES_IN_JAVA_NAME
Whether to retain schema names in java names.
-
DEFAULT_TYPE
public static final TemplateOptionName DEFAULT_TYPE
The default type for a column if no type is given.
-
OM_GENERATE_BEANS
public static final TemplateOptionName OM_GENERATE_BEANS
Whether bean objects should be generated.
-
OM_USE_MANAGERS
public static final TemplateOptionName OM_USE_MANAGERS
Whether manager classes should be used.
-
OM_GENERATE_MAP_INIT
public static final TemplateOptionName OM_GENERATE_MAP_INIT
Whether the map init classes which initialize all database maps at once should be generated.
-
OM_DB_OBJECT_DEFAULT_BASE_CLASS
public static final TemplateOptionName OM_DB_OBJECT_DEFAULT_BASE_CLASS
The default base class for dbObjects.
-
OM_DATABASE_MAP_INIT_CLASS_NAME_PREFIX
public static final TemplateOptionName OM_DATABASE_MAP_INIT_CLASS_NAME_PREFIX
The prefix of the name of the mapInit class.
-
OM_DATABASE_MAP_INIT_CLASS_NAME_SUFFIX
public static final TemplateOptionName OM_DATABASE_MAP_INIT_CLASS_NAME_SUFFIX
The suffix of the name of the mapInit class.
-
OM_BASE_DATABASE_MAP_INIT_CLASS_NAME_PREFIX
public static final TemplateOptionName OM_BASE_DATABASE_MAP_INIT_CLASS_NAME_PREFIX
The additional prefix of the name of the baseMapInit class.
-
OM_MANAGER_CLASS_NAME_PREFIX
public static final TemplateOptionName OM_MANAGER_CLASS_NAME_PREFIX
The prefix of the name of the manager class.
-
OM_MANAGER_CLASS_NAME_SUFFIX
public static final TemplateOptionName OM_MANAGER_CLASS_NAME_SUFFIX
The suffix of the name of the manager class.
-
OM_ADDER_PREFIX
public static final TemplateOptionName OM_ADDER_PREFIX
The name of the option for the prefix of the adder methods.
-
OM_ADDER_SUFFIX
public static final TemplateOptionName OM_ADDER_SUFFIX
The name of the option for the suffix of the adder methods.
-
OM_RESETTER_PREFIX
public static final TemplateOptionName OM_RESETTER_PREFIX
The name of the option for the prefix of the resetter methods.
-
OM_RESETTER_SUFFIX
public static final TemplateOptionName OM_RESETTER_SUFFIX
The name of the option for the suffix of the resetter methods.
-
OM_INITIALIZER_PREFIX
public static final TemplateOptionName OM_INITIALIZER_PREFIX
The name of the option for the prefix of the initializer methods.
-
OM_INITIALIZER_SUFFIX
public static final TemplateOptionName OM_INITIALIZER_SUFFIX
The name of the option for the suffix of the initializer methods.
-
OM_IS_INITIALIZED_PREFIX
public static final TemplateOptionName OM_IS_INITIALIZED_PREFIX
The name of the option for the prefix of the initializer methods.
-
OM_IS_INITIALIZED_SUFFIX
public static final TemplateOptionName OM_IS_INITIALIZED_SUFFIX
The name of the option for the suffix of the initializer methods.
-
OM_FILLER_PREFIX
public static final TemplateOptionName OM_FILLER_PREFIX
The name of the option for the prefix of the filler methods.
-
OM_FILLER_SUFFIX
public static final TemplateOptionName OM_FILLER_SUFFIX
The name of the option for the suffix of the filler methods.
-
OM_SET_AND_SAVE_PREFIX
public static final TemplateOptionName OM_SET_AND_SAVE_PREFIX
The name of the option for the prefix of the setAndSave methods.
-
OM_SET_AND_SAVE_SUFFIX
public static final TemplateOptionName OM_SET_AND_SAVE_SUFFIX
The name of the option for the suffix of the setAndSave methods.
-
OM_FILLER_REFERENCING_DISTICTION
public static final TemplateOptionName OM_FILLER_REFERENCING_DISTICTION
The name of the option for the part added to the referencing direction if naming conflicts occur.
-
OM_LOCAL_FIELD_NAME_PREFIX
public static final TemplateOptionName OM_LOCAL_FIELD_NAME_PREFIX
The name of the option containing the prefix for the local field name of a foreign-key reference.
-
OM_LOCAL_FIELD_NAME_SUFFIX
public static final TemplateOptionName OM_LOCAL_FIELD_NAME_SUFFIX
The name of the option containing the suffix for the local field name of a foreign-key reference.
-
OM_FOREIGN_KEY_GETTER_PREFIX
public static final TemplateOptionName OM_FOREIGN_KEY_GETTER_PREFIX
The name of the option containing the prefix for the getter of the foreign key.
-
OM_FOREIGN_KEY_GETTER_SUFFIX
public static final TemplateOptionName OM_FOREIGN_KEY_GETTER_SUFFIX
The name of the option containing the suffix for the getter of the foreign key.
-
OM_LOCAL_FIELD_NAME_RELATED_BY
public static final TemplateOptionName OM_LOCAL_FIELD_NAME_RELATED_BY
The name of the option for the part between referenced table name and referencing column name (only used if the same foreign table is referenced several times) as used in the local field name.
-
OM_FOREIGN_FIELD_NAME_PREFIX
public static final TemplateOptionName OM_FOREIGN_FIELD_NAME_PREFIX
The name of the option containing the prefix for the foreign field name of a foreign-key reference.
-
OM_FOREIGN_FIELD_NAME_SUFFIX
public static final TemplateOptionName OM_FOREIGN_FIELD_NAME_SUFFIX
The name of the option containing the suffix for the foreign field name of a foreign-key reference.
-
OM_FOREIGN_FIELD_NAME_RELATED_BY
public static final TemplateOptionName OM_FOREIGN_FIELD_NAME_RELATED_BY
The name of the option for the part between referenced table name and referencing column name (only used if the same local table is referenced several times) as used in the foreign field name.
-
OM_FOREIGN_FIELD_TYPE
public static final TemplateOptionName OM_FOREIGN_FIELD_TYPE
The name of the option for the java type for the foreign field (can be an interface),
-
OM_FOREIGN_FIELD_INIT_TYPE
public static final TemplateOptionName OM_FOREIGN_FIELD_INIT_TYPE
The name of the option for the java type for the initial value of the foreign field (must not be an interface).
-
OM_ADD_SAVE_METHODS
public static final TemplateOptionName OM_ADD_SAVE_METHODS
The name of the option which controls whether save methods are generated at all.
-
OM_SAVE_METHODS_IN_DB_OBJECTS
public static final TemplateOptionName OM_SAVE_METHODS_IN_DB_OBJECTS
The name of the option which controls whether save methods are generated in the db objects (true) or in the peers (false).
-
OM_SAVE_EXCEPTION
public static final TemplateOptionName OM_SAVE_EXCEPTION
The name of the option for the name of the exception thrown by the save methods.
-
OM_OPTIMISTIC_LOCKING_DEFAULT_VALUE
public static final TemplateOptionName OM_OPTIMISTIC_LOCKING_DEFAULT_VALUE
The name of the option for the default value used in optimistic locking if no explicit default value is set.
-
OM_OPTIMISTIC_LOCKING_MODE
public static final TemplateOptionName OM_OPTIMISTIC_LOCKING_MODE
The name of the option for the mode used in optimistic locking. The value must be one of selectForUpdate, simpleSelect.
-
OM_GENERATE_JOIN_GETTERS
public static final TemplateOptionName OM_GENERATE_JOIN_GETTERS
Whether joinGetter methods are generated in the data object classes which fetch related objects in one database query.
-
OM_JOIN_GETTER_SEPARATOR
public static final TemplateOptionName OM_JOIN_GETTER_SEPARATOR
The separator in the joinGetter Methods between the two name parts.
-
OM_JOIN_GETTER_VISIBILITY
public static final TemplateOptionName OM_JOIN_GETTER_VISIBILITY
The visibility of the joinGetter methods.
-
OM_ENUM_TYPE_PREFIX
public static final TemplateOptionName OM_ENUM_TYPE_PREFIX
The prefix for the name of enum types.
-
OM_ENUM_TYPE_SUFFIX
public static final TemplateOptionName OM_ENUM_TYPE_SUFFIX
The suffix for the name of enum types.
-
SQL_ENUM_CONSTRAINT_NAME_PREFIX
public static final TemplateOptionName SQL_ENUM_CONSTRAINT_NAME_PREFIX
The prefix for the constraint name for enum types.
-
SQL_ENUM_CONSTRAINT_NAME_SUFFIX
public static final TemplateOptionName SQL_ENUM_CONSTRAINT_NAME_SUFFIX
The suffix for the constraint name for enum types.
-
-
Method Detail
-
values
public static TemplateOptionName[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TemplateOptionName c : TemplateOptionName.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TemplateOptionName valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getName
public String getName()
Returns the name of the option.- Specified by:
getName
in interfaceOptionName
- Returns:
- the fully qualified name of the option, not null.
-
toString
public String toString()
- Overrides:
toString
in classEnum<TemplateOptionName>
-
checkRequiredOptions
public static void checkRequiredOptions(ControllerState controllerState, TemplateOptionName... requiredOptions) throws SourceTransformerException
Checks whether all required options are set.- Parameters:
controllerState
- the current controller state, not null.requiredOptions
- the required options to check, not null.- Throws:
SourceTransformerException
- if a required option is not set.
-
-