use of org.jowidgets.cap.service.tools.entity.EntityServiceBuilder in project jo-client-platform by jo-source.
the class JpaEntityService method afterPropertiesSet.
@Override
@SuppressWarnings("unchecked")
public void afterPropertiesSet() {
final EntityServiceBuilder entityServiceBuilder = new EntityServiceBuilder();
for (final EntityType<?> type : entityManagerFactory.getMetamodel().getEntities()) {
final Class<?> clazz = type.getBindableJavaType();
if (IBean.class.isAssignableFrom(clazz)) {
final Class<? extends IBean> beanType = (Class<? extends IBean>) clazz;
final Class<? extends IBean> beanInterface = new BeanTypeUtil(beanType).getBeanInterface();
addServicesProviderAndDescriptor(entityServiceBuilder, beanInterface, beanType);
}
}
entityService = entityServiceBuilder.build();
}
Aggregations