Skip to content

Global Variables ​

These variables are available in all templates by default.

Core Variables ​

VariableTypeDescription
tableInfoTableInfoCurrent table information
tableInfoListList<TableInfo>List of all selected tables
authorStringAuthor name from settings
projectPathStringProject base path
modulePathStringCurrent module path
importListSet<String>List of import statements

Tool Variables ​

VariableTypeDescription
toolGlobalToolGlobal tool instance
timeTimeUtilsTime utility instance
dbUtilDbUtilDatabase utility
dasUtilDasUtilDatabase schema utility

Callback Variables ​

VariableTypeDescription
callbackCallbackFile 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
}