use of io.crnk.jpa.meta.MetaEmbeddable in project crnk-framework by crnk-project.
the class EmbeddableMetaFactory method create.
@Override
public MetaEmbeddable create(Type type) {
Class<?> rawClazz = ClassUtils.getRawType(type);
Class<?> superClazz = rawClazz.getSuperclass();
MetaElement superMeta = null;
if (superClazz != Object.class) {
superMeta = context.allocate(superClazz);
}
MetaEmbeddable meta = new MetaEmbeddable();
meta.setElementType(meta);
meta.setName(rawClazz.getSimpleName());
meta.setImplementationType(type);
meta.setSuperType((MetaDataObject) superMeta);
if (superMeta != null) {
((MetaDataObject) superMeta).addSubType(meta);
}
createAttributes(meta);
return meta;
}
Aggregations