package gov.va.med.mpn.dao;
// Generated Sep 16, 2014 1:53:04 PM by Hibernate Tools 4.3.1


import gov.va.med.mpn.dao.core.CategoryDAOCoreImpl;
import gov.va.med.mpn.dao.interfaces.CategoryDAO;
import gov.va.med.mpn.entity.pojo.Category;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.jmx.export.annotation.ManagedOperation;
import org.springframework.jmx.export.annotation.ManagedResource;
import org.springframework.stereotype.Repository;



/**
 * DAO Implementation for Category.
 *
 */
@Repository
@ManagedResource
public class CategoryDAOImpl extends CategoryDAOCoreImpl
                                  implements CategoryDAO {
	  /** The slf4j logger. */
	private final Logger slf4jLogger = LoggerFactory.getLogger(CategoryDAOImpl.class);



	@ManagedOperation
  public List<Category> findAllCategoriesSorted()
  {

		slf4jLogger.info("findAllCategoriesSorted :");
		List<Category> returnValue = null;


      List<Category> categories = super.findByNamedQuery("category.findAllSortedCategories");


      // if there are actions for status, set returnValue to list
      if(categories != null )
      {
          returnValue = categories;
      }

      return returnValue;
  }


}

