Package com.wisecoders.dbs.schema
Class Constraint
java.lang.Object
com.wisecoders.dbs.diagram.model.AbstractUnit
com.wisecoders.dbs.schema.Constraint
- All Implemented Interfaces:
TreeUnit
,Unit
,DbUnit
,Comparable<AbstractUnit>
A constraint into a table. Sample: check ( age > 14 ).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDbId()
com.wisecoders.dbs.sys.fx.glyph.Glyph
final String
getText()
getType()
final void
refresh()
boolean
sameAs
(AbstractUnit unit, boolean considerRenaming) A dedicated comparator with other unit.void
setOptions
(String options) void
Set the constraint definition textvoid
Methods inherited from class com.wisecoders.dbs.diagram.model.AbstractUnit
compareTo, fixNull, getByName, getByName, getChildAt, getChildrenCount, getComment, getCommentNotNull, getCommentTag, getCommentTags, getDefaultKey, getDisplayName, getKey, getName, getParentEntity, getPlainName, getPropertyAddOnFolder, getString, getSyncFolders, getTickId, getTouchId, getUnitProperty, has, is, is, isMarkedForDeletion, isVirtual, markForDeletion, matches, ref, removeUnitProperty, rename, 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.Unit
getComment, getCommentTag, getCommentTags, getDisplayName, getParentEntity, is, isMarkedForDeletion, markForDeletion, ref, setComment, setCommentTag, setCommentTags
-
Constructor Details
-
Constraint
- Parameters:
table
- is the parent tablename
- of the constraint
-
-
Method Details
-
refresh
public final void refresh()- Specified by:
refresh
in classAbstractUnit
-
getSymbolicName
- Specified by:
getSymbolicName
in interfaceUnit
- Specified by:
getSymbolicName
in classAbstractUnit
-
getSymbolicIcon
- Specified by:
getSymbolicIcon
in classAbstractUnit
-
getSymbolicGlyph
public com.wisecoders.dbs.sys.fx.glyph.Glyph getSymbolicGlyph()- Specified by:
getSymbolicGlyph
in classAbstractUnit
-
getEntity
-
getText
- Returns:
- constraint definition text
-
getParent
- Specified by:
getParent
in interfaceTreeUnit
- Specified by:
getParent
in classAbstractUnit
-
setText
Set the constraint definition text- Parameters:
text
- definition
-
sameAs
A dedicated comparator with other unit.- Overrides:
sameAs
in classAbstractUnit
- Parameters:
unit
- to compare with- Returns:
- true if is the same
-
getDbId
-
getSchema
-
setOptions
-
getOptions
-
setType
-
getType
-