protected String getLoggerName() {
return LOG_NAME + ".rt.basic.TestSqlClasses";
}
public void test1() {
SqlClasses sql = new SqlClasses(1);
java.sql.Date d = new java.sql.Date(12345);
java.sql.Time t = new java.sql.Time(123450);
java.sql.Timestamp ts = new java.sql.Timestamp(1234500);
sql.setDate(d);
sql.setTime(t);
sql.setTimestamp(ts);
PersistenceManager pm = pmf.getPersistenceManager();
pm.makePersistent(sql);
Object sId = pm.getObjectId(sql);
Assert.assertNotNull("null object identifier", sId);
pm.close();
sql = null;
pm = pmf.getPersistenceManager();
sql = (SqlClasses) pm.getObjectById(sId, true);
Assert.assertNotNull("null instance returned by getObjectById", sql);
Assert.assertEquals("Bad date value", d, sql.getDate());
Assert.assertEquals("Bad time value", t, sql.getTime());
Assert.assertEquals("Bad timestamp value", ts, sql.getTimestamp());
pm.currentTransaction().begin();
pm.deletePersistent(sql);
pm.currentTransaction().commit();
pm.close();
}