private void collectTypes() {
for (MappedClass mappedClass : configuration.getMappedClasses()) {
if (mappedClass.isEnum()) {
continue;
}
EntityType entityType = (EntityType) createType(mappedClass.getJavaClass());
for (MappedPath mappedPath : mappedClass.getProperties()) {
MappedProperty<?> mappedProperty = mappedPath.getMappedProperty();
Class<?> type = mappedPath.getMappedProperty().getType();
Type propertyType = null;
if (type.equals(Map.class)) {
propertyType = new SimpleType(Types.MAP, createType(mappedProperty.getKeyType()), createType(mappedProperty.getComponentType()));
} else if (type.equals(List.class)) {
propertyType = new SimpleType(Types.LIST, createType(mappedProperty.getComponentType()));
} else if (type.equals(Set.class)) {
propertyType = new SimpleType(Types.SET, createType(mappedProperty.getComponentType()));
} else if (type.equals(Collection.class)) {
propertyType = new SimpleType(Types.COLLECTION, createType(mappedProperty.getComponentType()));
} else {
propertyType = createType(type);
}
entityType.addProperty(createProperty(entityType, mappedPath.getName(), propertyType, mappedProperty.getAnnotations()));
}
}
}