Class FieldModel

java.lang.Object
lu.kbra.modelizer_next.domain.FieldModel
All Implemented Interfaces:
IdOwner, NamesOwner, StyleOwner

public class FieldModel extends Object implements NamesOwner, IdOwner, StyleOwner
Persistent model of a class field or table column, including names, data type, keys, cardinality, style, and visibility.
  • Field Details

  • Constructor Details

    • FieldModel

      public FieldModel()
      Creates a field model instance.
  • Method Details

    • getBorderColor

      @Deprecated public Color getBorderColor()
      Deprecated.
      Returns the border color.
      Specified by:
      getBorderColor in interface StyleOwner
      Returns:
      the border color
    • setBorderColor

      @Deprecated public void setBorderColor(Color c)
      Deprecated.
      Sets the border color.
      Specified by:
      setBorderColor in interface StyleOwner
      Parameters:
      c - c value used by the operation
    • getId

      public String getId()
      Returns the ID.
      Specified by:
      getId in interface IdOwner
      Returns:
      the ID
    • getNames

      public ElementNames getNames()
      Returns the names.
      Specified by:
      getNames in interface NamesOwner
      Returns:
      the names
    • getStyle

      public ElementStyle getStyle()
      Returns the style.
      Specified by:
      getStyle in interface StyleOwner
      Returns:
      the style
    • getType

      public String getType()
      Returns the type.
      Returns:
      the type
    • isNotNull

      public boolean isNotNull()
      Checks whether not null is enabled or applies.
      Returns:
      true if not null is enabled or applies; otherwise false
    • isPrimaryKey

      public boolean isPrimaryKey()
      Checks whether primary key is enabled or applies.
      Returns:
      true if primary key is enabled or applies; otherwise false
    • isTechnicalOnly

      public boolean isTechnicalOnly()
      Checks whether technical only is enabled or applies.
      Returns:
      true if technical only is enabled or applies; otherwise false
    • isUnique

      public boolean isUnique()
      Checks whether unique is enabled or applies.
      Returns:
      true if unique is enabled or applies; otherwise false
    • setId

      public void setId(String id)
      Sets the ID.
      Specified by:
      setId in interface IdOwner
      Parameters:
      id - stable id of the model element
    • setNames

      public void setNames(ElementNames names)
      Sets the names.
      Specified by:
      setNames in interface NamesOwner
      Parameters:
      names - name values to use
    • setNotNull

      public void setNotNull(boolean notNull)
      Sets the not null.
      Parameters:
      notNull - whether not null is enabled
    • setPrimaryKey

      public void setPrimaryKey(boolean primaryKey)
      Sets the primary key.
      Parameters:
      primaryKey - whether primary key is enabled
    • setStyle

      public void setStyle(ElementStyle style)
      Sets the style.
      Specified by:
      setStyle in interface StyleOwner
      Parameters:
      style - style value used by the operation
    • setTechnicalOnly

      public void setTechnicalOnly(boolean notConceptual)
      Sets the technical only.
      Parameters:
      notConceptual - whether not conceptual is enabled
    • setType

      public void setType(String type)
      Sets the type.
      Parameters:
      type - type value that selects the operation mode
    • setUnique

      public void setUnique(boolean unique)
      Sets the unique.
      Parameters:
      unique - whether unique is enabled
    • getFlags

      public List<String> getFlags()
      Returns the flags.
      Returns:
      the flags
    • hasFlags

      public boolean hasFlags()
      Checks whether this object has a flags.
      Returns:
      true if flags exists; otherwise false
    • toString

      public String toString()
      Builds a debug string for this field model.
      Overrides:
      toString in class Object
      Returns:
      a debug string for this object