use of org.broadleafcommerce.common.persistence.PostLoaderDao in project BroadleafCommerce by BroadleafCommerce.
the class OrderItemImpl method getCategory.
@Override
public Category getCategory() {
if (deproxiedCategory == null) {
PostLoaderDao postLoaderDao = DefaultPostLoaderDao.getPostLoaderDao();
if (category != null && postLoaderDao != null && category.getId() != null) {
Long id = category.getId();
deproxiedCategory = postLoaderDao.find(CategoryImpl.class, id);
} else if (category != null && category instanceof HibernateProxy) {
deproxiedCategory = HibernateUtils.deproxy(category);
} else {
deproxiedCategory = category;
}
}
return deproxiedCategory;
}
Aggregations