MySQL 5.6.14 Source Code Document
|
Classes | |
class | ColumnDescriptor |
interface | InstanceHandler |
Public Member Functions | |
void | localSetUp () |
Public Member Functions inherited from testsuite.clusterj.AbstractClusterJTest | |
void | createSession () |
Protected Member Functions | |
boolean | getCleanupAfterTest () |
void | setAutoCommit (Connection connection, boolean b) |
void | createEmployeeInstances (int count) |
void | consistencyCheck (Employee emp) |
void | createDn2idInstances (int number) |
void | consistencyCheck (Dn2id dn2id) |
List< Object[]> | getExpected () |
String | getTableName () |
int | getNumberOfInstances () |
ColumnDescriptor[] | getColumnDescriptors () |
Object | getColumnValue (int i, int j) |
void | writeJDBCreadNDB () |
void | writeJDBCreadJDBC () |
void | writeNDBreadNDB () |
void | writeNDBreadJDBC () |
void | queryAndVerifyResults (String where, ColumnDescriptor[] columnDescriptors, String conditions, Object[] parameters, int...objectIds) |
List< Object[]> | queryJDBC (ColumnDescriptor[] columnDescriptors, String conditions, Object[] parameters) |
void | verifyQueryResults (String where, List< Object[]> results, int...objectIds) |
void | verify (String where, List< Object[]> expecteds, List< Object[]> actuals) |
void | generateInstances (ColumnDescriptor[] columnDescriptors) |
IdBase | getNewInstance (Class<?extends IdBase > modelClass) |
void | writeToJDBC (ColumnDescriptor[] columnDescriptors, List< IdBase > instances) |
void | writeToNDB (ColumnDescriptor[] columnDescriptors, List< IdBase > instances) |
List< Object[]> | readFromNDB (ColumnDescriptor[] columnDescriptors) |
List< Object[]> | readFromJDBC (ColumnDescriptor[] columnDescriptors) |
String | getA1for (int number, int index) |
String | getA3for (long i) |
void | createAllPrimitivesInstances (int number) |
void | createAllPrimitivesInstances (Session session, int number) |
AllPrimitives | createAllPrimitiveInstance (Session session, int i) |
void | initialize (AllPrimitives instance, int i) |
Protected Member Functions inherited from testsuite.clusterj.AbstractClusterJTest | |
boolean | getDebug () |
void | addTearDownClasses (Class<?>...classes) |
void | createSessionFactory () |
Properties | modifyProperties () |
void | dumpSystemProperties () |
void | error (String message) |
void | error (String context, Exception ex) |
void | errorIfNotEqual (String message, Object expected, Object actual) |
void | errorIfNotEqual (String message, int[] expected, int[] actual) |
void | errorIfEqual (String message, Object expected, Object actual) |
void | failOnError () |
void | closeConnection () |
void | getConnection (Properties extraProperties) |
Connection | getConnection () |
void | getConnection (String propertiesFileName) |
void | loadDriver () |
void | initializeErrorMessages () |
void | initializeJDBC () |
void | initializeSchema () |
void | loadProperties () |
void | loadProperties (String propsFileName) |
void | loadSchema () |
void | loadSchemaDefinition () |
void | localTearDown () |
final void | setUp () throws Exception |
final void | tearDown () throws Exception |
void | removeAll (Class<?> cls) |
boolean | testSchema () |
boolean | resetSchema () |
String | dump (List< String > list) |
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) |
static Object[] | setupDn2idPK () |
Static Protected Member Functions inherited from testsuite.clusterj.AbstractClusterJTest | |
static String | dump (String string) |
Protected Attributes | |
List< Employee > | employees |
List< Dn2id > | dn2ids |
List< IdBase > | instances = new ArrayList<IdBase>() |
ClassLoader | loader |
Protected Attributes inherited from testsuite.clusterj.AbstractClusterJTest | |
Session | session |
SessionFactory | sessionFactory |
Transaction | tx |
boolean | debug |
Static Protected Attributes | |
static TimeZone | localSystemTimeZone = TimeZone.getDefault() |
static final long | ONE_SECOND = 1000L |
static final long | ONE_MINUTE = 1000L * 60L |
static final long | ONE_HOUR = 1000L * 60L * 60L |
static final long | TEN_HOURS = 1000L * 60L * 60L * 10L |
static final long | ONE_DAY = 1000L * 60L * 60L * 24L |
static Object[] | dn2idPK = setupDn2idPK() |
Static Protected Attributes inherited from testsuite.clusterj.AbstractClusterJTest | |
static final String | JDBC_DRIVER_NAME = "jdbc.driverName" |
static final String | JDBC_URL = "jdbc.url" |
static Connection | connection |
static String | jdbcDriverName |
static String | jdbcPassword |
static String | jdbcURL |
static String | jdbcUsername |
static Properties | props |
static List< String > | schemaDefinition = new ArrayList<String>() |
static boolean | schemaInitialized = false |
Definition at line 45 of file AbstractClusterJModelTest.java.
|
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.
columnDescriptors | the column descriptors |
Definition at line 483 of file AbstractClusterJModelTest.java.
|
inlineprotected |
Subclasses must override this method to provide the column descriptors for the test
Reimplemented in testsuite.clusterj.BitTypesTest, testsuite.clusterj.VarbinaryTypesTest, testsuite.clusterj.BinaryTypesTest, testsuite.clusterj.TimestampAsUtilDateTypesTest, testsuite.clusterj.DateAsUtilDateTypesTest, testsuite.clusterj.DatetimeAsUtilDateTypesTest, testsuite.clusterj.TimeAsUtilDateTypesTest, testsuite.clusterj.TimestampAsSqlTimestampTypesTest, testsuite.clusterj.DatetimeAsSqlTimestampTypesTest, testsuite.clusterj.TimeAsSqlTimeTypesTest, testsuite.clusterj.DateAsSqlDateTypesTest, testsuite.clusterj.BigIntegerTypesTest, and testsuite.clusterj.DecimalTypesTest.
Definition at line 313 of file AbstractClusterJModelTest.java.
|
inlineprotected |
Subclasses must override this method to provide values for rows (i) and columns (j)
Reimplemented in testsuite.clusterj.TimestampAsUtilDateTypesTest, testsuite.clusterj.TimestampAsSqlTimestampTypesTest, testsuite.clusterj.BigIntegerTypesTest, testsuite.clusterj.DatetimeAsUtilDateTypesTest, testsuite.clusterj.DecimalTypesTest, testsuite.clusterj.TimeAsUtilDateTypesTest, testsuite.clusterj.DateAsSqlDateTypesTest, testsuite.clusterj.DateAsUtilDateTypesTest, testsuite.clusterj.DatetimeAsSqlTimestampTypesTest, testsuite.clusterj.TimeAsSqlTimeTypesTest, testsuite.clusterj.VarbinaryTypesTest, testsuite.clusterj.BinaryTypesTest, and testsuite.clusterj.BitTypesTest.
Definition at line 323 of file AbstractClusterJModelTest.java.
|
inlineprotected |
Subclasses usually should not override this method to provide the list of expected results
Definition at line 298 of file AbstractClusterJModelTest.java.
|
inlinestaticprotected |
Convert year, month, day, hour, minute, second into milliseconds after the Epoch, UCT.
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 |
Definition at line 74 of file AbstractClusterJModelTest.java.
|
inlinestaticprotected |
Convert year, month, day into milliseconds after the Epoch, UCT. Set hours, minutes, seconds, and milliseconds to zero.
year | the year |
month | the month (0 for January) |
day | the day of the month |
Definition at line 95 of file AbstractClusterJModelTest.java.
|
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.
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) |
Definition at line 118 of file AbstractClusterJModelTest.java.
|
inlineprotected |
Create a new instance of the parameter interface
modelClass | the interface to instantiate |
Definition at line 514 of file AbstractClusterJModelTest.java.
|
inlineprotected |
Subclasses must override this method to provide the number of instances to create
Reimplemented in jdbctest.JDBCQueryTest, testsuite.clusterj.TimestampAsUtilDateTypesTest, testsuite.clusterj.TimestampAsSqlTimestampTypesTest, testsuite.clusterj.BigIntegerTypesTest, testsuite.clusterj.DatetimeAsUtilDateTypesTest, testsuite.clusterj.DecimalTypesTest, testsuite.clusterj.TimeAsUtilDateTypesTest, testsuite.clusterj.DateAsSqlDateTypesTest, testsuite.clusterj.DateAsUtilDateTypesTest, testsuite.clusterj.DatetimeAsSqlTimestampTypesTest, testsuite.clusterj.TimeAsSqlTimeTypesTest, testsuite.clusterj.VarbinaryTypesTest, testsuite.clusterj.BinaryTypesTest, testsuite.clusterj.BitTypesTest, and testsuite.clusterj.AbstractQueryTest.
Definition at line 308 of file AbstractClusterJModelTest.java.
|
inlineprotected |
Subclasses must override this method to provide the name of the table for the test
Reimplemented in testsuite.clusterj.TimestampAsUtilDateTypesTest, testsuite.clusterj.TimestampAsSqlTimestampTypesTest, testsuite.clusterj.BigIntegerTypesTest, testsuite.clusterj.DatetimeAsUtilDateTypesTest, testsuite.clusterj.DecimalTypesTest, testsuite.clusterj.TimeAsUtilDateTypesTest, testsuite.clusterj.DateAsSqlDateTypesTest, testsuite.clusterj.DateAsUtilDateTypesTest, testsuite.clusterj.DatetimeAsSqlTimestampTypesTest, testsuite.clusterj.TimeAsSqlTimeTypesTest, testsuite.clusterj.VarbinaryTypesTest, testsuite.clusterj.BinaryTypesTest, and testsuite.clusterj.BitTypesTest.
Definition at line 303 of file AbstractClusterJModelTest.java.
|
inline |
Subclasses may override this method to allocate any data and resources that they need in order to successfully execute this testcase. Adding teardown classes and instances is done in the overridden method.
Reimplemented from testsuite.clusterj.AbstractClusterJTest.
Reimplemented in testsuite.clusterj.MultithreadedTest, testsuite.clusterj.MultiplePKTest, testsuite.clusterj.CharsetTest, testsuite.clusterj.AbstractQueryTest, testsuite.clusterj.DynamicObjectTest, testsuite.clusterj.TimestampAsUtilDateTypesTest, testsuite.clusterj.TimestampAsSqlTimestampTypesTest, testsuite.clusterj.DomainTypeHandlerFactoryTest, testsuite.clusterj.NullValuesTest, jdbctest.BatchTest, testsuite.clusterj.FindByPrimaryKey2Test, testsuite.clusterj.MultithreadedFindTest, testsuite.clusterj.NotPersistentTest, testsuite.clusterj.AutoCommitTest, testsuite.clusterj.BlobTest, testsuite.clusterj.LoadTest, testsuite.clusterj.QueryPrimaryKeyTest, testsuite.clusterj.QueryUniqueKeyTest, testsuite.clusterj.QueryTableScanTest, testsuite.clusterj.NegativeMetadataTest, testsuite.clusterj.SerialTransactionsTest, testsuite.clusterj.DefaultConnectValuesTest, testsuite.clusterj.DeleteAllByClassTest, testsuite.clusterj.FindByPrimaryKeyTest, testsuite.clusterj.SaveTest, testsuite.clusterj.UpdateTest, testsuite.clusterj.DeleteInsertTest, testsuite.clusterj.TransactionStateTest, and jdbctest.JDBCQueryTest.
Definition at line 160 of file AbstractClusterJModelTest.java.
|
inlineprotected |
Read data via JDBC
Definition at line 388 of file AbstractClusterJModelTest.java.
|
inlineprotected |
Read data via JDBC ordered by id
Definition at line 601 of file AbstractClusterJModelTest.java.
|
inlineprotected |
Read data via NDB
Definition at line 568 of file AbstractClusterJModelTest.java.
|
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.
connection |
Definition at line 175 of file AbstractClusterJModelTest.java.
|
inlineprotected |
Verify that the actual results match the expected results. If not, use the multiple error reporting method errorIfNotEqual defined in the superclass.
where | the location of the verification of results, normally the name of the test method |
expecteds | the expected results |
actuals | the actual results |
Reimplemented in testsuite.clusterj.BitTypesTest, testsuite.clusterj.VarbinaryTypesTest, and testsuite.clusterj.BinaryTypesTest.
Definition at line 461 of file AbstractClusterJModelTest.java.
|
inlineprotected |
Write data via JDBC and read back the data via JDBC
Definition at line 338 of file AbstractClusterJModelTest.java.
|
inlineprotected |
Write data via JDBC and read back the data via NDB
Definition at line 328 of file AbstractClusterJModelTest.java.
|
inlineprotected |
Write data via NDB and read back the data via JDBC
Definition at line 358 of file AbstractClusterJModelTest.java.
|
inlineprotected |
Write data via NDB and read back the data via NDB
Definition at line 348 of file AbstractClusterJModelTest.java.
|
inlineprotected |
Write data to JDBC.
Definition at line 521 of file AbstractClusterJModelTest.java.
|
inlineprotected |
Write data via NDB
Definition at line 561 of file AbstractClusterJModelTest.java.
|
protected |
The instances used in the tests, generated by generateInstances
Definition at line 140 of file AbstractClusterJModelTest.java.
|
protected |
The class loader for the domain object type
Definition at line 149 of file AbstractClusterJModelTest.java.
|
staticprotected |
The local system default time zone, which is reset by resetLocalSystemDefaultTimeZone
Definition at line 48 of file AbstractClusterJModelTest.java.
|
staticprotected |
ONE_DAY is the number of milliseconds in one day.
Definition at line 63 of file AbstractClusterJModelTest.java.
|
staticprotected |
ONE_HOUR is the number of milliseconds in one hour.
Definition at line 57 of file AbstractClusterJModelTest.java.
|
staticprotected |
ONE_MINUTE is the number of milliseconds in one minute.
Definition at line 54 of file AbstractClusterJModelTest.java.
|
staticprotected |
ONE_SECOND is the number of milliseconds in one second.
Definition at line 51 of file AbstractClusterJModelTest.java.
|
staticprotected |
TEN_HOURS is the number of milliseconds in ten hours.
Definition at line 60 of file AbstractClusterJModelTest.java.