public static void main(String[] args) {
    try {
      System.out.println("Are you sure to drop table(s)? (Y/N)");
      java.io.BufferedReader reader =
          new java.io.BufferedReader(new java.io.InputStreamReader(System.in));
      if (reader.readLine().trim().toUpperCase().equals("Y")) {
        ORMDatabaseInitiator.dropSchema(
            tr.com.srdc.icardea.hibernate.ICardeaPersistentManager.instance());
        tr.com.srdc.icardea.hibernate.ICardeaPersistentManager.instance()
            .disposePersistentManager();
      }

    } catch (Exception e) {
      e.printStackTrace();
    }
  }
Пример #2
0
 public boolean evict() {
   try {
     tr.com.srdc.icardea.hibernate.ICardeaPersistentManager.instance().getSession().evict(this);
     return true;
   } catch (Exception e) {
     _logger.error("evict()", e);
     return false;
   }
 }
Пример #3
0
 public boolean delete() {
   try {
     tr.com.srdc.icardea.hibernate.ICardeaPersistentManager.instance().deleteObject(this);
     return true;
   } catch (Exception e) {
     _logger.error("delete()", e);
     return false;
   }
 }
Пример #4
0
 public static Medication getMedicationByORMID(int ID, org.hibernate.LockMode lockMode) {
   try {
     PersistentSession session =
         tr.com.srdc.icardea.hibernate.ICardeaPersistentManager.instance().getSession();
     return getMedicationByORMID(session, ID, lockMode);
   } catch (Exception e) {
     _logger.error("getMedicationByORMID(int ID, org.hibernate.LockMode lockMode)", e);
     return null;
   }
 }
Пример #5
0
 public static java.util.Iterator iterateMedicationByQuery(String condition, String orderBy) {
   try {
     PersistentSession session =
         tr.com.srdc.icardea.hibernate.ICardeaPersistentManager.instance().getSession();
     return iterateMedicationByQuery(session, condition, orderBy);
   } catch (Exception e) {
     _logger.error("iterateMedicationByQuery(String condition, String orderBy)", e);
     return null;
   }
 }
Пример #6
0
 public static BRADYSET getBRADYSETByORMID(int ID) {
   try {
     PersistentSession session =
         tr.com.srdc.icardea.hibernate.ICardeaPersistentManager.instance().getSession();
     return getBRADYSETByORMID(session, ID);
   } catch (Exception e) {
     _logger.error("getBRADYSETByORMID(int ID)", e);
     return null;
   }
 }
Пример #7
0
 public static BRADYSET loadBRADYSETByQuery(String condition, String orderBy) {
   try {
     PersistentSession session =
         tr.com.srdc.icardea.hibernate.ICardeaPersistentManager.instance().getSession();
     return loadBRADYSETByQuery(session, condition, orderBy);
   } catch (Exception e) {
     _logger.error("loadBRADYSETByQuery(String condition, String orderBy)", e);
     return null;
   }
 }
Пример #8
0
 public static Medication[] listMedicationByQuery(
     String condition, String orderBy, org.hibernate.LockMode lockMode) {
   try {
     PersistentSession session =
         tr.com.srdc.icardea.hibernate.ICardeaPersistentManager.instance().getSession();
     return listMedicationByQuery(session, condition, orderBy, lockMode);
   } catch (Exception e) {
     _logger.error("listMedicationByQuery(String condition, String orderBy)", e);
     return null;
   }
 }
Пример #9
0
 public ConcernCriteria() throws PersistentException {
   this(tr.com.srdc.icardea.hibernate.ICardeaPersistentManager.instance().getSession());
 }
 protected PersistentManager getPersistentManager() throws PersistentException {
   return tr.com.srdc.icardea.hibernate.ICardeaPersistentManager.instance();
 }