collectionDataType = keyDataType;
mapValueDataType = valueDataType;
}
private DataType collectionElementType(DataModel model, CColumn elemCol, int typeIndex, int typeCount) {
DataTypeName elemDataTypeName = elemCol != null ? elemCol.type() : DataTypeName.GUESS;
Class<?> elemType = GenericTypes.getGenericType(attrGenericType, typeIndex, typeCount);
if (typeIndex == 0) {
collectionElementTypeJava = elemType;
} else if (typeIndex == 1) {
mapValueElementTypeJava = elemType;
}
if (elemDataTypeName == DataTypeName.GUESS) {
elemDataTypeName = guessSimpleType(elemType);
}
if (elemDataTypeName == null) {
ParseComposite comp = model.composites.get(elemType);
if (comp != null && comp.composite.compositeType().isSingleColumn()) {
return DataType.custom("");
}
}
if (elemDataTypeName == null) {
throw new ModelParseException("cannot determine data type for element " + accessible);
}
if (!elemDataTypeName.isForCollection()) {
throw new ModelParseException("type " + elemDataTypeName + " is not a valid data type at " + accessible);
}
return createSimpleDataType(elemCol, elemDataTypeName);
}