Validate.notNull(javaTypeDetails,
"The type specified, '%s' doesn't exist", typeName);
final String physicalTypeIdentifier = javaTypeDetails
.getDeclaredByMetadataId();
final ListField fieldDetails = new ListField(physicalTypeIdentifier,
new JavaType(LIST.getFullyQualifiedTypeName(), 0,
DataType.TYPE, null, Arrays.asList(fieldType)),
fieldName, fieldType, cardinality);
fieldDetails.setNotNull(notNull);
fieldDetails.setNullRequired(nullRequired);
if (sizeMin != null) {
fieldDetails.setSizeMin(sizeMin);
}
if (sizeMax != null) {
fieldDetails.setSizeMax(sizeMax);
}
if (mappedBy != null) {
fieldDetails.setMappedBy(mappedBy);
}
if (fetch != null) {
fieldDetails.setFetch(fetch);
}
if (comment != null) {
fieldDetails.setComment(comment);
}
insertField(fieldDetails, permitReservedWords, transientModifier);
}