$env

( documentation for Telosys generator version 3.3.0 )


Object for environment configuration
The 'environement' object is reset for each generation.

Since : 2.1.0

Attributes and methods
.collectionType : String

Returns the current specific collection type

Example :
   $env.collectionType

Since : 3.3.0

.database : String

.databaseTypesMapping : Map

.entityClassNamePrefix : String

Returns the current entity class name prefix.
The default value is a void string (never null)

Example :
   $env.entityClassNamePrefix

Since : 2.1.0

.entityClassNameSuffix : String

Returns the current entity class name suffix.
The default value is a void string (never null)

Example :
   $env.entityClassNameSuffix

Since : 2.1.0

.language : String

Returns the current language
The default value is 'Java' (never null)

Example :
   $env.language

Since : 3.0.0

.literalValuesProvider : LiteralValuesProvider

.setCollectionType(String specificCollectionType) : void

Set a specific collection type for the current code generation
The given type will be used as the new default type for the collections

Parameters :
   specificCollectionType : the type to be used (full type if any)

Example :
   #set ( $env.collectionType = 'java.util.Set' ) ## for Java
   #set ( $env.collectionType = 'java.util.Vector' ) ## for Java
   #set ( $env.collectionType = 'Collection' ) ## for C#

Since : 3.3.0

.setDatabase(String ?) : void


Parameters :
   ? :

.setDatabaseTypesMapping(Map ?) : void


Parameters :
   ? :

.setEntityClassNamePrefix(String prefix) : void

Set the entity class name prefix
Once the 'prefix' is defined in the 'environment object'
it is automatically applied when the entity class name is retrieved

Parameters :
   prefix : the prefix to be used

Example :
   #set ( $env.entityClassNamePrefix = 'Bean' )

Since : 2.1.0

.setEntityClassNameSuffix(String suffix) : void

Set the entity class name suffix
Once the 'suffix' is defined in the 'environment object'
it is automatically applied when the entity class name is retrieved

Parameters :
   suffix : the suffix to be used

Example :
   #set ( $env.entityClassNameSuffix = 'Entity' )

Since : 2.1.0

.setLanguage(String language) : void

Set the language for the current code generation
Supported languages are 'Java', 'C#', 'Go', 'Python', 'JavaScript', 'TypeScript',
( the default language is 'Java' )
This information is used dermine language peculiarities like types and literal values

Parameters :
   language : the language to be used (not case sensitive)

Example :
   #set ( $env.language = 'C#' )
   $env.setLanguage('C#')

Since : 3.0.0

.typeConverter : TypeConverter