本文整理匯總了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");
}
}