Protected Member Functions |
void | writeJDBCreadJDBC (String charsetName, String tableName, Class<?extends CharsetModel > modelClass, ColumnDescriptor columnDescriptor) |
void | writeJDBCreadNDB (String charsetName, String tableName, Class<?extends CharsetModel > modelClass, ColumnDescriptor columnDescriptor) |
void | writeNDBreadJDBC (String charsetName, String tableName, Class<?extends CharsetModel > modelClass, ColumnDescriptor columnDescriptor) |
void | writeNDBreadNDB (String charsetName, String tableName, Class<?extends CharsetModel > modelClass, ColumnDescriptor columnDescriptor) |
List< String > | generateStrings (ColumnDescriptor columnDescriptor, String charsetName) |
List< CharsetModel > | generateInstances (ColumnDescriptor columnDescriptor, Class<?extends CharsetModel > modelClass, List< String > strings) |
void | writeToJDBC (ColumnDescriptor columnDescriptor, String tableName, List< CharsetModel > instances) |
void | writeToNDB (ColumnDescriptor columnDescriptor, List< CharsetModel > instances) |
List< String > | readFromNDB (ColumnDescriptor columnDescriptor, Class<?extends CharsetModel > modelClass) |
List< String > | readFromJDBC (ColumnDescriptor columnDescriptor, String tableName) |
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) |
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) |
Additional Inherited Members |
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 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() |
Test that all characters in supported character sets can be read and written.
- Identify which character sets to test.
- For each character set, create a table with an id column and three VARCHAR columns (one with length < 256 another with length > 256, and a third with length > 8000) with the test character set.
- For each table, write a persistent interface that maps the table.
- For each persistent interface: a) create an empty list of String b) create a CharBuffer containing all mappable characters for the character set from the range 0:65535 c) map the CharBuffer to a ByteBuffer of length equal to the size of the VARCHAR column d) create a String from the characters in the CharBuffer that could fit into the column e) add the String to the list of String f) continue from c) until all characters have been represented in the list of String g) remove all rows of the table h) use JDBC or clusterj to write a row in the database for each String in the list i) use JDBC or clusterj to read all rows and compare the String to the list of Strings
Definition at line 60 of file CharsetTest.java.