You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
635 lines
9.9 KiB
635 lines
9.9 KiB
# Documentation du Projet
|
|
|
|
## Classe Main
|
|
|
|
Hérite de: `Application`
|
|
|
|
### Attributs
|
|
|
|
|
|
### Méthodes
|
|
|
|
#### start
|
|
- Retour: `void`
|
|
- Paramètres: `Stage primaryStage`
|
|
|
|
#### main
|
|
- Retour: `void`
|
|
- Paramètres: `String args`
|
|
|
|
---
|
|
|
|
## Classe DiagramController
|
|
|
|
### Attributs
|
|
|
|
- `canvas`: Pane
|
|
- `entities`: List
|
|
- `relationships`: List
|
|
- `entityBlocks`: List
|
|
- `relationshipBlocks`: List
|
|
- `selectedEntity`: Entity
|
|
|
|
### Méthodes
|
|
|
|
#### addEntity
|
|
- Retour: `void`
|
|
- Paramètres: `String name, double x, double y`
|
|
|
|
#### addRelationship
|
|
- Retour: `void`
|
|
- Paramètres: `Entity source, Entity target, String name`
|
|
|
|
#### updateRelationships
|
|
- Retour: `void`
|
|
- Paramètres: ``
|
|
|
|
#### generateSQL
|
|
- Retour: `void`
|
|
- Paramètres: ``
|
|
|
|
#### getSQLType
|
|
- Retour: `String`
|
|
- Paramètres: `String type`
|
|
|
|
#### saveToJson
|
|
- Retour: `void`
|
|
- Paramètres: `File file`
|
|
|
|
#### loadFromJson
|
|
- Retour: `void`
|
|
- Paramètres: `File file`
|
|
|
|
---
|
|
|
|
## Classe DiagramData
|
|
|
|
### Attributs
|
|
|
|
- `entities`: List
|
|
- `relationships`: List
|
|
|
|
### Méthodes
|
|
|
|
#### getEntities
|
|
- Retour: `List`
|
|
- Paramètres: ``
|
|
|
|
#### setEntities
|
|
- Retour: `void`
|
|
- Paramètres: `List entities`
|
|
|
|
#### getRelationships
|
|
- Retour: `List`
|
|
- Paramètres: ``
|
|
|
|
#### setRelationships
|
|
- Retour: `void`
|
|
- Paramètres: `List relationships`
|
|
|
|
---
|
|
|
|
## Classe Attribute
|
|
|
|
### Attributs
|
|
|
|
- `name`: String
|
|
- `type`: String
|
|
- `isPrimaryKey`: boolean
|
|
- `isForeignKey`: boolean
|
|
- `isNullable`: boolean
|
|
|
|
### Méthodes
|
|
|
|
#### getName
|
|
- Retour: `String`
|
|
- Paramètres: ``
|
|
|
|
#### setName
|
|
- Retour: `void`
|
|
- Paramètres: `String name`
|
|
|
|
#### getType
|
|
- Retour: `String`
|
|
- Paramètres: ``
|
|
|
|
#### setType
|
|
- Retour: `void`
|
|
- Paramètres: `String type`
|
|
|
|
#### isPrimaryKey
|
|
- Retour: `boolean`
|
|
- Paramètres: ``
|
|
|
|
#### setPrimaryKey
|
|
- Retour: `void`
|
|
- Paramètres: `boolean primaryKey`
|
|
|
|
#### isForeignKey
|
|
- Retour: `boolean`
|
|
- Paramètres: ``
|
|
|
|
#### setForeignKey
|
|
- Retour: `void`
|
|
- Paramètres: `boolean foreignKey`
|
|
|
|
#### isNullable
|
|
- Retour: `boolean`
|
|
- Paramètres: ``
|
|
|
|
#### setNullable
|
|
- Retour: `void`
|
|
- Paramètres: `boolean nullable`
|
|
|
|
---
|
|
|
|
## Classe Entity
|
|
|
|
### Attributs
|
|
|
|
- `name`: String
|
|
- `attributes`: List
|
|
- `x`: double
|
|
- `y`: double
|
|
- `autoGenerateId`: boolean
|
|
|
|
### Méthodes
|
|
|
|
#### getName
|
|
- Retour: `String`
|
|
- Paramètres: ``
|
|
|
|
#### setName
|
|
- Retour: `void`
|
|
- Paramètres: `String name`
|
|
|
|
#### getAttributes
|
|
- Retour: `List`
|
|
- Paramètres: ``
|
|
|
|
#### addAttribute
|
|
- Retour: `void`
|
|
- Paramètres: `Attribute attribute`
|
|
|
|
#### getX
|
|
- Retour: `double`
|
|
- Paramètres: ``
|
|
|
|
#### setX
|
|
- Retour: `void`
|
|
- Paramètres: `double x`
|
|
|
|
#### getY
|
|
- Retour: `double`
|
|
- Paramètres: ``
|
|
|
|
#### setY
|
|
- Retour: `void`
|
|
- Paramètres: `double y`
|
|
|
|
#### isAutoGenerateId
|
|
- Retour: `boolean`
|
|
- Paramètres: ``
|
|
|
|
#### setAutoGenerateId
|
|
- Retour: `void`
|
|
- Paramètres: `boolean autoGenerateId`
|
|
|
|
---
|
|
|
|
## Classe Relationship
|
|
|
|
### Attributs
|
|
|
|
- `name`: String
|
|
- `sourceEntity`: Entity
|
|
- `targetEntity`: Entity
|
|
- `sourceCardinality`: String
|
|
- `targetCardinality`: String
|
|
- `x`: double
|
|
- `y`: double
|
|
|
|
### Méthodes
|
|
|
|
#### getName
|
|
- Retour: `String`
|
|
- Paramètres: ``
|
|
|
|
#### setName
|
|
- Retour: `void`
|
|
- Paramètres: `String name`
|
|
|
|
#### getSourceEntity
|
|
- Retour: `Entity`
|
|
- Paramètres: ``
|
|
|
|
#### setSourceEntity
|
|
- Retour: `void`
|
|
- Paramètres: `Entity sourceEntity`
|
|
|
|
#### getTargetEntity
|
|
- Retour: `Entity`
|
|
- Paramètres: ``
|
|
|
|
#### setTargetEntity
|
|
- Retour: `void`
|
|
- Paramètres: `Entity targetEntity`
|
|
|
|
#### getSourceCardinality
|
|
- Retour: `String`
|
|
- Paramètres: ``
|
|
|
|
#### setSourceCardinality
|
|
- Retour: `void`
|
|
- Paramètres: `String sourceCardinality`
|
|
|
|
#### getTargetCardinality
|
|
- Retour: `String`
|
|
- Paramètres: ``
|
|
|
|
#### setTargetCardinality
|
|
- Retour: `void`
|
|
- Paramètres: `String targetCardinality`
|
|
|
|
#### getX
|
|
- Retour: `double`
|
|
- Paramètres: ``
|
|
|
|
#### setX
|
|
- Retour: `void`
|
|
- Paramètres: `double x`
|
|
|
|
#### getY
|
|
- Retour: `double`
|
|
- Paramètres: ``
|
|
|
|
#### setY
|
|
- Retour: `void`
|
|
- Paramètres: `double y`
|
|
|
|
---
|
|
|
|
## Classe SQLGenerationServiceImpl
|
|
|
|
Implémente: SQLGenerationService
|
|
|
|
### Attributs
|
|
|
|
|
|
### Méthodes
|
|
|
|
#### generateCreateTableStatements
|
|
- Retour: `String`
|
|
- Paramètres: `List entities`
|
|
|
|
#### generateForeignKeyStatements
|
|
- Retour: `String`
|
|
- Paramètres: `List relationships`
|
|
|
|
#### generateCompleteScript
|
|
- Retour: `String`
|
|
- Paramètres: `List entities, List relationships`
|
|
|
|
#### importFromSQL
|
|
- Retour: `void`
|
|
- Paramètres: `String sqlScript`
|
|
|
|
---
|
|
|
|
## Classe DiagramServiceImpl
|
|
|
|
Implémente: DiagramService
|
|
|
|
### Attributs
|
|
|
|
- `entities`: List
|
|
- `relationships`: List
|
|
- `fileStorageService`: FileStorageService
|
|
- `invalidationListeners`: List
|
|
- `changeListeners`: List
|
|
|
|
### Méthodes
|
|
|
|
#### notifyListeners
|
|
- Retour: `void`
|
|
- Paramètres: ``
|
|
|
|
#### addEntity
|
|
- Retour: `void`
|
|
- Paramètres: `Entity entity`
|
|
|
|
#### removeEntity
|
|
- Retour: `void`
|
|
- Paramètres: `Entity entity`
|
|
|
|
#### addRelationship
|
|
- Retour: `void`
|
|
- Paramètres: `Relationship relationship`
|
|
|
|
#### removeRelationship
|
|
- Retour: `void`
|
|
- Paramètres: `Relationship relationship`
|
|
|
|
#### getEntities
|
|
- Retour: `List`
|
|
- Paramètres: ``
|
|
|
|
#### getRelationships
|
|
- Retour: `List`
|
|
- Paramètres: ``
|
|
|
|
#### saveToFile
|
|
- Retour: `void`
|
|
- Paramètres: `File file`
|
|
|
|
#### loadFromFile
|
|
- Retour: `void`
|
|
- Paramètres: `File file`
|
|
|
|
#### addListener
|
|
- Retour: `void`
|
|
- Paramètres: `InvalidationListener listener`
|
|
|
|
#### removeListener
|
|
- Retour: `void`
|
|
- Paramètres: `InvalidationListener listener`
|
|
|
|
#### addChangeListener
|
|
- Retour: `void`
|
|
- Paramètres: `Runnable listener`
|
|
|
|
#### removeChangeListener
|
|
- Retour: `void`
|
|
- Paramètres: `Runnable listener`
|
|
|
|
---
|
|
|
|
## Classe JsonFileStorageService
|
|
|
|
Implémente: FileStorageService
|
|
|
|
### Attributs
|
|
|
|
- `objectMapper`: ObjectMapper
|
|
|
|
### Méthodes
|
|
|
|
#### save
|
|
- Retour: `void`
|
|
- Paramètres: `File file, List entities, List relationships`
|
|
|
|
#### load
|
|
- Retour: `DiagramData`
|
|
- Paramètres: `File file`
|
|
|
|
---
|
|
|
|
## Classe SQLGenerationServiceImpl
|
|
|
|
Implémente: SQLGenerationService
|
|
|
|
### Attributs
|
|
|
|
- `diagramService`: DiagramService
|
|
|
|
### Méthodes
|
|
|
|
#### generateCompleteScript
|
|
- Retour: `String`
|
|
- Paramètres: `List entities, List relationships`
|
|
|
|
#### importFromSQL
|
|
- Retour: `void`
|
|
- Paramètres: `String sqlScript`
|
|
|
|
#### generateCreateTableStatements
|
|
- Retour: `String`
|
|
- Paramètres: `List entities`
|
|
|
|
#### generateForeignKeyStatements
|
|
- Retour: `String`
|
|
- Paramètres: `List relationships`
|
|
|
|
---
|
|
|
|
## Classe SQLGenerator
|
|
|
|
### Attributs
|
|
|
|
|
|
### Méthodes
|
|
|
|
#### generateCreateTables
|
|
- Retour: `String`
|
|
- Paramètres: `List entities, List relationships`
|
|
|
|
#### generateTableSQL
|
|
- Retour: `String`
|
|
- Paramètres: `Entity entity, boolean includeForeignKeys`
|
|
|
|
#### generateForeignKeySQL
|
|
- Retour: `String`
|
|
- Paramètres: `Relationship rel`
|
|
|
|
#### getSQLType
|
|
- Retour: `String`
|
|
- Paramètres: `String type`
|
|
|
|
---
|
|
|
|
## Classe DiagramView
|
|
|
|
Hérite de: `Pane`
|
|
|
|
### Attributs
|
|
|
|
- `diagramService`: DiagramService
|
|
- `entityBlocks`: Map
|
|
- `relationshipBlocks`: Map
|
|
|
|
### Méthodes
|
|
|
|
#### addEntity
|
|
- Retour: `void`
|
|
- Paramètres: `Entity entity`
|
|
|
|
#### addEntity
|
|
- Retour: `void`
|
|
- Paramètres: `Entity entity, double x, double y`
|
|
|
|
#### addRelationship
|
|
- Retour: `void`
|
|
- Paramètres: `Relationship relationship`
|
|
|
|
#### removeEntity
|
|
- Retour: `void`
|
|
- Paramètres: `Entity entity`
|
|
|
|
#### removeRelationship
|
|
- Retour: `void`
|
|
- Paramètres: `Relationship relationship`
|
|
|
|
#### updateRelationships
|
|
- Retour: `void`
|
|
- Paramètres: ``
|
|
|
|
#### clear
|
|
- Retour: `void`
|
|
- Paramètres: ``
|
|
|
|
#### getEntityAt
|
|
- Retour: `Entity`
|
|
- Paramètres: `double x, double y`
|
|
|
|
---
|
|
|
|
## Classe DialogManager
|
|
|
|
### Attributs
|
|
|
|
|
|
### Méthodes
|
|
|
|
#### showAttributeDialog
|
|
- Retour: `Optional`
|
|
- Paramètres: ``
|
|
|
|
#### showCardinalityDialog
|
|
- Retour: `Optional`
|
|
- Paramètres: `String currentValue`
|
|
|
|
---
|
|
|
|
## Classe EntityBlock
|
|
|
|
Hérite de: `VBox`
|
|
|
|
### Attributs
|
|
|
|
- `entity`: Entity
|
|
- `nameLabel`: Label
|
|
- `attributesBox`: VBox
|
|
- `connectedRelationships`: List
|
|
|
|
### Méthodes
|
|
|
|
#### refreshAttributes
|
|
- Retour: `void`
|
|
- Paramètres: ``
|
|
|
|
#### showAddAttributeDialog
|
|
- Retour: `void`
|
|
- Paramètres: ``
|
|
|
|
#### setupDragging
|
|
- Retour: `void`
|
|
- Paramètres: ``
|
|
|
|
#### getEntity
|
|
- Retour: `Entity`
|
|
- Paramètres: ``
|
|
|
|
#### addRelationship
|
|
- Retour: `void`
|
|
- Paramètres: `RelationshipBlock relationship`
|
|
|
|
#### removeRelationship
|
|
- Retour: `void`
|
|
- Paramètres: `RelationshipBlock relationship`
|
|
|
|
#### updateConnectedRelationships
|
|
- Retour: `void`
|
|
- Paramètres: ``
|
|
|
|
---
|
|
|
|
## Classe Delta
|
|
|
|
### Attributs
|
|
|
|
- `x`: double
|
|
- `y`: double
|
|
|
|
### Méthodes
|
|
|
|
---
|
|
|
|
## Classe MainView
|
|
|
|
### Attributs
|
|
|
|
- `root`: BorderPane
|
|
- `diagramView`: DiagramView
|
|
- `diagramService`: DiagramService
|
|
- `sqlService`: SQLGenerationService
|
|
- `sqlEditor`: TextArea
|
|
- `currentMode`: String
|
|
- `sourceEntity`: Entity
|
|
|
|
### Méthodes
|
|
|
|
#### initializeComponents
|
|
- Retour: `void`
|
|
- Paramètres: ``
|
|
|
|
#### setupSQLEditor
|
|
- Retour: `VBox`
|
|
- Paramètres: ``
|
|
|
|
#### showNewEntityDialog
|
|
- Retour: `void`
|
|
- Paramètres: `double x, double y`
|
|
|
|
#### showNewRelationshipDialog
|
|
- Retour: `void`
|
|
- Paramètres: `Entity source, Entity target`
|
|
|
|
#### refreshDiagramView
|
|
- Retour: `void`
|
|
- Paramètres: ``
|
|
|
|
#### updateSQLEditor
|
|
- Retour: `void`
|
|
- Paramètres: ``
|
|
|
|
#### getRoot
|
|
- Retour: `BorderPane`
|
|
- Paramètres: ``
|
|
|
|
---
|
|
|
|
## Classe RelationshipBlock
|
|
|
|
Hérite de: `Group`
|
|
|
|
### Attributs
|
|
|
|
- `relationship`: Relationship
|
|
- `line`: Line
|
|
- `nameLabel`: Label
|
|
- `sourceCardLabel`: Label
|
|
- `targetCardLabel`: Label
|
|
- `sourceBlock`: EntityBlock
|
|
- `targetBlock`: EntityBlock
|
|
|
|
### Méthodes
|
|
|
|
#### updatePosition
|
|
- Retour: `void`
|
|
- Paramètres: ``
|
|
|
|
#### setupContextMenu
|
|
- Retour: `void`
|
|
- Paramètres: ``
|
|
|
|
#### showCardinalityDialog
|
|
- Retour: `void`
|
|
- Paramètres: ``
|
|
|
|
#### getRelationship
|
|
- Retour: `Relationship`
|
|
- Paramètres: ``
|
|
|
|
---
|
|
|