Package org.apache.torque.templates
Enum Class TemplateOptionName
- All Implemented Interfaces:
Serializable,Comparable<TemplateOptionName>,Constable,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 1917240 2024-04-21 13:22:54Z tv $
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe database vendor.The default type for a column if no type is given.The name of the option which controls whether save methods are generated at all.The name of the option for the prefix of the adder methods.The name of the option for the suffix of the adder methods.The additional prefix of the name of the baseMapInit class.The prefix of the name of the mapInit class.The suffix of the name of the mapInit class.The default base class for dbObjects.The prefix for the name of enum types.The suffix for the name of enum types.The name of the option for the prefix of the filler methods.The name of the option for the part added to the referencing direction if naming conflicts occur.The name of the option for the suffix of the filler methods.The name of the option for the java type for the initial value of the foreign field (must not be an interface).The name of the option containing the prefix for the foreign field name of a foreign-key reference.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.The name of the option containing the suffix for the foreign field name of a foreign-key reference.The name of the option for the java type for the foreign field (can be an interface),The name of the option containing the prefix for the getter of the foreign key.The name of the option containing the suffix for the getter of the foreign key.Whether bean objects should be generated.Whether joinGetter methods are generated in the data object classes which fetch related objects in one database query.Whether the map init classes which initialize all database maps at once should be generated.The name of the option for the prefix of the initializer methods.The name of the option for the suffix of the initializer methods.The name of the option for the prefix of the initializer methods.The name of the option for the suffix of the initializer methods.The separator in the joinGetter Methods between the two name parts.The visibility of the joinGetter methods.The name of the option containing the prefix for the local field name of a foreign-key reference.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.The name of the option containing the suffix for the local field name of a foreign-key reference.The prefix of the name of the manager class.The suffix of the name of the manager class.The name of the option for the default value used in optimistic locking if no explicit default value is set.The name of the option for the mode used in optimistic locking.The base package of the OM classes.The name of the option for the prefix of the resetter methods.The name of the option for the suffix of the resetter methods.Whether to retain schema names in java names.The name of the option for the name of the exception thrown by the save methods.The name of the option which controls whether save methods are generated in the db objects (true) or in the peers (false).The name of the option for the prefix of the setAndSave methods.The name of the option for the suffix of the setAndSave methods.Whether getters for boolean fields should use "is" instead of "get" as prefix.Whether manager classes should be used.The prefix for the constraint name for enum types.The suffix for the constraint name for enum types. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckRequiredOptions(ControllerState controllerState, TemplateOptionName... requiredOptions) Checks whether all required options are set.getName()Returns the name of the option.toString()static TemplateOptionNameReturns the enum constant of this class with the specified name.static TemplateOptionName[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DATABASE
The database vendor. See the schema for possible values. -
OM_PACKAGE
The base package of the OM classes. -
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
Whether to retain schema names in java names. -
DEFAULT_TYPE
The default type for a column if no type is given. -
OM_GENERATE_BEANS
Whether bean objects should be generated. -
OM_USE_MANAGERS
Whether manager classes should be used. -
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
The default base class for dbObjects. -
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_BASE_DATABASE_MAP_INIT_CLASS_NAME_PREFIX
The additional prefix of the name of the baseMapInit class. -
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_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_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_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_FILLER_PREFIX
The name of the option for the prefix of the filler methods. -
OM_FILLER_SUFFIX
The name of the option for the suffix of the filler methods. -
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_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
The name of the option containing the prefix for the local field name of a foreign-key reference. -
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
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_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
The name of the option containing the prefix for the foreign field name of a foreign-key reference. -
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
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
The name of the option for the java type for the foreign field (can be an interface), -
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
The name of the option which controls whether save methods are generated at all. -
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
The name of the option for the name of the exception thrown by the save methods. -
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. The value must be one of selectForUpdate, simpleSelect. -
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
The separator in the joinGetter Methods between the two name parts. -
OM_JOIN_GETTER_VISIBILITY
The visibility of the joinGetter methods. -
OM_ENUM_TYPE_PREFIX
The prefix for the name of enum types. -
OM_ENUM_TYPE_SUFFIX
The suffix for the name of enum types. -
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 Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
getName
Returns the name of the option.- Specified by:
getNamein interfaceOptionName- Returns:
- the fully qualified name of the option, not null.
-
toString
- Overrides:
toStringin 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.
-