Advertisement
NLinker

activeJdbc and booleans

Apr 10th, 2014
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5 0.94 KB | None | 0 0
  1.     @Test
  2.     public void testReport() throws Exception {
  3.         final PropertiesConfiguration c = new PropertiesConfiguration();
  4.         c.setProperty("report.url", "jdbc:mysql://dbserver/report");
  5.         c.setProperty("report.driver", "com.mysql.jdbc.Driver");
  6.         c.setProperty("report.user", "report_dba");
  7.         c.setProperty("report.password", "report_dba");
  8.         ((CompositeConfiguration)ConfigurationManager.getConfiguration()).addConfiguration(c);
  9.         {
  10.             DB db = ActiveJDBCConnectionUtil.getDB(DBConstants.REPORT);
  11.             {
  12.                 ActionLogToday alt = new ActionLogToday();
  13.                 alt.setAction(11);
  14.                 alt.setAppName("it sucks badly");
  15.                 alt.setUseAdTruth(true);
  16.                 alt.saveIt();
  17.             }
  18.             {
  19.                 ActionLogToday alt1 = new ActionLogToday();
  20.                 alt1.setAction(12);
  21.                 alt1.setAppName("it sucks again");
  22.                 alt1.setUseAdTruth(false);
  23.                 alt1.saveIt();
  24.             }
  25.             {
  26.                 LazyList<Model> alts = ActionLogToday.findAll();
  27.                 alts.dump();
  28.             }
  29.  
  30.             db.close();
  31.         }
  32.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement