use of org.whole.lang.pojo.model.ProductDeclaration in project whole by wholeplatform.
the class PojoUtils method translate.
public static void translate(Object fromObject, IEntity toIEntity, Library library) {
Class<?> fromClass = fromObject.getClass();
ProductDeclaration productDeclaration = findProductDeclaration(PojoEntityFactory.instance.createReferenceType(fromClass.getName()), library);
if (!Matcher.matchImpl(PojoDeclaration, productDeclaration))
throw new IllegalStateException("translate can be invoked only on pojo objects");
translate(fromObject, toIEntity, (PojoDeclaration) productDeclaration, library);
}
Aggregations