本文整理汇总了Java中com.espertech.esper.epl.spec.OnTriggerType.ON_SET属性的典型用法代码示例。如果您正苦于以下问题:Java OnTriggerType.ON_SET属性的具体用法?Java OnTriggerType.ON_SET怎么用?Java OnTriggerType.ON_SET使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.espertech.esper.epl.spec.OnTriggerType
的用法示例。
在下文中一共展示了OnTriggerType.ON_SET属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getStatementType
public static StatementType getStatementType(StatementSpecRaw statementSpec, boolean pattern) {
// determine statement type
StatementType statementType = null;
if (statementSpec.getCreateVariableDesc() != null) {
statementType = StatementType.CREATE_VARIABLE;
} else if (statementSpec.getCreateTableDesc() != null) {
statementType = StatementType.CREATE_TABLE;
} else if (statementSpec.getCreateWindowDesc() != null) {
statementType = StatementType.CREATE_WINDOW;
} else if (statementSpec.getOnTriggerDesc() != null) {
if (statementSpec.getOnTriggerDesc().getOnTriggerType() == OnTriggerType.ON_DELETE) {
statementType = StatementType.ON_DELETE;
} else if (statementSpec.getOnTriggerDesc().getOnTriggerType() == OnTriggerType.ON_UPDATE) {
statementType = StatementType.ON_UPDATE;
} else if (statementSpec.getOnTriggerDesc().getOnTriggerType() == OnTriggerType.ON_SELECT) {
if (statementSpec.getInsertIntoDesc() != null) {
statementType = StatementType.ON_INSERT;
} else {
statementType = StatementType.ON_SELECT;
}
} else if (statementSpec.getOnTriggerDesc().getOnTriggerType() == OnTriggerType.ON_SET) {
statementType = StatementType.ON_SET;
} else if (statementSpec.getOnTriggerDesc().getOnTriggerType() == OnTriggerType.ON_MERGE) {
statementType = StatementType.ON_MERGE;
} else if (statementSpec.getOnTriggerDesc().getOnTriggerType() == OnTriggerType.ON_SPLITSTREAM) {
statementType = StatementType.ON_SPLITSTREAM;
}
} else if (statementSpec.getInsertIntoDesc() != null) {
statementType = StatementType.INSERT_INTO;
} else if (pattern) {
statementType = StatementType.PATTERN;
} else if (statementSpec.getUpdateDesc() != null) {
statementType = StatementType.UPDATE;
} else if (statementSpec.getCreateIndexDesc() != null) {
statementType = StatementType.CREATE_INDEX;
} else if (statementSpec.getCreateContextDesc() != null) {
statementType = StatementType.CREATE_CONTEXT;
} else if (statementSpec.getCreateSchemaDesc() != null) {
statementType = StatementType.CREATE_SCHEMA;
} else if (statementSpec.getCreateDataFlowDesc() != null) {
statementType = StatementType.CREATE_DATAFLOW;
} else if (statementSpec.getCreateExpressionDesc() != null) {
statementType = StatementType.CREATE_EXPRESSION;
}
if (statementType == null) {
statementType = StatementType.SELECT;
}
return statementType;
}
示例2: getStatementType
public static StatementType getStatementType(StatementSpecRaw statementSpec, boolean pattern) {
// determine statement type
StatementType statementType = null;
if (statementSpec.getCreateVariableDesc() != null) {
statementType = StatementType.CREATE_VARIABLE;
}
else if (statementSpec.getCreateWindowDesc() != null) {
statementType = StatementType.CREATE_WINDOW;
}
else if (statementSpec.getOnTriggerDesc() != null) {
if (statementSpec.getOnTriggerDesc().getOnTriggerType() == OnTriggerType.ON_DELETE) {
statementType = StatementType.ON_DELETE;
}
else if (statementSpec.getOnTriggerDesc().getOnTriggerType() == OnTriggerType.ON_UPDATE) {
statementType = StatementType.ON_UPDATE;
}
else if (statementSpec.getOnTriggerDesc().getOnTriggerType() == OnTriggerType.ON_SELECT) {
if (statementSpec.getInsertIntoDesc() != null) {
statementType = StatementType.ON_INSERT;
}
else {
statementType = StatementType.ON_SELECT;
}
}
else if (statementSpec.getOnTriggerDesc().getOnTriggerType() == OnTriggerType.ON_SET) {
statementType = StatementType.ON_SET;
}
else if (statementSpec.getOnTriggerDesc().getOnTriggerType() == OnTriggerType.ON_MERGE) {
statementType = StatementType.ON_MERGE;
}
else if (statementSpec.getOnTriggerDesc().getOnTriggerType() == OnTriggerType.ON_SPLITSTREAM) {
statementType = StatementType.ON_SPLITSTREAM;
}
}
else if (statementSpec.getInsertIntoDesc() != null) {
statementType = StatementType.INSERT_INTO;
}
else if (pattern) {
statementType = StatementType.PATTERN;
}
else if (statementSpec.getUpdateDesc() != null) {
statementType = StatementType.UPDATE;
}
else if (statementSpec.getCreateIndexDesc() != null) {
statementType = StatementType.CREATE_INDEX;
}
else if (statementSpec.getCreateContextDesc() != null) {
statementType = StatementType.CREATE_CONTEXT;
}
else if (statementSpec.getCreateSchemaDesc() != null) {
statementType = StatementType.CREATE_SCHEMA;
}
else if (statementSpec.getCreateDataFlowDesc() != null) {
statementType = StatementType.CREATE_GRAPH;
}
else if (statementSpec.getCreateExpressionDesc() != null) {
statementType = StatementType.CREATE_EXPRESSION;
}
if (statementType == null) {
statementType = StatementType.SELECT;
}
return statementType;
}