Package de.xima.fc.gui.model.datatable
Class DatatableDTO
- java.lang.Object
-
- de.xima.fc.gui.model.datatable.DatatableDTO
-
- All Implemented Interfaces:
Serializable
public class DatatableDTO extends Object implements Serializable
Datatable DTO.- Since:
- 8.6.0
- Author:
- Hannes John
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDatatableDTO.RenameTablePair of names to rename a table.
-
Constructor Summary
Constructors Constructor Description DatatableDTO()DatatableDTO(Datatable datatable)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddFormElementModel()Adds a form element model.protected booleancanEqual(Object other)voiddeleteFormElementModel(FormElementModel formElementModel)Deletes a form element model.voidentityChanged(Datatable datatable)Updates this DTO with respect to a changed entity.booleanequals(Object o)List<FormElementModel>getColumns()DatenbankZugriffgetDbConnection()DB connectionDatatablegetEntity()The backing entityLonggetId()ID of corresponding entityintgetLockingVersion()Locking versionStringgetName()Datatable nameOptional<DatatableDTO.RenameTable>getRenameTable()Retrieves the old datatable name, if present.StringgetTableName()Returns the datatable's table name.booleanhasConfigChanged()Determines, whether configuration has changed.inthashCode()booleanhasNameChanged()Determines, whether the datatable name has changed.booleanisNew()Determines, whether this is a new datatable.booleanisSystemDatabase()Determines, whether the table is to be stored in the system database.voidsetColumns(List<FormElementModel> columns)voidsetDbConnection(DatenbankZugriff dbConnection)DB connectionvoidsetEntity(Datatable entity)The backing entityvoidsetId(Long id)ID of corresponding entityvoidsetLockingVersion(int lockingVersion)Locking versionvoidsetName(String name)Datatable nameStringtoString()
-
-
-
Constructor Detail
-
DatatableDTO
public DatatableDTO(Datatable datatable)
Constructor.- Parameters:
datatable- datatable entity
-
DatatableDTO
public DatatableDTO()
-
-
Method Detail
-
entityChanged
public void entityChanged(Datatable datatable)
Updates this DTO with respect to a changed entity.- Parameters:
datatable- entity
-
getColumns
public List<FormElementModel> getColumns()
-
setColumns
public void setColumns(List<FormElementModel> columns)
-
deleteFormElementModel
public void deleteFormElementModel(FormElementModel formElementModel)
Deletes a form element model.- Parameters:
formElementModel- form element model
-
addFormElementModel
public void addFormElementModel()
Adds a form element model.
-
isSystemDatabase
public boolean isSystemDatabase()
Determines, whether the table is to be stored in the system database.- Returns:
- true, if system database
-
hasConfigChanged
public boolean hasConfigChanged()
Determines, whether configuration has changed.- Returns:
- true, if changed
-
hasNameChanged
public boolean hasNameChanged()
Determines, whether the datatable name has changed. Used to perform table rename.- Returns:
- true, if changed
-
getRenameTable
public Optional<DatatableDTO.RenameTable> getRenameTable()
Retrieves the old datatable name, if present.- Returns:
- Pair of old and new table name
-
isNew
public boolean isNew()
Determines, whether this is a new datatable.- Returns:
- true, if new
-
getTableName
public String getTableName()
Returns the datatable's table name.- Returns:
- table name
-
getId
public Long getId()
ID of corresponding entity
-
getLockingVersion
public int getLockingVersion()
Locking version
-
getName
public String getName()
Datatable name
-
getDbConnection
public DatenbankZugriff getDbConnection()
DB connection
-
getEntity
public Datatable getEntity()
The backing entity
-
setId
public void setId(Long id)
ID of corresponding entity
-
setLockingVersion
public void setLockingVersion(int lockingVersion)
Locking version
-
setName
public void setName(String name)
Datatable name
-
setDbConnection
public void setDbConnection(DatenbankZugriff dbConnection)
DB connection
-
setEntity
public void setEntity(Datatable entity)
The backing entity
-
canEqual
protected boolean canEqual(Object other)
-
-