The TCK contains tests of persistence capable classes whose fields are Maps of different types.

Class

Key type

Value type

Hash{{`Map}}StringKey`Collections

String

*

Hash{{`Map}}StringValue`Collections

*

String

Hashtable{{`String}}Key`Collections

String

*

Hashtable{{`String}}Value`Collections

*

String

Map{{`String}}Key`Collections

String

*

Map{{`String}}Value`Collections

*

String

Tree{{`Map}}StringKey`Collections

String

*

Tree{{`Map}}StringValue`Collections

*

String

where * includes Object, Simple{{`Interface, Simple}}`Class, 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, Simple{{`Interface, or Simple}}`Class). 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, Simple{{`Class3, Simple}}`Interface6

efk (default for embedded-key & embedded-value)

Object1, Simple{{`Class4, Simple}}`Interface7

efk (default for embedded-value)

Object2, Simple{{`Class5, Simple}}`Interface8

efk (embedded-key & embedded-value specified)

Object42, Simple{{`Class45, Simple}}`Interface48

ee (embedded-key & embedded-value specified)

Object43, Simple{{`Class46, Simple}}`Interface49

ee (default for embedded-key)

Object84, Simple{{`Class87, Simple}}`Interface90

es (embedded-key & embedded-value specified)

Object86, Simple{{`Class89, Simple}}`Interface92

S

PC Keys

Fields

Case

Object0, Simple{{`Class9, Simple}}`Interface18

efk (default for embedded-key & embedded-value)

Object1, Simple{{`Class10, Simple}}`Interface19

efk (default for embedded-key)

Object2, Simple{{`Class11, Simple}}`Interface20

efk (embedded-key & embedded-value specified)

Object3, Simple{{`Class12, Simple}}`Interface21

ee (embedded-key & embedded-value specified)

Object4, Simple{{`Class13, Simple}}`Interface22

ee (default for embedded-value)

Object6, Simple{{`Class15, Simple}}`Interface24

ee (embedded-key & embedded-value specified)

Object8, Simple{{`Class17, Simple}}`Interface26

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

  • No labels