Packages management :
2 predefined variables have been added ( in "Properties / Telosys Tools : Packages" ) :
- ${ROOT_PKG} for the "root package"
- ${ENTITY_PKG} for the package where the entities classes are located
Examples for Java :
${ROOT_PKG} : "org.foo.bar"
${ENTITY_PKG} : "org.foo.bar.entity" ( or "org.foo.bar.bean", etc )
If you need other packages variables, they can be defined in the tab "Variables"
With a name like "DAO_PKG", "SERVICE_PKG", etc... ( ending with "_PKG" )
These variables can be used in the templates (.vm files) and in the targets definition ( templates.cfg file ). In the targets each variable ending by "_PKG" and used in the folder definition is transformed into a folder path ( ie : "org.foo.bar" becomes "org/foo/bar" ). Hence the package variables can be used to define the destination of the code generation.
Examples in a template :
- import ${ROOT_PKG}.cache.${entity.name}Cache ;
Examples in targets definition (destination folder) :
- ${SRC}/${ENTITY_PKG}
- ${SRC}/${ROOT_PKG}/cache
NB :
For an existing project these two variables must be defined before any code generation.
(your previous package configuration will be lost )
Check their values in "Properties / Telosys Tools : Packages" after installation of this new version
Database configuration :
It's now possible to configure databases entirely in the specialised editor (new, update, delete) :