Package lu.kbra.modelizer_next.domain
Class ClassModel
java.lang.Object
lu.kbra.modelizer_next.domain.ClassModel
- All Implemented Interfaces:
IdOwner,NamesOwner,StyleOwner,VisibilityOwner
Persistent model of a diagram class/table. It owns display names, style, visibility, and the
ordered list of fields.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddField(int index, FieldModel fieldModel) voidaddField(FieldModel fieldModel) Returns the field.intgetFieldCount(PanelType panelType) Returns the field count.intgetFieldIndex(String fieldId) Returns the field index.intgetFieldIndex(String fieldId, PanelType panelType) Returns the field index.Returns the fields.voidremoveField(FieldModel fieldModel) voidsetFieldById(Map<String, FieldModel> fieldById) voidsetFields(List<FieldModel> fields) Sets the fields.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface lu.kbra.modelizer_next.domain.impl.NamesOwner
getConceptualName, getName, getNames, getTechnicalName, hasTechnicalName, setConceptualName, setName, setName, setName, setNames, setTechnicalNameMethods inherited from interface lu.kbra.modelizer_next.domain.impl.StyleOwner
getBackgroundColor, getBorderColor, getLastPaletteName, getStyle, getTextColor, setBackgroundColor, setBorderColor, setLastPaletteName, setStyle, setTextColorMethods inherited from interface lu.kbra.modelizer_next.domain.impl.VisibilityOwner
clearVisibility, getVisibility, isVisible, isVisibleInConceptual, isVisibleInLogical, isVisibleInPhysical, setVisibility, setVisibility, setVisibility, setVisibleInConceptual, setVisibleInLogical, setVisibleInPhysical
-
Constructor Details
-
ClassModel
public ClassModel()Creates a class model instance.
-
-
Method Details
-
addField
-
addField
-
buildFieldByIdIndex
-
buildPrimaryKeyFieldIdsIndex
-
getField
Returns the field.- Parameters:
i- zero-based index to read or updatepanelType- diagram panel type whose model or layout should be used- Returns:
- the field
-
getFieldCount
Returns the field count.- Parameters:
panelType- diagram panel type whose model or layout should be used- Returns:
- the field count
-
getFieldIndex
Returns the field index.- Parameters:
fieldId- id of the field to look up or modify- Returns:
- the field index
-
getFieldIndex
Returns the field index.- Parameters:
fieldId- id of the field to look up or modifypanelType- diagram panel type whose model or layout should be used- Returns:
- the field index
-
getFields
Returns the fields.- Parameters:
panelType- diagram panel type whose model or layout should be used- Returns:
- the fields
-
removeField
-
setFieldById
-
setFields
Sets the fields.- Parameters:
fields- values for fields
-
validateFieldByIdIndex
-
validatePrimaryKeyFieldIdsIndex
-
validateDuplicatedFields
-
validateDuplicatedFields
-
getDuplicatedFields
-