final List<Class<? extends GenericValue>> columnsTypeList = this.getColumnsTypeList();
final List<Class<? extends GenericValue>> valuesTypeList = this.getInsertValuesSource().getValuesTypeList();
if (columnsTypeList.size() != valuesTypeList.size())
throw new HBqlException("Number of columns not equal to number of values in " + this.asString());
for (int i = 0; i < columnsTypeList.size(); i++) {
final Class<? extends GenericValue> type1 = columnsTypeList.get(i);
final Class<? extends GenericValue> type2 = valuesTypeList.get(i);
// Skip Default values
if (type2 == DefaultKeyword.class) {
final String name = this.getInsertColumnList().get(i).asString();
final ColumnAttrib attrib = this.getMappingContext().getMapping().getAttribByVariableName(name);
if (!attrib.hasDefaultArg())
throw new HBqlException("No DEFAULT value specified for " + attrib.getNameToUseInExceptions()
+ " in " + this.asString());
continue;
}
if (type2.equals(NullLiteral.class)) {