Package com.wisecoders.dbs.diagram.model
Class AbstractUnit
java.lang.Object
com.wisecoders.dbs.diagram.model.AbstractUnit
- All Implemented Interfaces:
TreeUnit
,Unit
,Comparable<AbstractUnit>
- Direct Known Subclasses:
AbstractTable
,ChildEntity
,ChildEntityRelation
,Column
,ConnectorGroup
,Constraint
,ForeignKey
,Group
,Index
,Layout
,LayoutDepict
,Line
,Project
,Schema
,Sequence
,Shape
,Sql
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(AbstractUnit unit) protected static String
static Unit
getChildAt
(int idx) int
getCommentTag
(String key) getDisplayName
(Diagram diagram) getKey()
getName()
abstract TreeUnit
getPropertyAddOnFolder
(String name) getString
(UnitProperty key) abstract com.wisecoders.dbs.sys.fx.glyph.Glyph
abstract String
abstract String
Folder[]
int
int
boolean
has
(UnitProperty key) is
(UnitProperty key) is
(UnitProperty key, boolean defo) boolean
boolean
void
Call this method to mark a unit (table, column) to be deleted.boolean
matches
(AbstractUnit unit) ref()
abstract void
refresh()
void
boolean
boolean
sameAs
(AbstractUnit unit) boolean
sameAs
(AbstractUnit unit, boolean considerRenaming) void
setComment
(String comment) void
setCommentTag
(String key, String value) void
setCommentTags
(Map<String, String> tags) void
setTouchId
(int id) void
setUnitProperty
(UnitProperty key, Object value) void
setVirtual
(boolean virtual) toString()
-
Constructor Details
-
AbstractUnit
-
-
Method Details
-
getName
-
getPlainName
-
setTouchId
public void setTouchId(int id) - Specified by:
setTouchId
in interfaceTreeUnit
-
getTouchId
public int getTouchId()- Specified by:
getTouchId
in interfaceTreeUnit
-
rename
-
toString
-
refresh
public abstract void refresh() -
markForDeletion
public void markForDeletion()Call this method to mark a unit (table, column) to be deleted. It can be called from any thread. The effective deletion is done by calling project.refresh() or schema.refresh() on JavaFX GUI thread.- Specified by:
markForDeletion
in interfaceUnit
-
isMarkedForDeletion
public boolean isMarkedForDeletion()- Specified by:
isMarkedForDeletion
in interfaceUnit
-
getComment
- Specified by:
getComment
in interfaceUnit
-
getCommentNotNull
-
setComment
- Specified by:
setComment
in interfaceUnit
-
fixNull
-
compareTo
- Specified by:
compareTo
in interfaceComparable<AbstractUnit>
-
matches
-
getSyncFolders
-
sameAs
-
sameAs
-
getChildrenCount
public int getChildrenCount()- Specified by:
getChildrenCount
in interfaceTreeUnit
-
getChildAt
- Specified by:
getChildAt
in interfaceTreeUnit
-
getParent
-
getSymbolicName
- Specified by:
getSymbolicName
in interfaceUnit
-
getSymbolicIcon
-
getSymbolicGlyph
public abstract com.wisecoders.dbs.sys.fx.glyph.Glyph getSymbolicGlyph() -
getByName
-
getTickId
public int getTickId() -
getKey
- Returns:
- A string to uniquely identify this Unit. Is used for saving if is open or not, its position, etc.
-
getDefaultKey
-
getParentEntity
- Specified by:
getParentEntity
in interfaceUnit
-
getByName
-
setUnitProperty
-
getUnitProperty
- Specified by:
getUnitProperty
in interfaceTreeUnit
-
is
-
is
-
getString
-
has
-
removeUnitProperty
-
getCommentTags
- Specified by:
getCommentTags
in interfaceUnit
-
getCommentTag
- Specified by:
getCommentTag
in interfaceUnit
-
setCommentTags
- Specified by:
setCommentTags
in interfaceUnit
-
setCommentTag
- Specified by:
setCommentTag
in interfaceUnit
-
ref
-
getDisplayName
- Specified by:
getDisplayName
in interfaceUnit
-
getPropertyAddOnFolder
-
isVirtual
public boolean isVirtual() -
setVirtual
public void setVirtual(boolean virtual)
-