Attributes and methods |
.collectionType : String
Returns the current specific collection type
Example :
$env.collectionType
Since : 3.3.0
|
.database : String
|
.databaseConvFile : File
|
.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
Define the target database for SQL generation
The given database name will be used for SQL conversions (types and names)
(throws an exception if the database is unknown)
Parameters :
? :
Example :
#set ( $env.database = 'postgresql' )
#set ( $env.database = 'mysql' )
Since : 3.4.0
|
.setDatabaseConvFile(FileInContext ?) : void
Define the file containing the specific rules to be used for SQL generation
The given rules will be used for SQL conversions (types and names)
(throws an exception if the file cannot be found)
Parameters :
? :
Example :
#set ( $env.databaseConvFile = $fn.fileFromBundle('oracle.properties') )
#set ( $env.databaseConvFile = $fn.fileFromBundle('mydb.properties') )
Since : 3.4.0
|
.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
|
.sql : SqlInContext
|
.typeConverter : TypeConverter
|