Example #1
0
 @SuppressWarnings("unchecked")
 protected <T> T prepareDao(Class<?> cls) throws Exception {
   try {
     dba = (DBA) cls.newInstance();
     dba.setDbConfig(DB_CONFIG);
     return (T) dba;
   } catch (Exception e) {
     throw e;
   }
 }
Example #2
0
 private void removeAllKeys(ColumnFamily cf) {
   for (String key : dba.getAllKeys(cf)) dba.deleteKey(cf, key);
 }