Package lu.kbra.modelizer_next.domain
Class FieldModel
java.lang.Object
lu.kbra.modelizer_next.domain.FieldModel
- All Implemented Interfaces:
IdOwner,NamesOwner,StyleOwner
Persistent model of a class field or table column, including names, data type, keys, cardinality,
style, and visibility.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.getFlags()Returns the flags.getId()Returns the ID.getNames()Returns the names.getStyle()Returns the style.getType()Returns the type.booleanhasFlags()Checks whether this object has a flags.booleanChecks whether not null is enabled or applies.booleanChecks whether primary key is enabled or applies.booleanChecks whether technical only is enabled or applies.booleanisUnique()Checks whether unique is enabled or applies.voidDeprecated.voidSets the ID.voidsetNames(ElementNames names) Sets the names.voidsetNotNull(boolean notNull) Sets the not null.voidsetPrimaryKey(boolean primaryKey) Sets the primary key.voidsetStyle(ElementStyle style) Sets the style.voidsetTechnicalOnly(boolean notConceptual) Sets the technical only.voidSets the type.voidsetUnique(boolean unique) Sets the unique.toString()Builds a debug string for this field model.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface lu.kbra.modelizer_next.domain.impl.NamesOwner
getConceptualName, getName, getTechnicalName, hasTechnicalName, setConceptualName, setName, setName, setName, setTechnicalNameMethods inherited from interface lu.kbra.modelizer_next.domain.impl.StyleOwner
getBackgroundColor, getTextColor, setBackgroundColor, setTextColor
-
Field Details
-
SQL_TYPES
-
NOT_NULL_FLAG
- See Also:
-
PRIMARY_KEY_FLAG
- See Also:
-
UNIQUE_FLAG
- See Also:
-
-
Constructor Details
-
FieldModel
public FieldModel()Creates a field model instance.
-
-
Method Details
-
getBorderColor
Deprecated.Returns the border color.- Specified by:
getBorderColorin interfaceStyleOwner- Returns:
- the border color
-
setBorderColor
Deprecated.Sets the border color.- Specified by:
setBorderColorin interfaceStyleOwner- Parameters:
c- c value used by the operation
-
getId
Returns the ID. -
getNames
Returns the names.- Specified by:
getNamesin interfaceNamesOwner- Returns:
- the names
-
getStyle
Returns the style.- Specified by:
getStylein interfaceStyleOwner- Returns:
- the style
-
getType
Returns the type.- Returns:
- the type
-
isNotNull
public boolean isNotNull()Checks whether not null is enabled or applies.- Returns:
trueif not null is enabled or applies; otherwisefalse
-
isPrimaryKey
public boolean isPrimaryKey()Checks whether primary key is enabled or applies.- Returns:
trueif primary key is enabled or applies; otherwisefalse
-
isTechnicalOnly
public boolean isTechnicalOnly()Checks whether technical only is enabled or applies.- Returns:
trueif technical only is enabled or applies; otherwisefalse
-
isUnique
public boolean isUnique()Checks whether unique is enabled or applies.- Returns:
trueif unique is enabled or applies; otherwisefalse
-
setId
Sets the ID. -
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
-
setTechnicalOnly
public void setTechnicalOnly(boolean notConceptual) Sets the technical only.- Parameters:
notConceptual- whether not conceptual is enabled
-
setType
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
Returns the flags.- Returns:
- the flags
-
hasFlags
public boolean hasFlags()Checks whether this object has a flags.- Returns:
trueif flags exists; otherwisefalse
-
toString
Builds a debug string for this field model.
-