Public Member Functions |
void | deleteAll () |
void | verifyDeleteAll () |
void | createAll () |
void | findAll () |
void | updateThenVerifyAll () |
void | deleteThenVerifyAll () |
void | setUp () |
void | setUp (Object...props) |
void | tearDown () throws Exception |
Static Protected Member Functions |
static long | getMillisFor (int year, int month, int day, int hour, int minute, int second) |
static long | getMillisFor (int year, int month, int day) |
static long | getMillisFor (int days, int hour, int minute, int second) |
static void | resetLocalSystemDefaultTimeZone (Connection connection) |
Protected Attributes |
Connection | connection |
EntityManager | em |
EntityTransaction | tx |
EntityManagerFactory | emf |
TestResult | testResult |
Map | map |
Detailed Description
Definition at line 39 of file AbstractJPABaseTest.java.
Member Function Documentation
void com.mysql.clusterj.jpatest.AbstractJPABaseTest.generateInstances |
( |
ColumnDescriptor[] |
columnDescriptors | ) |
|
|
inlineprotected |
Generated instances to persist. When using JDBC, the data is obtained from the instance via the column descriptors. As a side effect (!) create the list of expected results from read.
- Parameters
-
columnDescriptors | the column descriptors |
- Returns
- the generated instances
Definition at line 366 of file AbstractJPABaseTest.java.
ColumnDescriptor [] com.mysql.clusterj.jpatest.AbstractJPABaseTest.getColumnDescriptors |
( |
| ) |
|
|
inlineprotected |
Object com.mysql.clusterj.jpatest.AbstractJPABaseTest.getColumnValue |
( |
int |
i, |
|
|
int |
j |
|
) |
| |
|
inlineprotected |
boolean com.mysql.clusterj.jpatest.AbstractJPABaseTest.getDebug |
( |
| ) |
|
|
inlineprotected |
Subclasses can override this method to get debugging info printed to System.out
Reimplemented in com.mysql.clusterj.jpatest.BigIntegerTypesTest, com.mysql.clusterj.jpatest.DecimalTypesTest, com.mysql.clusterj.jpatest.DateAsUtilDateTest, com.mysql.clusterj.jpatest.TimestampAsUtilDateTest, com.mysql.clusterj.jpatest.DateAsSqlDateTest, com.mysql.clusterj.jpatest.TimestampAsSqlTimestampTest, com.mysql.clusterj.jpatest.DatetimeAsUtilDateTest, com.mysql.clusterj.jpatest.DatetimeAsSqlTimestampTest, com.mysql.clusterj.jpatest.TimeAsSqlTimeTest, com.mysql.clusterj.jpatest.TimeAsUtilDateTest, com.mysql.clusterj.jpatest.ClobTest, com.mysql.clusterj.jpatest.EmbeddedTest, and com.mysql.clusterj.jpatest.BlobTest.
Definition at line 322 of file AbstractJPABaseTest.java.
List<Object[]> com.mysql.clusterj.jpatest.AbstractJPABaseTest.getExpected |
( |
| ) |
|
|
inlineprotected |
Subclasses usually should not override this method to provide the list of expected results
Definition at line 327 of file AbstractJPABaseTest.java.
static long com.mysql.clusterj.jpatest.AbstractJPABaseTest.getMillisFor |
( |
int |
year, |
|
|
int |
month, |
|
|
int |
day, |
|
|
int |
hour, |
|
|
int |
minute, |
|
|
int |
second |
|
) |
| |
|
inlinestaticprotected |
Convert year, month, day, hour, minute, second into milliseconds after the Epoch, UCT.
- Parameters
-
year | the year |
month | the month (0 for January) |
day | the day of the month |
hour | the hour of the day |
minute | the minute |
second | the second |
- Returns
Definition at line 185 of file AbstractJPABaseTest.java.
static long com.mysql.clusterj.jpatest.AbstractJPABaseTest.getMillisFor |
( |
int |
year, |
|
|
int |
month, |
|
|
int |
day |
|
) |
| |
|
inlinestaticprotected |
Convert year, month, day into milliseconds after the Epoch, UCT. Set hours, minutes, seconds, and milliseconds to zero.
- Parameters
-
year | the year |
month | the month (0 for January) |
day | the day of the month |
- Returns
Definition at line 206 of file AbstractJPABaseTest.java.
static long com.mysql.clusterj.jpatest.AbstractJPABaseTest.getMillisFor |
( |
int |
days, |
|
|
int |
hour, |
|
|
int |
minute, |
|
|
int |
second |
|
) |
| |
|
inlinestaticprotected |
Convert days, hours, minutes, and seconds into milliseconds after the Epoch, UCT. Date is index origin 1 so add one to the number of days. Default year and month, as these are assumed by Calendar to be the Epoch.
- Parameters
-
day | the number of days |
hour | the hour (or number of hours) |
minute | the minute (or number of minutes) |
second | the second (or number of seconds) |
- Returns
- millis past the Epoch UCT
Definition at line 229 of file AbstractJPABaseTest.java.
Class<? extends IdBase> com.mysql.clusterj.jpatest.AbstractJPABaseTest.getModelClass |
( |
| ) |
|
|
inlineprotected |
Subclasses must override this method to provide the model class for the test
Reimplemented in com.mysql.clusterj.jpatest.BigIntegerTypesTest, com.mysql.clusterj.jpatest.DecimalTypesTest, com.mysql.clusterj.jpatest.DateAsSqlDateTest, com.mysql.clusterj.jpatest.DateAsUtilDateTest, com.mysql.clusterj.jpatest.TimestampAsUtilDateTest, com.mysql.clusterj.jpatest.TimestampAsSqlTimestampTest, com.mysql.clusterj.jpatest.DatetimeAsUtilDateTest, com.mysql.clusterj.jpatest.DatetimeAsSqlTimestampTest, com.mysql.clusterj.jpatest.TimeAsSqlTimeTest, com.mysql.clusterj.jpatest.TimeAsUtilDateTest, com.mysql.clusterj.jpatest.EmbeddedTest, and com.mysql.clusterj.jpatest.LazyTest.
Definition at line 352 of file AbstractJPABaseTest.java.
IdBase com.mysql.clusterj.jpatest.AbstractJPABaseTest.getNewInstance |
( |
Class<?extends IdBase > |
modelClass | ) |
|
|
inlineprotected |
int com.mysql.clusterj.jpatest.AbstractJPABaseTest.getNumberOfInstances |
( |
| ) |
|
|
inlineprotected |
String com.mysql.clusterj.jpatest.AbstractJPABaseTest.getTableName |
( |
| ) |
|
|
inlineprotected |
List<Object[]> com.mysql.clusterj.jpatest.AbstractJPABaseTest.readFromJDBC |
( |
ColumnDescriptor[] |
columnDescriptors | ) |
|
|
inlineprotected |
List<Object[]> com.mysql.clusterj.jpatest.AbstractJPABaseTest.readFromJPA |
( |
ColumnDescriptor[] |
columnDescriptors | ) |
|
|
inlineprotected |
static void com.mysql.clusterj.jpatest.AbstractJPABaseTest.resetLocalSystemDefaultTimeZone |
( |
Connection |
connection | ) |
|
|
inlinestaticprotected |
Reset the local system default time zone to the time zone used by the MySQL server. This guarantees that there is no time zone offset between the time zone in the client and the time zone in the server.
- Parameters
-
Definition at line 247 of file AbstractJPABaseTest.java.
void com.mysql.clusterj.jpatest.AbstractJPABaseTest.verify |
( |
String |
where, |
|
|
List< Object[]> |
expecteds, |
|
|
List< Object[]> |
actuals |
|
) |
| |
|
inlineprotected |
Verify that the actual results match the expected results. If not, use the multiple error reporting method errorIfNotEqual defined in the superclass.
- Parameters
-
where | the location of the verification of results, normally the name of the test method |
expecteds | the expected results |
actuals | the actual results |
Definition at line 399 of file AbstractJPABaseTest.java.
void com.mysql.clusterj.jpatest.AbstractJPABaseTest.writeJDBCreadJDBC |
( |
| ) |
|
|
inlineprotected |
void com.mysql.clusterj.jpatest.AbstractJPABaseTest.writeJDBCreadJPA |
( |
| ) |
|
|
inlineprotected |
void com.mysql.clusterj.jpatest.AbstractJPABaseTest.writeJPAreadJDBC |
( |
| ) |
|
|
inlineprotected |
void com.mysql.clusterj.jpatest.AbstractJPABaseTest.writeJPAreadJPA |
( |
| ) |
|
|
inlineprotected |
void com.mysql.clusterj.jpatest.AbstractJPABaseTest.writeToJDBC |
( |
ColumnDescriptor[] |
columnDescriptors, |
|
|
List< IdBase > |
instances |
|
) |
| |
|
inlineprotected |
void com.mysql.clusterj.jpatest.AbstractJPABaseTest.writeToJPA |
( |
ColumnDescriptor[] |
columnDescriptors, |
|
|
List< IdBase > |
instances |
|
) |
| |
|
inlineprotected |
Member Data Documentation
Connection com.mysql.clusterj.jpatest.AbstractJPABaseTest.connection |
|
protected |
boolean com.mysql.clusterj.jpatest.AbstractJPABaseTest.debug |
|
staticprotected |
TimeZone com.mysql.clusterj.jpatest.AbstractJPABaseTest.localSystemTimeZone = TimeZone.getDefault() |
|
staticprotected |
The local system default time zone, which is reset by resetLocalSystemDefaultTimeZone
Definition at line 42 of file AbstractJPABaseTest.java.
The documentation for this class was generated from the following file: