Class CodegenAttributeConstants

java.lang.Object
com.metaobjects.generator.constraint.CodegenAttributeConstants

public final class CodegenAttributeConstants extends Object
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

invalid reference
com.metaobjects.database.common.DatabaseAttributeConstants
to avoid duplication between OMDB and code generation modules.

Since:
5.2.0
  • Field Details

    • ATTR_SKIP_JPA

      public static final String ATTR_SKIP_JPA
      Skip JPA generation marker attribute for MetaObjects and MetaFields
      See Also:
    • ATTR_COLLECTION

      public static final String ATTR_COLLECTION
      Collection type marker attribute for MetaFields
      See Also:
    • ATTR_IS_SEARCHABLE

      public static final String ATTR_IS_SEARCHABLE
      Searchable field marker attribute for MetaFields
      See Also:
    • ATTR_IS_OPTIONAL

      public static final String ATTR_IS_OPTIONAL
      Optional field marker attribute for MetaFields
      See Also:
    • ATTR_IS_ID

      public static final String ATTR_IS_ID
      ID field marker attribute for MetaFields
      See Also:
    • ATTR_HAS_JPA

      public static final String ATTR_HAS_JPA
      JPA generation marker attribute for MetaObjects and MetaFields
      See Also:
    • ATTR_HAS_VALIDATION

      public static final String ATTR_HAS_VALIDATION
      Validation generation marker attribute for MetaObjects and MetaFields
      See Also:
    • ATTR_HAS_API

      public static final String ATTR_HAS_API
      API generation marker attribute for MetaObjects
      See Also:
    • ATTR_HAS_TESTS

      public static final String ATTR_HAS_TESTS
      Test generation marker attribute for MetaObjects
      See Also:
    • ATTR_CODEGEN_PACKAGE

      public static final String ATTR_CODEGEN_PACKAGE
      Code generation package override attribute
      See Also:
    • ATTR_CODEGEN_CLASS_NAME

      public static final String ATTR_CODEGEN_CLASS_NAME
      Code generation class name override attribute
      See Also:
    • ATTR_TEMPLATE

      public static final String ATTR_TEMPLATE
      Template selection attribute for custom template usage
      See Also:
    • ATTR_OUTPUT_DIR

      public static final String ATTR_OUTPUT_DIR
      Output directory override for generated files
      See Also:
  • Method Details

    • isCodegenAttribute

      public static boolean isCodegenAttribute(String attributeName)
      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

      public static boolean isJpaControlAttribute(String attributeName)
      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

      public static boolean isFieldBehaviorAttribute(String attributeName)
      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