/** * Create the right parameter values for * {@link FieldDescriptor#setCollection(FieldMappingCollectionType)} according * to given JPA specific information. * * @param jpaNature * The nature holding JPA information. * @return the right parameter values for * {@link FieldDescriptor#setCollection(FieldMappingCollectionType)}. */ private static FieldMappingCollectionType createColletionType( final JPAFieldNature jpaNature) { if (jpaNature.getRelationCollectionType() != null) { // OneToMany or ManyToMany String collectionTypeName = jpaNature.getRelationCollectionType() .getSimpleName().toLowerCase(); return FieldMappingCollectionType.fromValue(collectionTypeName); } return null; }
/** * Method readResolve. will be called during deserialization to * replace the deserialized object with the correct constant * instance. * * @return this deserialized object */ private java.lang.Object readResolve( ) { return valueOf(this.stringValue); }
String colTypeName = fldMap.getCollection().toString(); collectionType = CollectionHandlers.getCollectionType(colTypeName); collectionHandler = CollectionHandlers.getHandler(collectionType);
fieldMap.setCollection(FieldMappingCollectionType.valueOf(colName)); fieldType = Object.class; } else if (_mappingLoader.returnsArray(cls, fieldName, fieldType)) {
if (type != null && CollectionHandlers.hasHandler(type)) { String typeName = CollectionHandlers.getCollectionName(type); colType = FieldMappingCollectionType.fromValue(typeName);
String colTypeName = fldMap.getCollection().toString(); colType = CollectionHandlers.getCollectionType(colTypeName); colHandler = CollectionHandlers.getHandler(colType);
fieldMap.setCollection(FieldMappingCollectionType.valueOf(colName)); fieldType = Object.class; } else if (_mappingLoader.returnsArray(cls, fieldName, fieldType)) {
if (fieldMap.getCollection() != null) { Class colType = CollectionHandlers.getCollectionType( fieldMap.getCollection().toString()); colHandler = CollectionHandlers.getHandler(colType);
if (type != null && CollectionHandlers.hasHandler(type)) { String typeName = CollectionHandlers.getCollectionName(type); colType = FieldMappingCollectionType.valueOf(typeName);
String colTypeName = fieldMap.getCollection().toString(); Class colType = CollectionHandlers.getCollectionType(colTypeName); colHandler = CollectionHandlers.getHandler(colType);
String colTypeName = fieldMap.getCollection().toString(); Class<?> collectionType = CollectionHandlers.getCollectionType(colTypeName); collectionHandler = CollectionHandlers.getHandler(collectionType);