Code generation
Once you have a valid model and a least one bundle of templates, you are ready to generate your code.
To generate your code you can use the following commands:
gen
to generate code with the current model and the current bundlegenb
to generate code in "batch mode" (since ver 4.1.0) with multiple models and/or bundles
"gen" command syntax
entities
: a list of entities (part of the name) separated by a comma (,) or "*" for alltemplates
: a list of templates (part of the name) separated by a comma (,) or "*" for all-r
(optional) to copy the static resources provided by the bundle (if any)-y
(optional) to force "yes" answer (to avoid confirmation)
You must have defined the current model and the current bundle before using the gen command, the Telosys prompt must look like this: telosys#(model-name)[bundle-name]>
"gen" command examples
generates the code for all the entities of the current model with all the templates of the current bundle
generates the code for all the entities of the current model with all the templates of the current bundle and copy the static resources provided by the bundle (if any)
generates the code for only the entities having "Driver" in their name and for all the templates of the current bundle
generates the code for only the entities having "Car" or "Dri" in their name and for all the templates of the current bundle
generates the code for all the entities of the current model with only the templates having "dao" in their name
generates the code for only the entities having "Car" or "Dri" in their name and only the templates having "dao" or "controller" in their name
"genb" command syntax
models
: model name or part of name or "*" for all modelsbundles
: bundle name or part of name or "*" for all bundles-r
(optional) to copy the static resources provided by the bundle (if any)-y
(optional) to force "yes" answer (to avoid confirmation)
You don't have to defined the current model and the current bundle before using the genb command (it can work with any models and any bundles)
"genb" command examples
generates the code for all the models with all the templates
generates the code for all the entities of the "cars" model with all bundles having "java" in their name
Last updated