Charon is generator to produce PowerTier .per files from TogetherJ class-diagrams and vice versa.
One of the key features of TogetherJ is its excellent support for roundtrip engineering. This means, that class-diagrams and their corresponding Java source code files are allways kept synchronized. With Enterprise JavaBeans (EJBs), however, this quickly makes class-diagrams unreadable because they contain all the EJB implementation details. It is much better to have class-diagrams with just one class per EJB.
PowerTier can generate Entity Beans from specifications made in its Builder tool. The PowerTier Builder is a non-diagram-style editor which stores everything in a .per file. This file is used by PowerTier's ps-gen to generate Entity Beans. This saves a lot of handcrafting.
Charon links TogetherJ and PowerTier by generating PowerTier .per files from TogetherJ class-diagrams and by updating class-diagrams from .per files. Charon preserves the rondtrip engineering capabilities and simplifies the class-diagrams by requiring only one class per EJB.
Charon provides the following properties for the .per file generation, which can be entered in the TogetherJ inspector:| property | description | default |
|---|---|---|
| Project | the name of the project at the first line of the .per file | the name of the TogetherJ project file |
| ProjDomainName | an entry in the PersistencePreferences block of the .per file | package name for this diagram |
| ProjDomainRootFileName | an entry in the PersistencePreferences block of the .per file | package name for this diagram |
| ProjDomainOutputDir | an entry in the PersistencePreferences block of the .per file | .\ejb |
| ProjRootFileName | an entry in the PersistencePreferences block of the .per file | package name for this diagram |
| ProjInSubDir | an entry in the PersistencePreferences block of the .per file | False |
| ProjPackage | an entry in the PersistencePreferences block of the .per file | package name for this diagram |
| ClassPostfix | this string will be appended to all class names in the .per file | empty string |
| property | description | default |
|---|---|---|
| persistent | flag for marking for export | false |
| TableName | an entry in the PersistentClass block, if specified | not specified (will not be generated) |
| ExistingTable | an entry in the PersistentClass block | false (will not be generated) |
| ReadOnly | an entry in the PersistentClass block | false (will not be generated) |
| DistributionOption | an entry in the PersistentClass block | AllReadWrite |
| property | description | default |
|---|---|---|
| key | true, if this attribute is part of the key | False |
| type | PowerTier type for this attribute | the default value depends on the java type, as described in the next table |
| ColumnName | a different name for the column in the database table for this attribute | not specified (will not be generated) |
| OptimisticControl | an entry in the PersistentClass block | false (will not be generated) |
| length | length for the PowerTier type char |
80 |
| scale | scale for the PowerTier type decimal
(not implemented yet) | 0 |
| NullAllowed | an entry in the PersistentClass block | false (will not be generated) |
| Java type | PowerTier type |
|---|---|
| int | int |
| String | char |
| Date | time |
| BigDecimal | decimal |
| float | float |
| property | description | default |
|---|---|---|
| persistent | flag for marking for export | false |
| clientDeleteAction | an entry in the Relationship block | removeRelationPointer |
| supplierDeleteAction | an entry in the Relationship block | removeRelationPointer |
in the Link tab of the inspector: client role |
client role | name of the client class, first character lowercased |
in the Link tab of the inspector: client cardinality |
client cardinality | 0..1 |
in the Link tab of the inspector: supplier role |
supplier role | name of the supplier class, first character lowercased |
in the Link tab of the inspector: supplier
cardinality |
supplier cardinality | 0..1 |
The final version will be able to create new class-diagrams from .per files or update them if they exist already.
CHARON.zip into
c:\Together\Modules (c:\Together is the path
to your local TogetherJ-Installation).c:\Together\Modules\charon\charon.config into
c:\Together\config.Modules, right-click on Charon
and press runNow you can generate the EJBs using PowerTier's ps-gen and edit the EJBs' source code.
To create new class-diagrams from .per files or to update existing class-diagrams ...
(will be added soon)scale will not be evaluated for the PowerTier type
decimal