@Override public boolean isArray() { return metadata.isArray(); }
private CollectionType buildCollectionType(SessionFactory sessionFactory, Class<?> collectionClass, String role) { CollectionMetadata cm = sessionFactory.getCollectionMetadata(role); // FIXME buildCollectionType if (null == cm) return null; org.hibernate.type.Type type = cm.getElementType(); EntityType elementType = null; if (type.isEntityType()) { elementType = (EntityType) entityTypes.get(type.getName()); if (null == elementType) elementType = buildEntityType(sessionFactory, type.getName()); } else { elementType = new EntityType(type.getReturnedClass()); } CollectionType collectionType = new CollectionType(); collectionType.setElementType(elementType); collectionType.setArray(cm.isArray()); collectionType.setCollectionClass(collectionClass); if (!collectionTypes.containsKey(collectionType.getName())) { collectionTypes.put(collectionType.getName(), collectionType); } return collectionType; }