@SuppressWarnings("unchecked")
private void extractAnyColumn() {
Set<Field> anyColumnFields = ReflectionUtils.getAllFields(type, withAnnotation(AnyColumn.class));
if (anyColumnFields.size() > 0) {
if (anyColumnFields.size() > 1) {
throw new XceliteException("Multiple AnyColumn fields are not allowed");
}
Field anyColumnField = anyColumnFields.iterator().next();
if (!anyColumnField.getType().isAssignableFrom(Map.class)) {
throw new XceliteException(
String.format("AnyColumn field \"%s\" should be of type Map.class or assignable from Map.class",
anyColumnField.getName()));
}
anyColumn = new Col(anyColumnField.getName(), anyColumnField.getName());
anyColumn.setAnyColumn(true);