Package com.wisecoders.dbs.schema
Class Project
java.lang.Object
com.wisecoders.dbs.diagram.model.AbstractUnit
com.wisecoders.dbs.schema.Project
- All Implemented Interfaces:
TreeUnit
,Unit
,Comparable<AbstractUnit>
DbSchema project store all schemas.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic com.wisecoders.dbs.diagram.fx.notation.BarkerNotation
protected File
static com.wisecoders.dbs.diagram.fx.notation.Idef1XNotation
static com.wisecoders.dbs.diagram.fx.notation.IENotation
static com.wisecoders.dbs.diagram.fx.notation.IEWithArrowsNotation
boolean
int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncloneLayout
(Layout layout) Duplicate a layout in a new diagramConvert the Project to other DbmscreateLayout
(String name) Create a new diagramcreateLayoutIncludeAllTables
(String name, boolean createGroups) Create a Layout and attach all project tables to it.createLayoutIncludeAllTables
(String name, boolean createGroups, boolean recursive) Create a Layout and attach all project tables to it.createSchema
(Schema schema) createSchema
(String name) createSchema
(String name, String catalogName) findSimilarUnitsAsInSelection
(List<? extends TreeUnit> preselect) getChildAt
(int idx) int
getDbId()
final EntityIterable
int
getFile()
getKey()
com.wisecoders.dbs.diagram.fx.notation.Notation
getOrCreateSchema
(String name) getSchemaInUseCatalog
(String schemaName) getSchemaUsingMetaDataCatalogAndSchemaName
(String metaDataCatalogName, String metaDataSchemaName) getSimilarEntity
(Entity other) getSimilarSchema
(Schema other) com.wisecoders.dbs.sys.fx.glyph.Glyph
Folder[]
int
getTitle()
getType()
int
boolean
boolean
hasFile()
boolean
boolean
void
injectDDLPrePostScripts
(AlterScript script) boolean
isDbVersionBelow
(String version) boolean
isDbVersionHigherEqual
(String version) boolean
boolean
boolean
void
refresh()
Deleting a table, column, etc can be done for any thread, by calling table.markForDeletion().void
The name of the RDBMS (MySql,Oracle...)void
setDbVersion
(String dbVersion) void
setDDLPostScript
(String ddlPostScript) Script to be executed after the schema creation script.void
setDDLPreScript
(String ddlPreScript) void
Is the file where the project is stored (the model file).void
setInUseSchema
(Schema schema) void
void
setNotation
(com.wisecoders.dbs.diagram.fx.notation.Notation notation) The layout notation (Barker, IdFix)void
setNotationStrict
(boolean notationStrict) void
setOperativeConnector
(Connector operativeConnector) void
setSyncFilter
(String syncFilter) void
setSyncInitScript
(String syncInitScript) void
setSyncProject
(boolean isSyncProject) void
setType
(ProjectType type) toString()
Methods inherited from class com.wisecoders.dbs.diagram.model.AbstractUnit
compareTo, fixNull, getByName, getByName, getComment, getCommentNotNull, getCommentTag, getCommentTags, getDisplayName, getName, getParentEntity, getPlainName, getPropertyAddOnFolder, getString, getTouchId, getUnitProperty, has, is, is, isMarkedForDeletion, isVirtual, markForDeletion, matches, ref, removeUnitProperty, rename, sameAs, sameAs, setComment, setCommentTag, setCommentTags, setTouchId, setUnitProperty, setVirtual
-
Field Details
-
schemas
-
layouts
-
children
-
tickId
public int tickId -
isFreshImported
public boolean isFreshImported -
file
-
idef1xNotation
public static com.wisecoders.dbs.diagram.fx.notation.Idef1XNotation idef1xNotation -
ieNotation
public static com.wisecoders.dbs.diagram.fx.notation.IENotation ieNotation -
ieWithArrowsNotation
public static com.wisecoders.dbs.diagram.fx.notation.IEWithArrowsNotation ieWithArrowsNotation -
barkerNotation
public static com.wisecoders.dbs.diagram.fx.notation.BarkerNotation barkerNotation
-
-
Constructor Details
-
Project
-
Project
-
-
Method Details
-
getDefaultKey
- Overrides:
getDefaultKey
in classAbstractUnit
-
setSyncProject
public void setSyncProject(boolean isSyncProject) -
isSyncProject
public boolean isSyncProject() -
getChildrenCount
public int getChildrenCount()- Specified by:
getChildrenCount
in interfaceTreeUnit
- Overrides:
getChildrenCount
in classAbstractUnit
-
getChildAt
- Specified by:
getChildAt
in interfaceTreeUnit
- Overrides:
getChildAt
in classAbstractUnit
-
getSyncFolders
- Overrides:
getSyncFolders
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
-
getOrCreateSchema
-
createSchema
-
createSchema
-
getSimilarSchema
-
getSimilarEntity
-
getSchema
-
getSchema
-
getSchemaUsingMetaDataCatalogAndSchemaName
-
createLayout
Create a new diagram- Parameters:
name
- as diagram name- Returns:
- the created layout
-
createLayoutIncludeAllTables
Create a Layout and attach all project tables to it. Used in Groovy Scripts.- Parameters:
name
- layout namecreateGroups
- to set groups over the tables- Returns:
- the created layout
-
createLayoutIncludeAllTables
Create a Layout and attach all project tables to it. Used in Groovy Scripts.- Parameters:
name
- layout namecreateGroups
- to set groups over the tablesrecursive
- to attach sub-entities of each table (as for MongoDb)- Returns:
- the created layout
-
cloneLayout
Duplicate a layout in a new diagram- Parameters:
layout
- to duplicate- Returns:
- the duplicated layout
-
getLayout
-
getFile
-
hasFile
public boolean hasFile() -
setFile
Is the file where the project is stored (the model file).- Parameters:
file
- where is stored
-
getDbId
-
setDbId
The name of the RDBMS (MySql,Oracle...)- Parameters:
dbId
- the database name
-
hasSchemesWithSameName
public boolean hasSchemesWithSameName() -
refresh
public void refresh()Deleting a table, column, etc can be done for any thread, by calling table.markForDeletion(). The effective delete is done by calling this method, on the JavaFX thread (in GUI mode). This ensures the correct rendering of the project structure.- Specified by:
refresh
in classAbstractUnit
-
getTitle
-
toString
- Overrides:
toString
in classAbstractUnit
-
getStatistics
- Returns:
- A general statistic about the number of tables, etc.
-
hasOperativeConnector
public boolean hasOperativeConnector() -
setOperativeConnector
-
getOperativeConnector
-
createSchema
-
getEntity
-
getParent
- Specified by:
getParent
in interfaceTreeUnit
- Specified by:
getParent
in classAbstractUnit
-
getEntities
-
getEntityCount
public int getEntityCount() -
hasEntities
public boolean hasEntities() -
findSimilarUnitsAsInSelection
-
getTickId
public int getTickId()- Specified by:
getTickId
in interfaceTreeUnit
- Overrides:
getTickId
in classAbstractUnit
-
getKey
- Overrides:
getKey
in classAbstractUnit
- Returns:
- A string to uniquely identify this Unit. Is used for saving if is open or not, its position, etc.
-
setKey
-
getType
-
setType
-
isElasticsearch
public boolean isElasticsearch() -
getSyncFilter
-
setSyncFilter
-
setSyncInitScript
-
getSyncInitScript
-
getDDLPreScript
-
setDDLPreScript
-
getDDLPostScript
-
setDDLPostScript
Script to be executed after the schema creation script.- Parameters:
ddlPostScript
- is an SQL as string.
-
injectDDLPrePostScripts
-
setNotation
public void setNotation(com.wisecoders.dbs.diagram.fx.notation.Notation notation) The layout notation (Barker, IdFix)- Parameters:
notation
- to use
-
getNotation
public com.wisecoders.dbs.diagram.fx.notation.Notation getNotation() -
setNotationStrict
public void setNotationStrict(boolean notationStrict) -
isNotationStrict
public boolean isNotationStrict() -
getCatalogNames
-
deduceVirtualForeignKeysFromQuery
-
isDbVersionHigherEqual
-
isDbVersionBelow
-
setDbVersion
-
getVirtualRelationCount
public int getVirtualRelationCount() -
getInUseSchema
-
setInUseSchema
-
getSchemaInUseCatalog
-
convert
Convert the Project to other Dbms- Parameters:
targetDbms
- to convert to- Returns:
- the converted project.
-