Class DbColumnSpec

java.lang.Object
io.github.mmm.orm.ddl.DbElement
io.github.mmm.orm.ddl.DbColumnSpec

public class DbColumnSpec extends DbElement
DbElement for a database column.
  • Field Details

  • Constructor Details

    • DbColumnSpec

      public DbColumnSpec(io.github.mmm.property.ReadableProperty<?> property)
      The constructor.
      Parameters:
      property - the property.
    • DbColumnSpec

      public DbColumnSpec(io.github.mmm.property.ReadableProperty<?> property, DbTableSpec table)
      The constructor.
      Parameters:
      property - the property.
      table - the table.
    • DbColumnSpec

      public DbColumnSpec(String name, io.github.mmm.property.ReadableProperty<?> property, DbTableSpec table)
      The constructor.
      Parameters:
      name - the name.
      property - the property.
      table - the table.
    • DbColumnSpec

      public DbColumnSpec(String name, io.github.mmm.property.ReadableProperty<?> property, DbTableSpec table, String declaration)
      The constructor.
      Parameters:
      name - the name.
      property - the property.
      table - the table.
      declaration - the explicit column declaration (database specific).
  • Method Details

    • getProperty

      public io.github.mmm.property.ReadableProperty<?> getProperty()
      Returns:
      the associated property represented as column.
    • getTable

      public DbTableSpec getTable()
      Returns:
      the DbTableSpec owning this column.
    • getDeclaration

      public String getDeclaration()
      Returns:
      the column declaration (type). Typically null to derive it automatically from the property type.
    • createName

      public String createName(DbNamingStrategy namingStrategy)
      Specified by:
      createName in class DbElement
      Parameters:
      namingStrategy - the DbNamingStrategy.
      Returns:
      the computed constraint name.