Class CodegenAttributeConstants
java.lang.Object
com.metaobjects.generator.constraint.CodegenAttributeConstants
Code generation attribute constants for template-based code generation.
This class defines attribute names specific to code generation, template engines, and build-time code generation tools. These attributes are used for:
- JPA Generation Control - Controlling JPA entity generation
- Template Processing - Template-specific behavior markers
- Field Behavior - Code generation behavioral attributes
- Build-Time Generation - Maven plugin and build tool attributes
Architectural Note: Database-related attributes (dbTable, dbColumn, etc.)
are defined in
to avoid
duplication between OMDB and code generation modules.invalid reference
com.metaobjects.database.common.DatabaseAttributeConstants
- Since:
- 5.2.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringCode generation class name override attributestatic final StringCode generation package override attributestatic final StringCollection type marker attribute for MetaFieldsstatic final StringAPI generation marker attribute for MetaObjectsstatic final StringJPA generation marker attribute for MetaObjects and MetaFieldsstatic final StringTest generation marker attribute for MetaObjectsstatic final StringValidation generation marker attribute for MetaObjects and MetaFieldsstatic final StringID field marker attribute for MetaFieldsstatic final StringOptional field marker attribute for MetaFieldsstatic final StringSearchable field marker attribute for MetaFieldsstatic final StringOutput directory override for generated filesstatic final StringSkip JPA generation marker attribute for MetaObjects and MetaFieldsstatic final StringTemplate selection attribute for custom template usage -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisCodegenAttribute(String attributeName) Check if an attribute name is a code generation related attribute.static booleanisFieldBehaviorAttribute(String attributeName) Check if an attribute name is a field behavior attribute.static booleanisJpaControlAttribute(String attributeName) Check if an attribute name is a JPA generation control attribute.
-
Field Details
-
ATTR_SKIP_JPA
Skip JPA generation marker attribute for MetaObjects and MetaFields- See Also:
-
ATTR_COLLECTION
Collection type marker attribute for MetaFields- See Also:
-
ATTR_IS_SEARCHABLE
Searchable field marker attribute for MetaFields- See Also:
-
ATTR_IS_OPTIONAL
Optional field marker attribute for MetaFields- See Also:
-
ATTR_IS_ID
ID field marker attribute for MetaFields- See Also:
-
ATTR_HAS_JPA
JPA generation marker attribute for MetaObjects and MetaFields- See Also:
-
ATTR_HAS_VALIDATION
Validation generation marker attribute for MetaObjects and MetaFields- See Also:
-
ATTR_HAS_API
API generation marker attribute for MetaObjects- See Also:
-
ATTR_HAS_TESTS
Test generation marker attribute for MetaObjects- See Also:
-
ATTR_CODEGEN_PACKAGE
Code generation package override attribute- See Also:
-
ATTR_CODEGEN_CLASS_NAME
Code generation class name override attribute- See Also:
-
ATTR_TEMPLATE
Template selection attribute for custom template usage- See Also:
-
ATTR_OUTPUT_DIR
Output directory override for generated files- See Also:
-
-
Method Details
-
isCodegenAttribute
Check if an attribute name is a code generation related attribute.- Parameters:
attributeName- the attribute name to check- Returns:
- true if the attribute is code generation related
-
isJpaControlAttribute
Check if an attribute name is a JPA generation control attribute.- Parameters:
attributeName- the attribute name to check- Returns:
- true if the attribute controls JPA generation
-
isFieldBehaviorAttribute
Check if an attribute name is a field behavior attribute.- Parameters:
attributeName- the attribute name to check- Returns:
- true if the attribute defines field behavior
-