Global Variables
These variables are available in all templates by default.
Core Variables
Variable | Type | Description |
---|---|---|
tableInfo | TableInfo | Current table information |
tableInfoList | List<TableInfo> | List of all selected tables |
author | String | Author name from settings |
projectPath | String | Project base path |
modulePath | String | Current module path |
importList | Set<String> | List of import statements |
Tool Variables
Variable | Type | Description |
---|---|---|
tool | GlobalTool | Global tool instance |
time | TimeUtils | Time utility instance |
dbUtil | DbUtil | Database utility |
dasUtil | DasUtil | Database schema utility |
Callback Variables
Variable | Type | Description |
---|---|---|
callback | Callback | File generation callback |
Example Usage
velocity
/**
* Generated by EasyCode Plus
* Author: ${author}
* Date: ${time.getCurrentTime()}
* Project: ${projectPath}
*/
package ${tableInfo.savePackageName};
#foreach($import in $importList)
import ${import};
#end
public class ${tableInfo.name} {
// Your generated code here
}