/* (non-Javadoc)
   * @see edu.ur.dao.UniqueNameDAO#findByUniqueName(java.lang.String)
   */
  public MetadataType findByUniqueName(String name) {

    Query q =
        hbCrudDAO.getSessionFactory().getCurrentSession().getNamedQuery("getMetadataTypeByName");
    q.setParameter(0, name);
    return (MetadataType) q.uniqueResult();
  }
 /**
  * Get a count of the metadata types
  *
  * @see edu.ur.dao.CountableDAO#getCount()
  */
 public Long getCount() {
   return (Long)
       hbCrudDAO
           .getSessionFactory()
           .getCurrentSession()
           .getNamedQuery("metadataTypeCount")
           .uniqueResult();
 }
 /** @see edu.ur.dao.CrudDAO#makeTransient(java.lang.Object) */
 public void makeTransient(FileVersion entity) {
   hbCrudDAO.makeTransient(entity);
 }
 /** @see edu.ur.dao.CrudDAO#makePersistent(java.lang.Object) */
 public void makePersistent(FileVersion entity) {
   hbCrudDAO.makePersistent(entity);
 }
 /** Return Version by id */
 public FileVersion getById(Long id, boolean lock) {
   return hbCrudDAO.getById(id, lock);
 }
 /**
  * Get a count of the Versions
  *
  * @see edu.ur.CountableDAO#getCount()
  */
 public Long getCount() {
   Query q = hbCrudDAO.getSessionFactory().getCurrentSession().getNamedQuery("versionCount");
   return (Long) q.uniqueResult();
 }
 /**
  * Set the session factory.
  *
  * @param sessionFactory
  */
 public void setSessionFactory(SessionFactory sessionFactory) {
   hbCrudDAO.setSessionFactory(sessionFactory);
 }
 /**
  * Remove the metadata from persistent storage.
  *
  * @see edu.ur.dao.CrudDAO#makeTransient(java.lang.Object)
  */
 public void makeTransient(MetadataType entity) {
   hbCrudDAO.makeTransient(entity);
 }
 /**
  * Save the metadata type.
  *
  * @see edu.ur.dao.CrudDAO#makePersistent(java.lang.Object)
  */
 public void makePersistent(MetadataType entity) {
   hbCrudDAO.makePersistent(entity);
 }
 /**
  * Get a metadata type by id.
  *
  * @see edu.ur.dao.CrudDAO#getById(java.lang.Long, boolean)
  */
 public MetadataType getById(Long id, boolean lock) {
   return hbCrudDAO.getById(id, lock);
 }
 /**
  * Return all metadata types.
  *
  * @see edu.ur.dao.CrudDAO#getAll()
  */
 public List<MetadataType> getAll() {
   return hbCrudDAO.getAll();
 }