Object value,
int pos,
int type,
int precision) throws Exception {
if (value instanceof ExtendedEnumeration) {
ExtendedEnumeration e = (ExtendedEnumeration) value;
if (TypesMapping.isNumeric(type))
statement.setInt(pos, (Integer) e.getDatabaseValue());
else
statement.setString(pos, (String) e.getDatabaseValue());
}
else {
statement.setNull(pos, type);
}
}