The TCK contains tests of persistence capable classes whose fields are Maps of different types.
Class |
Key type |
Value type |
HashMapStringKeyCollections |
String |
* |
HashMapStringValueCollections |
* |
String |
HashtableStringKeyCollections |
String |
* |
HashtableStringValueCollections |
* |
String |
MapStringKeyCollections |
String |
* |
MapStringValueCollections |
* |
String |
TreeMapStringKeyCollections |
String |
* |
TreeMapStringValueCollections |
* |
String |
where * includes Object, SimpleInterface, SimpleClass, String, Date, and various wrapper types.
Maps of Persistence Capable (PC) Types
These are maps where either the key or value is a PC type (Object, SimpleInterface, or SimpleClass). The other member of the entry is a String.
Collection field is serialized in the main table (S)
String is embedded in a join table; PC is mapped to a foreign key column in the join table. The fk references the primary key of the table containing the PC. (efk) (default)
PC value is serialized in a join table, the String key of the mapped pair is stored in another column of the join table. (es) (This case is does not apply when the key is a PC type; serializing a key does not make sense.)
PC and String embedded in a join table. (ee)
Maps of Java Types
These are maps where the either the key or the value is a String and the other member of the entry is a Java type (String, Date, or wrapper class). We test the following cases:
Collection field is serialized in the main table (S)
Both key and value are embedded in a join table (ee)
Metadata for Maps
Key is String, value is * |
||
case |
jdo metadata |
orm metadata |
S |
<field serialized="true"> |
<field name="name"> |
efk |
<map embedded-key="true" embedded-value="false"> |
<field name="name" table="join_table"> |
es |
<map embedded-key="true" serialized-value="true"> |
<field name="name" table="join_table"> |
ee |
<map embedded-key="true" embedded-value="true"> |
<field name="name" table="join_table"> |
Key is *, value is String |
||
case |
jdo metadata |
orm metadata |
S |
<field serialized="true"> |
<field name="name"> |
efk |
<map embedded-key="false" embedded-value="true"> |
<field name="name" table="join_table"> |
ee |
<map embedded-key="true" embedded-value="true"> |
<field name="name" table="join_table"> |
Applying cases to existing fields of Test*MapStringKeyCollections
PC Values
Fields |
Case |
Object0, SimpleClass3, SimpleInterface6 |
efk (default for embedded-key & embedded-value) |
Object1, SimpleClass4, SimpleInterface7 |
efk (default for embedded-value) |
Object2, SimpleClass5, SimpleInterface8 |
efk (embedded-key & embedded-value specified) |
Object42, SimpleClass45, SimpleInterface48 |
ee (embedded-key & embedded-value specified) |
Object43, SimpleClass46, SimpleInterface49 |
ee (default for embedded-key) |
Object84, SimpleClass87, SimpleInterface90 |
es (embedded-key & embedded-value specified) |
Object86, SimpleClass89, SimpleInterface92 |
S |
PC Keys
Fields |
Case |
Object0, SimpleClass9, SimpleInterface18 |
efk (default for embedded-key & embedded-value) |
Object1, SimpleClass10, SimpleInterface19 |
efk (default for embedded-key) |
Object2, SimpleClass11, SimpleInterface20 |
efk (embedded-key & embedded-value specified) |
Object3, SimpleClass12, SimpleInterface21 |
ee (embedded-key & embedded-value specified) |
Object4, SimpleClass13, SimpleInterface22 |
ee (default for embedded-value) |
Object6, SimpleClass15, SimpleInterface24 |
ee (embedded-key & embedded-value specified) |
Object8, SimpleClass17, SimpleInterface26 |
S |
Java type keys, values
Fields |
Case |
String27, ... |
ee (default for embedded-key & embedded-value) |
String28, ... |
ee (default for embedded-key) |
String29, ... |
ee (embedded-key & embedded-value specified) |
String30, ... |
ee (default for embedded-key & embedded-value) |
String31, ... |
ee (default for embedded-value) |
String33, ... |
ee (embedded-key & embedded-value specified) |
String35, ... |
S |