예제 #1
0
  /* (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();
  }
예제 #2
0
 /**
  * Get a count of the metadata types
  *
  * @see edu.ur.dao.CountableDAO#getCount()
  */
 public Long getCount() {
   return (Long)
       hbCrudDAO
           .getSessionFactory()
           .getCurrentSession()
           .getNamedQuery("metadataTypeCount")
           .uniqueResult();
 }
예제 #3
0
 /** @see edu.ur.dao.CrudDAO#makeTransient(java.lang.Object) */
 public void makeTransient(FileVersion entity) {
   hbCrudDAO.makeTransient(entity);
 }
예제 #4
0
 /** @see edu.ur.dao.CrudDAO#makePersistent(java.lang.Object) */
 public void makePersistent(FileVersion entity) {
   hbCrudDAO.makePersistent(entity);
 }
예제 #5
0
 /** Return Version by id */
 public FileVersion getById(Long id, boolean lock) {
   return hbCrudDAO.getById(id, lock);
 }
예제 #6
0
 /**
  * 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();
 }
예제 #7
0
 /**
  * Set the session factory.
  *
  * @param sessionFactory
  */
 public void setSessionFactory(SessionFactory sessionFactory) {
   hbCrudDAO.setSessionFactory(sessionFactory);
 }
예제 #8
0
 /**
  * Remove the metadata from persistent storage.
  *
  * @see edu.ur.dao.CrudDAO#makeTransient(java.lang.Object)
  */
 public void makeTransient(MetadataType entity) {
   hbCrudDAO.makeTransient(entity);
 }
예제 #9
0
 /**
  * Save the metadata type.
  *
  * @see edu.ur.dao.CrudDAO#makePersistent(java.lang.Object)
  */
 public void makePersistent(MetadataType entity) {
   hbCrudDAO.makePersistent(entity);
 }
예제 #10
0
 /**
  * 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);
 }
예제 #11
0
 /**
  * Return all metadata types.
  *
  * @see edu.ur.dao.CrudDAO#getAll()
  */
 public List<MetadataType> getAll() {
   return hbCrudDAO.getAll();
 }