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.BarkerNotationprotected Filestatic com.wisecoders.dbs.diagram.fx.notation.Idef1XNotationstatic com.wisecoders.dbs.diagram.fx.notation.IENotationstatic com.wisecoders.dbs.diagram.fx.notation.IEWithArrowsNotationbooleanint -
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) intgetDbId()final EntityIterableintgetFile()getKey()com.wisecoders.dbs.diagram.fx.notation.NotationgetOrCreateSchema(String name) getSchemaInUseCatalog(String schemaName) getSchemaUsingMetaDataCatalogAndSchemaName(String metaDataCatalogName, String metaDataSchemaName) getSimilarEntity(Entity other) getSimilarSchema(Schema other) com.wisecoders.dbs.sys.fx.glyph.GlyphFolder[]intgetTitle()getType()intbooleanbooleanhasFile()booleanbooleanvoidinjectDDLPrePostScripts(AlterScript script) booleanisDbVersionBelow(String version) booleanisDbVersionHigherEqual(String version) booleanbooleanbooleanvoidrefresh()Deleting a table, column, etc can be done for any thread, by calling table.markForDeletion().voidThe name of the RDBMS (MySql,Oracle...)voidsetDbVersion(String dbVersion) voidsetDDLPostScript(String ddlPostScript) Script to be executed after the schema creation script.voidsetDDLPreScript(String ddlPreScript) voidIs the file where the project is stored (the model file).voidsetInUseSchema(Schema schema) voidvoidsetNotation(com.wisecoders.dbs.diagram.fx.notation.Notation notation) The layout notation (Barker, IdFix)voidsetNotationStrict(boolean notationStrict) voidsetOperativeConnector(Connector operativeConnector) voidsetSyncFilter(String syncFilter) voidsetSyncInitScript(String syncInitScript) voidsetSyncProject(boolean isSyncProject) voidsetType(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:
getDefaultKeyin classAbstractUnit
-
setSyncProject
public void setSyncProject(boolean isSyncProject) -
isSyncProject
public boolean isSyncProject() -
getChildrenCount
public int getChildrenCount()- Specified by:
getChildrenCountin interfaceTreeUnit- Overrides:
getChildrenCountin classAbstractUnit
-
getChildAt
- Specified by:
getChildAtin interfaceTreeUnit- Overrides:
getChildAtin classAbstractUnit
-
getSyncFolders
- Overrides:
getSyncFoldersin classAbstractUnit
-
getSymbolicName
- Specified by:
getSymbolicNamein interfaceUnit- Specified by:
getSymbolicNamein classAbstractUnit
-
getSymbolicIcon
- Specified by:
getSymbolicIconin classAbstractUnit
-
getSymbolicGlyph
public com.wisecoders.dbs.sys.fx.glyph.Glyph getSymbolicGlyph()- Specified by:
getSymbolicGlyphin 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:
refreshin classAbstractUnit
-
getTitle
-
toString
- Overrides:
toStringin classAbstractUnit
-
getStatistics
- Returns:
- A general statistic about the number of tables, etc.
-
hasOperativeConnector
public boolean hasOperativeConnector() -
setOperativeConnector
-
getOperativeConnector
-
createSchema
-
getEntity
-
getParent
- Specified by:
getParentin interfaceTreeUnit- Specified by:
getParentin classAbstractUnit
-
getEntities
-
getEntityCount
public int getEntityCount() -
hasEntities
public boolean hasEntities() -
findSimilarUnitsAsInSelection
-
getTickId
public int getTickId()- Specified by:
getTickIdin interfaceTreeUnit- Overrides:
getTickIdin classAbstractUnit
-
getKey
- Overrides:
getKeyin 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.
-