@Commons@groovy.util.logging.Commons class Formula extends Object
公式
| Modifiers | Name | Description |
|---|---|---|
static Byte |
TYPE_ACTION |
|
static Byte |
TYPE_SUBSTITUTE |
|
static Byte |
TYPE_TEST |
|
static Byte |
TYPE_VALUE |
| Type | Name and description |
|---|---|
String |
code英文代码:由 A-Z0-9_ 组成的唯一的字符串 |
static Object |
constraints |
String |
createdBy |
Boolean |
custom是否自定义 |
Date |
dateCreated时间戳 |
Boolean |
disabled是否禁用 |
String |
group分组 |
Date |
lastUpdated |
static Map |
listFields |
static Object |
mapping |
String |
name公式名称 |
String |
notes备注 |
String |
script脚本内容:如果脚本为一个闭包,则调用时可接参数 |
Byte |
type类型 |
String |
updatedBy |
| Type | Name and description |
|---|---|
Object |
beforeValidate() |
static String |
calScript(String script, Map<String, String> formulaScripts = null)递归获取脚本代码:替换公式为脚本 |
static void |
loadAllFormulas(String basedir = null, boolean force = false)从文件夹中加载所有公式文件 |
static Formula |
loadFormula(java.io.File file)从文件中加载公式,并保存到数据库中 |
String |
toString() |
| Methods inherited from class | Name |
|---|---|
class Object |
Object#wait(long, int), Object#wait(long), Object#wait(), Object#equals(Object), Object#toString(), Object#hashCode(), Object#getClass(), Object#notify(), Object#notifyAll() |
英文代码:由 A-Z0-9_ 组成的唯一的字符串
是否自定义
时间戳
是否禁用
分组
公式名称
备注
脚本内容:如果脚本为一个闭包,则调用时可接参数
类型
递归获取脚本代码:替换公式为脚本
script - 需要处理的脚本formulaScripts - 本次计算涉及到的公式对应实际脚本的缓存,仅用于内部递归,因此调用时无需本参数从文件夹中加载所有公式文件
从文件中加载公式,并保存到数据库中