本文整理汇总了Java中com.espertech.esper.epl.spec.InsertIntoDesc.getColumnNames方法的典型用法代码示例。如果您正苦于以下问题:Java InsertIntoDesc.getColumnNames方法的具体用法?Java InsertIntoDesc.getColumnNames怎么用?Java InsertIntoDesc.getColumnNames使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.espertech.esper.epl.spec.InsertIntoDesc
的用法示例。
在下文中一共展示了InsertIntoDesc.getColumnNames方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: verifyInsertInto
import com.espertech.esper.epl.spec.InsertIntoDesc; //导入方法依赖的package包/类
private static void verifyInsertInto(InsertIntoDesc insertIntoDesc,
List<SelectClauseExprCompiledSpec> selectionList)
throws ExprValidationException {
// Verify all column names are unique
Set<String> names = new HashSet<String>();
for (String element : insertIntoDesc.getColumnNames()) {
if (names.contains(element)) {
throw new ExprValidationException("Property name '" + element + "' appears more then once in insert-into clause");
}
names.add(element);
}
// Verify number of columns matches the select clause
if ((!insertIntoDesc.getColumnNames().isEmpty()) &&
(insertIntoDesc.getColumnNames().size() != selectionList.size())) {
throw new ExprValidationException("Number of supplied values in the select or values clause does not match insert-into clause");
}
}
示例2: verifyInsertInto
import com.espertech.esper.epl.spec.InsertIntoDesc; //导入方法依赖的package包/类
private static void verifyInsertInto(InsertIntoDesc insertIntoDesc,
List<SelectClauseExprCompiledSpec> selectionList)
throws ExprValidationException
{
// Verify all column names are unique
Set<String> names = new HashSet<String>();
for (String element : insertIntoDesc.getColumnNames())
{
if (names.contains(element))
{
throw new ExprValidationException("Property name '" + element + "' appears more then once in insert-into clause");
}
names.add(element);
}
// Verify number of columns matches the select clause
if ( (!insertIntoDesc.getColumnNames().isEmpty()) &&
(insertIntoDesc.getColumnNames().size() != selectionList.size()) )
{
throw new ExprValidationException("Number of supplied values in the select clause does not match insert-into clause");
}
}