Package com.wisecoders.dbs.schema
Class Table
java.lang.Object
com.wisecoders.dbs.diagram.model.AbstractUnit
com.wisecoders.dbs.diagram.model.AbstractTable
com.wisecoders.dbs.schema.Table
- All Implemented Interfaces:
SyncPrioritizable
,Entity
,TreeUnit
,Unit
,DbUnit
,Comparable<AbstractUnit>
A database table.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from class com.wisecoders.dbs.diagram.model.AbstractTable
importedRelations, triggers
Fields inherited from interface com.wisecoders.dbs.dbms.sync.engine.nodes.SyncPrioritizable
CHANGE, COMMENT, CREATE_CLUSTERED_INDEX, CREATE_COLUMNS, CREATE_CONSTRAINT, CREATE_FOREIGN_KEY, CREATE_FUNCTIONS, CREATE_INDEX, CREATE_PLSQL, CREATE_SCHEMA, CREATE_SEQUENCES, CREATE_TABLES, CREATE_TRIGGERS, CREATE_USER_DATA_TYPES, CREATE_VIEWS, DROP, DROP_CONSTRAINT, DROP_FOREIGN_KEY, DROP_LAST, DROP_PLSQL, DROP_VIEW, FINAL, NO_PRIORITY, RENAME
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
columnIsPk
(Column column) createColumn
(String name, DataType type) createColumn
(String name, DataType type, int length) createColumn
(String name, DataType type, AttributeSpec spec) createColumn
(String columnName, String dataTypeName) createConstraint
(String name) createIndex
(String name) createPrimaryKey
(String name) createRelation
(String name) getChildAt
(int idx) int
getDbId()
getDisplayName
(Diagram diagram) int
int
getIndexByType
(IndexType type) getIndexFittingColumns
(List<Column> onColumns) getPkOrUniqueIndexContaining
(List<Column> attributes, boolean exactMatch) long
com.wisecoders.dbs.sys.fx.glyph.Glyph
Returns the symbolic icon to be used in the tree node.Returns the name of the node.Folder[]
getType()
boolean
boolean
boolean
isView()
void
void
void
refresh()
void
void
setGeneratorOrder
(int generatorOrder) void
setGeneratorRowsCount
(int rows) boolean
setOptions
(String options) boolean
setPostScript
(String preScript) boolean
setPreScript
(String preScript) void
setRowCount
(long rowCount) boolean
setSpecificationOptions
(String options) void
setType
(Table.TableType type) Methods inherited from class com.wisecoders.dbs.diagram.model.AbstractTable
getChildEntityByPath, getColumnByNameOrPath, getDefaultSyncPriority, getEntity, getImportedRelations, getNameWithSchemaName, getSyncPriority, isChildEntity, isChildEntityArray, isReferredInString, ref, setSyncPriority
Methods inherited from class com.wisecoders.dbs.diagram.model.AbstractUnit
compareTo, fixNull, getByName, getByName, getComment, getCommentNotNull, getCommentTag, getCommentTags, getDefaultKey, getKey, getName, getParentEntity, getPlainName, getPropertyAddOnFolder, getString, getTickId, getTouchId, getUnitProperty, has, is, is, isMarkedForDeletion, isVirtual, markForDeletion, matches, removeUnitProperty, rename, sameAs, sameAs, setComment, setCommentTag, setCommentTags, setTouchId, setUnitProperty, setVirtual, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.wisecoders.dbs.diagram.model.TreeUnit
getByName, getTickId, getTouchId, getUnitProperty, setTouchId
Methods inherited from interface com.wisecoders.dbs.diagram.model.Unit
getComment, getCommentTag, getCommentTags, getEntity, getParentEntity, is, isMarkedForDeletion, markForDeletion, ref, setComment, setCommentTag, setCommentTags
-
Field Details
-
schema
-
columns
-
foreignKeys
-
indexes
-
constraints
-
-
Constructor Details
-
Table
Public constructor, uses:- Parameters:
schema
- it belongs toname
- is the name of the Entity
-
-
Method Details
-
getDisplayName
- Specified by:
getDisplayName
in interfaceUnit
- Overrides:
getDisplayName
in classAbstractUnit
-
getAttributes
- Specified by:
getAttributes
in interfaceEntity
- Specified by:
getAttributes
in classAbstractTable
-
getSyncFolders
- Overrides:
getSyncFolders
in classAbstractUnit
-
getSymbolicName
Returns the name of the node.- Specified by:
getSymbolicName
in interfaceUnit
- Specified by:
getSymbolicName
in classAbstractUnit
- Returns:
- the unit symbolic name
-
getSymbolicIcon
Returns the symbolic icon to be used in the tree node.- Specified by:
getSymbolicIcon
in classAbstractUnit
- Returns:
- the unit icon
-
getSymbolicGlyph
public com.wisecoders.dbs.sys.fx.glyph.Glyph getSymbolicGlyph()- Specified by:
getSymbolicGlyph
in classAbstractUnit
-
getRelations
- Specified by:
getRelations
in interfaceEntity
- Specified by:
getRelations
in classAbstractTable
-
getIndexes
-
getChildrenCount
public int getChildrenCount()- Specified by:
getChildrenCount
in interfaceTreeUnit
- Overrides:
getChildrenCount
in classAbstractUnit
-
getChildAt
- Specified by:
getChildAt
in interfaceTreeUnit
- Overrides:
getChildAt
in classAbstractUnit
-
getPrimaryKey
-
getIndexByType
-
presetColumnOrder
public void presetColumnOrder() -
getPrimaryKeyOrUniqueIndex
-
getIndexFittingColumns
-
getType
-
setType
-
refresh
public void refresh()- Specified by:
refresh
in interfaceEntity
- Specified by:
refresh
in classAbstractUnit
-
getParent
- Specified by:
getParent
in interfaceTreeUnit
- Specified by:
getParent
in classAbstractUnit
-
getSchema
-
createColumn
-
createColumn
-
createColumn
- Specified by:
createColumn
in classAbstractTable
-
createColumn
-
createRelation
- Specified by:
createRelation
in classAbstractTable
-
createPrimaryKey
-
createIndex
-
createConstraint
-
isView
public boolean isView()- Specified by:
isView
in interfaceEntity
- Specified by:
isView
in classAbstractTable
-
getOptions
-
setOptions
-
getSpecificationOptions
-
setSpecificationOptions
-
merge
-
getGeneratorRowsCount
public int getGeneratorRowsCount() -
setGeneratorRowsCount
public void setGeneratorRowsCount(int rows) -
getGeneratorOrder
public int getGeneratorOrder() -
setGeneratorOrder
public void setGeneratorOrder(int generatorOrder) -
hasFkOrRef
public boolean hasFkOrRef() -
setRowCount
public void setRowCount(long rowCount) -
getRowCount
public long getRowCount() -
hasOneColumnPk
public boolean hasOneColumnPk()- Overrides:
hasOneColumnPk
in classAbstractTable
-
getDbId
- Specified by:
getDbId
in interfaceDbUnit
- Specified by:
getDbId
in classAbstractTable
-
setPreScript
-
getPreScript
-
setPostScript
-
getPostScript
-
getPkOrUniqueIndexContaining
-
columnIsPk
-
getTableGenerator
-
removeDuplicateIndexes
public void removeDuplicateIndexes()
-