Added: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/fieldtypes/HashMapStringKeyCollections.java URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/fieldtypes/HashMapStringKeyCollections.java?view=auto&rev=158179 ============================================================================== --- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/fieldtypes/HashMapStringKeyCollections.java (added) +++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/fieldtypes/HashMapStringKeyCollections.java Fri Mar 18 17:07:39 2005 @@ -0,0 +1,954 @@ +/* + * Copyright 2005 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jdo.tck.pc.fieldtypes; + +import java.io.Serializable; +import java.util.HashMap; + +public class HashMapStringKeyCollections { + public int identifier; + public HashMap HashMapOfString_Object0; + public HashMap HashMapOfString_Object1; + public HashMap HashMapOfString_Object2; + public HashMap HashMapOfString_SimpleClass3; + public HashMap HashMapOfString_SimpleClass4; + public HashMap HashMapOfString_SimpleClass5; + public HashMap HashMapOfString_SimpleInterface6; + public HashMap HashMapOfString_SimpleInterface7; + public HashMap HashMapOfString_SimpleInterface8; + public HashMap HashMapOfString_String9; + public HashMap HashMapOfString_String10; + public HashMap HashMapOfString_String11; + public HashMap HashMapOfString_Date12; + public HashMap HashMapOfString_Date13; + public HashMap HashMapOfString_Date14; + public HashMap HashMapOfString_Locale15; + public HashMap HashMapOfString_Locale16; + public HashMap HashMapOfString_Locale17; + public HashMap HashMapOfString_BigDecimal18; + public HashMap HashMapOfString_BigDecimal19; + public HashMap HashMapOfString_BigDecimal20; + public HashMap HashMapOfString_BigInteger21; + public HashMap HashMapOfString_BigInteger22; + public HashMap HashMapOfString_BigInteger23; + public HashMap HashMapOfString_Byte24; + public HashMap HashMapOfString_Byte25; + public HashMap HashMapOfString_Byte26; + public HashMap HashMapOfString_Double27; + public HashMap HashMapOfString_Double28; + public HashMap HashMapOfString_Double29; + public HashMap HashMapOfString_Float30; + public HashMap HashMapOfString_Float31; + public HashMap HashMapOfString_Float32; + public HashMap HashMapOfString_Integer33; + public HashMap HashMapOfString_Integer34; + public HashMap HashMapOfString_Integer35; + public HashMap HashMapOfString_Long36; + public HashMap HashMapOfString_Long37; + public HashMap HashMapOfString_Long38; + public HashMap HashMapOfString_Short39; + public HashMap HashMapOfString_Short40; + public HashMap HashMapOfString_Short41; + public HashMap HashMapOfString_Object42; + public HashMap HashMapOfString_Object43; + public HashMap HashMapOfString_Object44; + public HashMap HashMapOfString_SimpleClass45; + public HashMap HashMapOfString_SimpleClass46; + public HashMap HashMapOfString_SimpleClass47; + public HashMap HashMapOfString_SimpleInterface48; + public HashMap HashMapOfString_SimpleInterface49; + public HashMap HashMapOfString_SimpleInterface50; + public HashMap HashMapOfString_String51; + public HashMap HashMapOfString_String52; + public HashMap HashMapOfString_String53; + public HashMap HashMapOfString_Date54; + public HashMap HashMapOfString_Date55; + public HashMap HashMapOfString_Date56; + public HashMap HashMapOfString_Locale57; + public HashMap HashMapOfString_Locale58; + public HashMap HashMapOfString_Locale59; + public HashMap HashMapOfString_BigDecimal60; + public HashMap HashMapOfString_BigDecimal61; + public HashMap HashMapOfString_BigDecimal62; + public HashMap HashMapOfString_BigInteger63; + public HashMap HashMapOfString_BigInteger64; + public HashMap HashMapOfString_BigInteger65; + public HashMap HashMapOfString_Byte66; + public HashMap HashMapOfString_Byte67; + public HashMap HashMapOfString_Byte68; + public HashMap HashMapOfString_Double69; + public HashMap HashMapOfString_Double70; + public HashMap HashMapOfString_Double71; + public HashMap HashMapOfString_Float72; + public HashMap HashMapOfString_Float73; + public HashMap HashMapOfString_Float74; + public HashMap HashMapOfString_Integer75; + public HashMap HashMapOfString_Integer76; + public HashMap HashMapOfString_Integer77; + public HashMap HashMapOfString_Long78; + public HashMap HashMapOfString_Long79; + public HashMap HashMapOfString_Long80; + public HashMap HashMapOfString_Short81; + public HashMap HashMapOfString_Short82; + public HashMap HashMapOfString_Short83; + public HashMap HashMapOfString_Object84; + public HashMap HashMapOfString_Object85; + public HashMap HashMapOfString_Object86; + public HashMap HashMapOfString_SimpleClass87; + public HashMap HashMapOfString_SimpleClass88; + public HashMap HashMapOfString_SimpleClass89; + public HashMap HashMapOfString_SimpleInterface90; + public HashMap HashMapOfString_SimpleInterface91; + public HashMap HashMapOfString_SimpleInterface92; + public HashMap HashMapOfString_String93; + public HashMap HashMapOfString_String94; + public HashMap HashMapOfString_String95; + public HashMap HashMapOfString_Date96; + public HashMap HashMapOfString_Date97; + public HashMap HashMapOfString_Date98; + public HashMap HashMapOfString_Locale99; + public HashMap HashMapOfString_Locale100; + public HashMap HashMapOfString_Locale101; + public HashMap HashMapOfString_BigDecimal102; + public HashMap HashMapOfString_BigDecimal103; + public HashMap HashMapOfString_BigDecimal104; + public HashMap HashMapOfString_BigInteger105; + public HashMap HashMapOfString_BigInteger106; + public HashMap HashMapOfString_BigInteger107; + public HashMap HashMapOfString_Byte108; + public HashMap HashMapOfString_Byte109; + public HashMap HashMapOfString_Byte110; + public HashMap HashMapOfString_Double111; + public HashMap HashMapOfString_Double112; + public HashMap HashMapOfString_Double113; + public HashMap HashMapOfString_Float114; + public HashMap HashMapOfString_Float115; + public HashMap HashMapOfString_Float116; + public HashMap HashMapOfString_Integer117; + public HashMap HashMapOfString_Integer118; + public HashMap HashMapOfString_Integer119; + public HashMap HashMapOfString_Long120; + public HashMap HashMapOfString_Long121; + public HashMap HashMapOfString_Long122; + public HashMap HashMapOfString_Short123; + public HashMap HashMapOfString_Short124; + public HashMap HashMapOfString_Short125; + + public static final String [] fieldSpecs = { + "public HashMap HashMapOfString_Object0", + "embedded-value=true public HashMap HashMapOfString_Object1", + "embedded-value=false public HashMap HashMapOfString_Object2", + "public HashMap HashMapOfString_SimpleClass3", + "embedded-value=true public HashMap HashMapOfString_SimpleClass4", + "embedded-value=false public HashMap HashMapOfString_SimpleClass5", + "public HashMap HashMapOfString_SimpleInterface6", + "embedded-value=true public HashMap HashMapOfString_SimpleInterface7", + "embedded-value=false public HashMap HashMapOfString_SimpleInterface8", + "public HashMap HashMapOfString_String9", + "embedded-value=true public HashMap HashMapOfString_String10", + "embedded-value=false public HashMap HashMapOfString_String11", + "public HashMap HashMapOfString_Date12", + "embedded-value=true public HashMap HashMapOfString_Date13", + "embedded-value=false public HashMap HashMapOfString_Date14", + "public HashMap HashMapOfString_Locale15", + "embedded-value=true public HashMap HashMapOfString_Locale16", + "embedded-value=false public HashMap HashMapOfString_Locale17", + "public HashMap HashMapOfString_BigDecimal18", + "embedded-value=true public HashMap HashMapOfString_BigDecimal19", + "embedded-value=false public HashMap HashMapOfString_BigDecimal20", + "public HashMap HashMapOfString_BigInteger21", + "embedded-value=true public HashMap HashMapOfString_BigInteger22", + "embedded-value=false public HashMap HashMapOfString_BigInteger23", + "public HashMap HashMapOfString_Byte24", + "embedded-value=true public HashMap HashMapOfString_Byte25", + "embedded-value=false public HashMap HashMapOfString_Byte26", + "public HashMap HashMapOfString_Double27", + "embedded-value=true public HashMap HashMapOfString_Double28", + "embedded-value=false public HashMap HashMapOfString_Double29", + "public HashMap HashMapOfString_Float30", + "embedded-value=true public HashMap HashMapOfString_Float31", + "embedded-value=false public HashMap HashMapOfString_Float32", + "public HashMap HashMapOfString_Integer33", + "embedded-value=true public HashMap HashMapOfString_Integer34", + "embedded-value=false public HashMap HashMapOfString_Integer35", + "public HashMap HashMapOfString_Long36", + "embedded-value=true public HashMap HashMapOfString_Long37", + "embedded-value=false public HashMap HashMapOfString_Long38", + "public HashMap HashMapOfString_Short39", + "embedded-value=true public HashMap HashMapOfString_Short40", + "embedded-value=false public HashMap HashMapOfString_Short41", + "embedded-key=true public HashMap HashMapOfString_Object42", + "embedded-key=true embedded-value=true public HashMap HashMapOfString_Object43", + "embedded-key=true embedded-value=false public HashMap HashMapOfString_Object44", + "embedded-key=true public HashMap HashMapOfString_SimpleClass45", + "embedded-key=true embedded-value=true public HashMap HashMapOfString_SimpleClass46", + "embedded-key=true embedded-value=false public HashMap HashMapOfString_SimpleClass47", + "embedded-key=true public HashMap HashMapOfString_SimpleInterface48", + "embedded-key=true embedded-value=true public HashMap HashMapOfString_SimpleInterface49", + "embedded-key=true embedded-value=false public HashMap HashMapOfString_SimpleInterface50", + "embedded-key=true public HashMap HashMapOfString_String51", + "embedded-key=true embedded-value=true public HashMap HashMapOfString_String52", + "embedded-key=true embedded-value=false public HashMap HashMapOfString_String53", + "embedded-key=true public HashMap HashMapOfString_Date54", + "embedded-key=true embedded-value=true public HashMap HashMapOfString_Date55", + "embedded-key=true embedded-value=false public HashMap HashMapOfString_Date56", + "embedded-key=true public HashMap HashMapOfString_Locale57", + "embedded-key=true embedded-value=true public HashMap HashMapOfString_Locale58", + "embedded-key=true embedded-value=false public HashMap HashMapOfString_Locale59", + "embedded-key=true public HashMap HashMapOfString_BigDecimal60", + "embedded-key=true embedded-value=true public HashMap HashMapOfString_BigDecimal61", + "embedded-key=true embedded-value=false public HashMap HashMapOfString_BigDecimal62", + "embedded-key=true public HashMap HashMapOfString_BigInteger63", + "embedded-key=true embedded-value=true public HashMap HashMapOfString_BigInteger64", + "embedded-key=true embedded-value=false public HashMap HashMapOfString_BigInteger65", + "embedded-key=true public HashMap HashMapOfString_Byte66", + "embedded-key=true embedded-value=true public HashMap HashMapOfString_Byte67", + "embedded-key=true embedded-value=false public HashMap HashMapOfString_Byte68", + "embedded-key=true public HashMap HashMapOfString_Double69", + "embedded-key=true embedded-value=true public HashMap HashMapOfString_Double70", + "embedded-key=true embedded-value=false public HashMap HashMapOfString_Double71", + "embedded-key=true public HashMap HashMapOfString_Float72", + "embedded-key=true embedded-value=true public HashMap HashMapOfString_Float73", + "embedded-key=true embedded-value=false public HashMap HashMapOfString_Float74", + "embedded-key=true public HashMap HashMapOfString_Integer75", + "embedded-key=true embedded-value=true public HashMap HashMapOfString_Integer76", + "embedded-key=true embedded-value=false public HashMap HashMapOfString_Integer77", + "embedded-key=true public HashMap HashMapOfString_Long78", + "embedded-key=true embedded-value=true public HashMap HashMapOfString_Long79", + "embedded-key=true embedded-value=false public HashMap HashMapOfString_Long80", + "embedded-key=true public HashMap HashMapOfString_Short81", + "embedded-key=true embedded-value=true public HashMap HashMapOfString_Short82", + "embedded-key=true embedded-value=false public HashMap HashMapOfString_Short83", + "embedded-key=false public HashMap HashMapOfString_Object84", + "embedded-key=false embedded-value=true public HashMap HashMapOfString_Object85", + "embedded-key=false embedded-value=false public HashMap HashMapOfString_Object86", + "embedded-key=false public HashMap HashMapOfString_SimpleClass87", + "embedded-key=false embedded-value=true public HashMap HashMapOfString_SimpleClass88", + "embedded-key=false embedded-value=false public HashMap HashMapOfString_SimpleClass89", + "embedded-key=false public HashMap HashMapOfString_SimpleInterface90", + "embedded-key=false embedded-value=true public HashMap HashMapOfString_SimpleInterface91", + "embedded-key=false embedded-value=false public HashMap HashMapOfString_SimpleInterface92", + "embedded-key=false public HashMap HashMapOfString_String93", + "embedded-key=false embedded-value=true public HashMap HashMapOfString_String94", + "embedded-key=false embedded-value=false public HashMap HashMapOfString_String95", + "embedded-key=false public HashMap HashMapOfString_Date96", + "embedded-key=false embedded-value=true public HashMap HashMapOfString_Date97", + "embedded-key=false embedded-value=false public HashMap HashMapOfString_Date98", + "embedded-key=false public HashMap HashMapOfString_Locale99", + "embedded-key=false embedded-value=true public HashMap HashMapOfString_Locale100", + "embedded-key=false embedded-value=false public HashMap HashMapOfString_Locale101", + "embedded-key=false public HashMap HashMapOfString_BigDecimal102", + "embedded-key=false embedded-value=true public HashMap HashMapOfString_BigDecimal103", + "embedded-key=false embedded-value=false public HashMap HashMapOfString_BigDecimal104", + "embedded-key=false public HashMap HashMapOfString_BigInteger105", + "embedded-key=false embedded-value=true public HashMap HashMapOfString_BigInteger106", + "embedded-key=false embedded-value=false public HashMap HashMapOfString_BigInteger107", + "embedded-key=false public HashMap HashMapOfString_Byte108", + "embedded-key=false embedded-value=true public HashMap HashMapOfString_Byte109", + "embedded-key=false embedded-value=false public HashMap HashMapOfString_Byte110", + "embedded-key=false public HashMap HashMapOfString_Double111", + "embedded-key=false embedded-value=true public HashMap HashMapOfString_Double112", + "embedded-key=false embedded-value=false public HashMap HashMapOfString_Double113", + "embedded-key=false public HashMap HashMapOfString_Float114", + "embedded-key=false embedded-value=true public HashMap HashMapOfString_Float115", + "embedded-key=false embedded-value=false public HashMap HashMapOfString_Float116", + "embedded-key=false public HashMap HashMapOfString_Integer117", + "embedded-key=false embedded-value=true public HashMap HashMapOfString_Integer118", + "embedded-key=false embedded-value=false public HashMap HashMapOfString_Integer119", + "embedded-key=false public HashMap HashMapOfString_Long120", + "embedded-key=false embedded-value=true public HashMap HashMapOfString_Long121", + "embedded-key=false embedded-value=false public HashMap HashMapOfString_Long122", + "embedded-key=false public HashMap HashMapOfString_Short123", + "embedded-key=false embedded-value=true public HashMap HashMapOfString_Short124", + "embedded-key=false embedded-value=false public HashMap HashMapOfString_Short125" + }; + public int getLength() + { + return fieldSpecs.length; + } + public HashMap get(int index) + { + switch (index) + { + case(0): + return HashMapOfString_Object0; + case(1): + return HashMapOfString_Object1; + case(2): + return HashMapOfString_Object2; + case(3): + return HashMapOfString_SimpleClass3; + case(4): + return HashMapOfString_SimpleClass4; + case(5): + return HashMapOfString_SimpleClass5; + case(6): + return HashMapOfString_SimpleInterface6; + case(7): + return HashMapOfString_SimpleInterface7; + case(8): + return HashMapOfString_SimpleInterface8; + case(9): + return HashMapOfString_String9; + case(10): + return HashMapOfString_String10; + case(11): + return HashMapOfString_String11; + case(12): + return HashMapOfString_Date12; + case(13): + return HashMapOfString_Date13; + case(14): + return HashMapOfString_Date14; + case(15): + return HashMapOfString_Locale15; + case(16): + return HashMapOfString_Locale16; + case(17): + return HashMapOfString_Locale17; + case(18): + return HashMapOfString_BigDecimal18; + case(19): + return HashMapOfString_BigDecimal19; + case(20): + return HashMapOfString_BigDecimal20; + case(21): + return HashMapOfString_BigInteger21; + case(22): + return HashMapOfString_BigInteger22; + case(23): + return HashMapOfString_BigInteger23; + case(24): + return HashMapOfString_Byte24; + case(25): + return HashMapOfString_Byte25; + case(26): + return HashMapOfString_Byte26; + case(27): + return HashMapOfString_Double27; + case(28): + return HashMapOfString_Double28; + case(29): + return HashMapOfString_Double29; + case(30): + return HashMapOfString_Float30; + case(31): + return HashMapOfString_Float31; + case(32): + return HashMapOfString_Float32; + case(33): + return HashMapOfString_Integer33; + case(34): + return HashMapOfString_Integer34; + case(35): + return HashMapOfString_Integer35; + case(36): + return HashMapOfString_Long36; + case(37): + return HashMapOfString_Long37; + case(38): + return HashMapOfString_Long38; + case(39): + return HashMapOfString_Short39; + case(40): + return HashMapOfString_Short40; + case(41): + return HashMapOfString_Short41; + case(42): + return HashMapOfString_Object42; + case(43): + return HashMapOfString_Object43; + case(44): + return HashMapOfString_Object44; + case(45): + return HashMapOfString_SimpleClass45; + case(46): + return HashMapOfString_SimpleClass46; + case(47): + return HashMapOfString_SimpleClass47; + case(48): + return HashMapOfString_SimpleInterface48; + case(49): + return HashMapOfString_SimpleInterface49; + case(50): + return HashMapOfString_SimpleInterface50; + case(51): + return HashMapOfString_String51; + case(52): + return HashMapOfString_String52; + case(53): + return HashMapOfString_String53; + case(54): + return HashMapOfString_Date54; + case(55): + return HashMapOfString_Date55; + case(56): + return HashMapOfString_Date56; + case(57): + return HashMapOfString_Locale57; + case(58): + return HashMapOfString_Locale58; + case(59): + return HashMapOfString_Locale59; + case(60): + return HashMapOfString_BigDecimal60; + case(61): + return HashMapOfString_BigDecimal61; + case(62): + return HashMapOfString_BigDecimal62; + case(63): + return HashMapOfString_BigInteger63; + case(64): + return HashMapOfString_BigInteger64; + case(65): + return HashMapOfString_BigInteger65; + case(66): + return HashMapOfString_Byte66; + case(67): + return HashMapOfString_Byte67; + case(68): + return HashMapOfString_Byte68; + case(69): + return HashMapOfString_Double69; + case(70): + return HashMapOfString_Double70; + case(71): + return HashMapOfString_Double71; + case(72): + return HashMapOfString_Float72; + case(73): + return HashMapOfString_Float73; + case(74): + return HashMapOfString_Float74; + case(75): + return HashMapOfString_Integer75; + case(76): + return HashMapOfString_Integer76; + case(77): + return HashMapOfString_Integer77; + case(78): + return HashMapOfString_Long78; + case(79): + return HashMapOfString_Long79; + case(80): + return HashMapOfString_Long80; + case(81): + return HashMapOfString_Short81; + case(82): + return HashMapOfString_Short82; + case(83): + return HashMapOfString_Short83; + case(84): + return HashMapOfString_Object84; + case(85): + return HashMapOfString_Object85; + case(86): + return HashMapOfString_Object86; + case(87): + return HashMapOfString_SimpleClass87; + case(88): + return HashMapOfString_SimpleClass88; + case(89): + return HashMapOfString_SimpleClass89; + case(90): + return HashMapOfString_SimpleInterface90; + case(91): + return HashMapOfString_SimpleInterface91; + case(92): + return HashMapOfString_SimpleInterface92; + case(93): + return HashMapOfString_String93; + case(94): + return HashMapOfString_String94; + case(95): + return HashMapOfString_String95; + case(96): + return HashMapOfString_Date96; + case(97): + return HashMapOfString_Date97; + case(98): + return HashMapOfString_Date98; + case(99): + return HashMapOfString_Locale99; + case(100): + return HashMapOfString_Locale100; + case(101): + return HashMapOfString_Locale101; + case(102): + return HashMapOfString_BigDecimal102; + case(103): + return HashMapOfString_BigDecimal103; + case(104): + return HashMapOfString_BigDecimal104; + case(105): + return HashMapOfString_BigInteger105; + case(106): + return HashMapOfString_BigInteger106; + case(107): + return HashMapOfString_BigInteger107; + case(108): + return HashMapOfString_Byte108; + case(109): + return HashMapOfString_Byte109; + case(110): + return HashMapOfString_Byte110; + case(111): + return HashMapOfString_Double111; + case(112): + return HashMapOfString_Double112; + case(113): + return HashMapOfString_Double113; + case(114): + return HashMapOfString_Float114; + case(115): + return HashMapOfString_Float115; + case(116): + return HashMapOfString_Float116; + case(117): + return HashMapOfString_Integer117; + case(118): + return HashMapOfString_Integer118; + case(119): + return HashMapOfString_Integer119; + case(120): + return HashMapOfString_Long120; + case(121): + return HashMapOfString_Long121; + case(122): + return HashMapOfString_Long122; + case(123): + return HashMapOfString_Short123; + case(124): + return HashMapOfString_Short124; + case(125): + return HashMapOfString_Short125; + default: + throw new IndexOutOfBoundsException(); + } + } + public boolean set(int index,HashMap value) + { + if(fieldSpecs[index].indexOf("final") != -1) + return false; + switch (index) + { + case(0): + HashMapOfString_Object0= value; + break; + case(1): + HashMapOfString_Object1= value; + break; + case(2): + HashMapOfString_Object2= value; + break; + case(3): + HashMapOfString_SimpleClass3= value; + break; + case(4): + HashMapOfString_SimpleClass4= value; + break; + case(5): + HashMapOfString_SimpleClass5= value; + break; + case(6): + HashMapOfString_SimpleInterface6= value; + break; + case(7): + HashMapOfString_SimpleInterface7= value; + break; + case(8): + HashMapOfString_SimpleInterface8= value; + break; + case(9): + HashMapOfString_String9= value; + break; + case(10): + HashMapOfString_String10= value; + break; + case(11): + HashMapOfString_String11= value; + break; + case(12): + HashMapOfString_Date12= value; + break; + case(13): + HashMapOfString_Date13= value; + break; + case(14): + HashMapOfString_Date14= value; + break; + case(15): + HashMapOfString_Locale15= value; + break; + case(16): + HashMapOfString_Locale16= value; + break; + case(17): + HashMapOfString_Locale17= value; + break; + case(18): + HashMapOfString_BigDecimal18= value; + break; + case(19): + HashMapOfString_BigDecimal19= value; + break; + case(20): + HashMapOfString_BigDecimal20= value; + break; + case(21): + HashMapOfString_BigInteger21= value; + break; + case(22): + HashMapOfString_BigInteger22= value; + break; + case(23): + HashMapOfString_BigInteger23= value; + break; + case(24): + HashMapOfString_Byte24= value; + break; + case(25): + HashMapOfString_Byte25= value; + break; + case(26): + HashMapOfString_Byte26= value; + break; + case(27): + HashMapOfString_Double27= value; + break; + case(28): + HashMapOfString_Double28= value; + break; + case(29): + HashMapOfString_Double29= value; + break; + case(30): + HashMapOfString_Float30= value; + break; + case(31): + HashMapOfString_Float31= value; + break; + case(32): + HashMapOfString_Float32= value; + break; + case(33): + HashMapOfString_Integer33= value; + break; + case(34): + HashMapOfString_Integer34= value; + break; + case(35): + HashMapOfString_Integer35= value; + break; + case(36): + HashMapOfString_Long36= value; + break; + case(37): + HashMapOfString_Long37= value; + break; + case(38): + HashMapOfString_Long38= value; + break; + case(39): + HashMapOfString_Short39= value; + break; + case(40): + HashMapOfString_Short40= value; + break; + case(41): + HashMapOfString_Short41= value; + break; + case(42): + HashMapOfString_Object42= value; + break; + case(43): + HashMapOfString_Object43= value; + break; + case(44): + HashMapOfString_Object44= value; + break; + case(45): + HashMapOfString_SimpleClass45= value; + break; + case(46): + HashMapOfString_SimpleClass46= value; + break; + case(47): + HashMapOfString_SimpleClass47= value; + break; + case(48): + HashMapOfString_SimpleInterface48= value; + break; + case(49): + HashMapOfString_SimpleInterface49= value; + break; + case(50): + HashMapOfString_SimpleInterface50= value; + break; + case(51): + HashMapOfString_String51= value; + break; + case(52): + HashMapOfString_String52= value; + break; + case(53): + HashMapOfString_String53= value; + break; + case(54): + HashMapOfString_Date54= value; + break; + case(55): + HashMapOfString_Date55= value; + break; + case(56): + HashMapOfString_Date56= value; + break; + case(57): + HashMapOfString_Locale57= value; + break; + case(58): + HashMapOfString_Locale58= value; + break; + case(59): + HashMapOfString_Locale59= value; + break; + case(60): + HashMapOfString_BigDecimal60= value; + break; + case(61): + HashMapOfString_BigDecimal61= value; + break; + case(62): + HashMapOfString_BigDecimal62= value; + break; + case(63): + HashMapOfString_BigInteger63= value; + break; + case(64): + HashMapOfString_BigInteger64= value; + break; + case(65): + HashMapOfString_BigInteger65= value; + break; + case(66): + HashMapOfString_Byte66= value; + break; + case(67): + HashMapOfString_Byte67= value; + break; + case(68): + HashMapOfString_Byte68= value; + break; + case(69): + HashMapOfString_Double69= value; + break; + case(70): + HashMapOfString_Double70= value; + break; + case(71): + HashMapOfString_Double71= value; + break; + case(72): + HashMapOfString_Float72= value; + break; + case(73): + HashMapOfString_Float73= value; + break; + case(74): + HashMapOfString_Float74= value; + break; + case(75): + HashMapOfString_Integer75= value; + break; + case(76): + HashMapOfString_Integer76= value; + break; + case(77): + HashMapOfString_Integer77= value; + break; + case(78): + HashMapOfString_Long78= value; + break; + case(79): + HashMapOfString_Long79= value; + break; + case(80): + HashMapOfString_Long80= value; + break; + case(81): + HashMapOfString_Short81= value; + break; + case(82): + HashMapOfString_Short82= value; + break; + case(83): + HashMapOfString_Short83= value; + break; + case(84): + HashMapOfString_Object84= value; + break; + case(85): + HashMapOfString_Object85= value; + break; + case(86): + HashMapOfString_Object86= value; + break; + case(87): + HashMapOfString_SimpleClass87= value; + break; + case(88): + HashMapOfString_SimpleClass88= value; + break; + case(89): + HashMapOfString_SimpleClass89= value; + break; + case(90): + HashMapOfString_SimpleInterface90= value; + break; + case(91): + HashMapOfString_SimpleInterface91= value; + break; + case(92): + HashMapOfString_SimpleInterface92= value; + break; + case(93): + HashMapOfString_String93= value; + break; + case(94): + HashMapOfString_String94= value; + break; + case(95): + HashMapOfString_String95= value; + break; + case(96): + HashMapOfString_Date96= value; + break; + case(97): + HashMapOfString_Date97= value; + break; + case(98): + HashMapOfString_Date98= value; + break; + case(99): + HashMapOfString_Locale99= value; + break; + case(100): + HashMapOfString_Locale100= value; + break; + case(101): + HashMapOfString_Locale101= value; + break; + case(102): + HashMapOfString_BigDecimal102= value; + break; + case(103): + HashMapOfString_BigDecimal103= value; + break; + case(104): + HashMapOfString_BigDecimal104= value; + break; + case(105): + HashMapOfString_BigInteger105= value; + break; + case(106): + HashMapOfString_BigInteger106= value; + break; + case(107): + HashMapOfString_BigInteger107= value; + break; + case(108): + HashMapOfString_Byte108= value; + break; + case(109): + HashMapOfString_Byte109= value; + break; + case(110): + HashMapOfString_Byte110= value; + break; + case(111): + HashMapOfString_Double111= value; + break; + case(112): + HashMapOfString_Double112= value; + break; + case(113): + HashMapOfString_Double113= value; + break; + case(114): + HashMapOfString_Float114= value; + break; + case(115): + HashMapOfString_Float115= value; + break; + case(116): + HashMapOfString_Float116= value; + break; + case(117): + HashMapOfString_Integer117= value; + break; + case(118): + HashMapOfString_Integer118= value; + break; + case(119): + HashMapOfString_Integer119= value; + break; + case(120): + HashMapOfString_Long120= value; + break; + case(121): + HashMapOfString_Long121= value; + break; + case(122): + HashMapOfString_Long122= value; + break; + case(123): + HashMapOfString_Short123= value; + break; + case(124): + HashMapOfString_Short124= value; + break; + case(125): + HashMapOfString_Short125= value; + break; + default: + throw new IndexOutOfBoundsException(); + } + return true; + } + + public static class Oid implements Serializable { + public int identifier; + + public Oid() { + } + + public Oid(String s) { identifier = Integer.parseInt(s); } + + public String toString() { return this.getClass().getName() + ": " + identifier;} + + public int hashCode() { return (int)identifier ; } + + public boolean equals(Object other) { + if (other != null && (other instanceof Oid)) { + Oid k = (Oid)other; + return k.identifier == this.identifier; + } + return false; + } + + } +}
Added: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/fieldtypes/HashMapStringValueCollections.java URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/fieldtypes/HashMapStringValueCollections.java?view=auto&rev=158179 ============================================================================== --- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/fieldtypes/HashMapStringValueCollections.java (added) +++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/fieldtypes/HashMapStringValueCollections.java Fri Mar 18 17:07:39 2005 @@ -0,0 +1,892 @@ +/* + * Copyright 2005 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jdo.tck.pc.fieldtypes; + +import java.io.Serializable; +import java.util.HashMap; + +public class HashMapStringValueCollections { + public int identifier; + public HashMap HashMapOfObject_String0; + public HashMap HashMapOfObject_String1; + public HashMap HashMapOfObject_String2; + public HashMap HashMapOfObject_String3; + public HashMap HashMapOfObject_String4; + public HashMap HashMapOfObject_String5; + public HashMap HashMapOfObject_String6; + public HashMap HashMapOfObject_String7; + public HashMap HashMapOfObject_String8; + public HashMap HashMapOfSimpleClass_String9; + public HashMap HashMapOfSimpleClass_String10; + public HashMap HashMapOfSimpleClass_String11; + public HashMap HashMapOfSimpleClass_String12; + public HashMap HashMapOfSimpleClass_String13; + public HashMap HashMapOfSimpleClass_String14; + public HashMap HashMapOfSimpleClass_String15; + public HashMap HashMapOfSimpleClass_String16; + public HashMap HashMapOfSimpleClass_String17; + public HashMap HashMapOfSimpleInterface_String18; + public HashMap HashMapOfSimpleInterface_String19; + public HashMap HashMapOfSimpleInterface_String20; + public HashMap HashMapOfSimpleInterface_String21; + public HashMap HashMapOfSimpleInterface_String22; + public HashMap HashMapOfSimpleInterface_String23; + public HashMap HashMapOfSimpleInterface_String24; + public HashMap HashMapOfSimpleInterface_String25; + public HashMap HashMapOfSimpleInterface_String26; + public HashMap HashMapOfString_String27; + public HashMap HashMapOfString_String28; + public HashMap HashMapOfString_String29; + public HashMap HashMapOfString_String30; + public HashMap HashMapOfString_String31; + public HashMap HashMapOfString_String32; + public HashMap HashMapOfString_String33; + public HashMap HashMapOfString_String34; + public HashMap HashMapOfString_String35; + public HashMap HashMapOfDate_String36; + public HashMap HashMapOfDate_String37; + public HashMap HashMapOfDate_String38; + public HashMap HashMapOfDate_String39; + public HashMap HashMapOfDate_String40; + public HashMap HashMapOfDate_String41; + public HashMap HashMapOfDate_String42; + public HashMap HashMapOfDate_String43; + public HashMap HashMapOfDate_String44; + public HashMap HashMapOfBigDecimal_String45; + public HashMap HashMapOfBigDecimal_String46; + public HashMap HashMapOfBigDecimal_String47; + public HashMap HashMapOfBigDecimal_String48; + public HashMap HashMapOfBigDecimal_String49; + public HashMap HashMapOfBigDecimal_String50; + public HashMap HashMapOfBigDecimal_String51; + public HashMap HashMapOfBigDecimal_String52; + public HashMap HashMapOfBigDecimal_String53; + public HashMap HashMapOfBigInteger_String54; + public HashMap HashMapOfBigInteger_String55; + public HashMap HashMapOfBigInteger_String56; + public HashMap HashMapOfBigInteger_String57; + public HashMap HashMapOfBigInteger_String58; + public HashMap HashMapOfBigInteger_String59; + public HashMap HashMapOfBigInteger_String60; + public HashMap HashMapOfBigInteger_String61; + public HashMap HashMapOfBigInteger_String62; + public HashMap HashMapOfByte_String63; + public HashMap HashMapOfByte_String64; + public HashMap HashMapOfByte_String65; + public HashMap HashMapOfByte_String66; + public HashMap HashMapOfByte_String67; + public HashMap HashMapOfByte_String68; + public HashMap HashMapOfByte_String69; + public HashMap HashMapOfByte_String70; + public HashMap HashMapOfByte_String71; + public HashMap HashMapOfDouble_String72; + public HashMap HashMapOfDouble_String73; + public HashMap HashMapOfDouble_String74; + public HashMap HashMapOfDouble_String75; + public HashMap HashMapOfDouble_String76; + public HashMap HashMapOfDouble_String77; + public HashMap HashMapOfDouble_String78; + public HashMap HashMapOfDouble_String79; + public HashMap HashMapOfDouble_String80; + public HashMap HashMapOfFloat_String81; + public HashMap HashMapOfFloat_String82; + public HashMap HashMapOfFloat_String83; + public HashMap HashMapOfFloat_String84; + public HashMap HashMapOfFloat_String85; + public HashMap HashMapOfFloat_String86; + public HashMap HashMapOfFloat_String87; + public HashMap HashMapOfFloat_String88; + public HashMap HashMapOfFloat_String89; + public HashMap HashMapOfInteger_String90; + public HashMap HashMapOfInteger_String91; + public HashMap HashMapOfInteger_String92; + public HashMap HashMapOfInteger_String93; + public HashMap HashMapOfInteger_String94; + public HashMap HashMapOfInteger_String95; + public HashMap HashMapOfInteger_String96; + public HashMap HashMapOfInteger_String97; + public HashMap HashMapOfInteger_String98; + public HashMap HashMapOfLong_String99; + public HashMap HashMapOfLong_String100; + public HashMap HashMapOfLong_String101; + public HashMap HashMapOfLong_String102; + public HashMap HashMapOfLong_String103; + public HashMap HashMapOfLong_String104; + public HashMap HashMapOfLong_String105; + public HashMap HashMapOfLong_String106; + public HashMap HashMapOfLong_String107; + public HashMap HashMapOfShort_String108; + public HashMap HashMapOfShort_String109; + public HashMap HashMapOfShort_String110; + public HashMap HashMapOfShort_String111; + public HashMap HashMapOfShort_String112; + public HashMap HashMapOfShort_String113; + public HashMap HashMapOfShort_String114; + public HashMap HashMapOfShort_String115; + public HashMap HashMapOfShort_String116; + + public static final String [] fieldSpecs = { + "public HashMap HashMapOfObject_String0", + "embedded-value=true public HashMap HashMapOfObject_String1", + "embedded-value=false public HashMap HashMapOfObject_String2", + "embedded-key=true public HashMap HashMapOfObject_String3", + "embedded-key=true embedded-value=true public HashMap HashMapOfObject_String4", + "embedded-key=true embedded-value=false public HashMap HashMapOfObject_String5", + "embedded-key=false public HashMap HashMapOfObject_String6", + "embedded-key=false embedded-value=true public HashMap HashMapOfObject_String7", + "embedded-key=false embedded-value=false public HashMap HashMapOfObject_String8", + "public HashMap HashMapOfSimpleClass_String9", + "embedded-value=true public HashMap HashMapOfSimpleClass_String10", + "embedded-value=false public HashMap HashMapOfSimpleClass_String11", + "embedded-key=true public HashMap HashMapOfSimpleClass_String12", + "embedded-key=true embedded-value=true public HashMap HashMapOfSimpleClass_String13", + "embedded-key=true embedded-value=false public HashMap HashMapOfSimpleClass_String14", + "embedded-key=false public HashMap HashMapOfSimpleClass_String15", + "embedded-key=false embedded-value=true public HashMap HashMapOfSimpleClass_String16", + "embedded-key=false embedded-value=false public HashMap HashMapOfSimpleClass_String17", + "public HashMap HashMapOfSimpleInterface_String18", + "embedded-value=true public HashMap HashMapOfSimpleInterface_String19", + "embedded-value=false public HashMap HashMapOfSimpleInterface_String20", + "embedded-key=true public HashMap HashMapOfSimpleInterface_String21", + "embedded-key=true embedded-value=true public HashMap HashMapOfSimpleInterface_String22", + "embedded-key=true embedded-value=false public HashMap HashMapOfSimpleInterface_String23", + "embedded-key=false public HashMap HashMapOfSimpleInterface_String24", + "embedded-key=false embedded-value=true public HashMap HashMapOfSimpleInterface_String25", + "embedded-key=false embedded-value=false public HashMap HashMapOfSimpleInterface_String26", + "public HashMap HashMapOfString_String27", + "embedded-value=true public HashMap HashMapOfString_String28", + "embedded-value=false public HashMap HashMapOfString_String29", + "embedded-key=true public HashMap HashMapOfString_String30", + "embedded-key=true embedded-value=true public HashMap HashMapOfString_String31", + "embedded-key=true embedded-value=false public HashMap HashMapOfString_String32", + "embedded-key=false public HashMap HashMapOfString_String33", + "embedded-key=false embedded-value=true public HashMap HashMapOfString_String34", + "embedded-key=false embedded-value=false public HashMap HashMapOfString_String35", + "public HashMap HashMapOfDate_String36", + "embedded-value=true public HashMap HashMapOfDate_String37", + "embedded-value=false public HashMap HashMapOfDate_String38", + "embedded-key=true public HashMap HashMapOfDate_String39", + "embedded-key=true embedded-value=true public HashMap HashMapOfDate_String40", + "embedded-key=true embedded-value=false public HashMap HashMapOfDate_String41", + "embedded-key=false public HashMap HashMapOfDate_String42", + "embedded-key=false embedded-value=true public HashMap HashMapOfDate_String43", + "embedded-key=false embedded-value=false public HashMap HashMapOfDate_String44", + "public HashMap HashMapOfBigDecimal_String45", + "embedded-value=true public HashMap HashMapOfBigDecimal_String46", + "embedded-value=false public HashMap HashMapOfBigDecimal_String47", + "embedded-key=true public HashMap HashMapOfBigDecimal_String48", + "embedded-key=true embedded-value=true public HashMap HashMapOfBigDecimal_String49", + "embedded-key=true embedded-value=false public HashMap HashMapOfBigDecimal_String50", + "embedded-key=false public HashMap HashMapOfBigDecimal_String51", + "embedded-key=false embedded-value=true public HashMap HashMapOfBigDecimal_String52", + "embedded-key=false embedded-value=false public HashMap HashMapOfBigDecimal_String53", + "public HashMap HashMapOfBigInteger_String54", + "embedded-value=true public HashMap HashMapOfBigInteger_String55", + "embedded-value=false public HashMap HashMapOfBigInteger_String56", + "embedded-key=true public HashMap HashMapOfBigInteger_String57", + "embedded-key=true embedded-value=true public HashMap HashMapOfBigInteger_String58", + "embedded-key=true embedded-value=false public HashMap HashMapOfBigInteger_String59", + "embedded-key=false public HashMap HashMapOfBigInteger_String60", + "embedded-key=false embedded-value=true public HashMap HashMapOfBigInteger_String61", + "embedded-key=false embedded-value=false public HashMap HashMapOfBigInteger_String62", + "public HashMap HashMapOfByte_String63", + "embedded-value=true public HashMap HashMapOfByte_String64", + "embedded-value=false public HashMap HashMapOfByte_String65", + "embedded-key=true public HashMap HashMapOfByte_String66", + "embedded-key=true embedded-value=true public HashMap HashMapOfByte_String67", + "embedded-key=true embedded-value=false public HashMap HashMapOfByte_String68", + "embedded-key=false public HashMap HashMapOfByte_String69", + "embedded-key=false embedded-value=true public HashMap HashMapOfByte_String70", + "embedded-key=false embedded-value=false public HashMap HashMapOfByte_String71", + "public HashMap HashMapOfDouble_String72", + "embedded-value=true public HashMap HashMapOfDouble_String73", + "embedded-value=false public HashMap HashMapOfDouble_String74", + "embedded-key=true public HashMap HashMapOfDouble_String75", + "embedded-key=true embedded-value=true public HashMap HashMapOfDouble_String76", + "embedded-key=true embedded-value=false public HashMap HashMapOfDouble_String77", + "embedded-key=false public HashMap HashMapOfDouble_String78", + "embedded-key=false embedded-value=true public HashMap HashMapOfDouble_String79", + "embedded-key=false embedded-value=false public HashMap HashMapOfDouble_String80", + "public HashMap HashMapOfFloat_String81", + "embedded-value=true public HashMap HashMapOfFloat_String82", + "embedded-value=false public HashMap HashMapOfFloat_String83", + "embedded-key=true public HashMap HashMapOfFloat_String84", + "embedded-key=true embedded-value=true public HashMap HashMapOfFloat_String85", + "embedded-key=true embedded-value=false public HashMap HashMapOfFloat_String86", + "embedded-key=false public HashMap HashMapOfFloat_String87", + "embedded-key=false embedded-value=true public HashMap HashMapOfFloat_String88", + "embedded-key=false embedded-value=false public HashMap HashMapOfFloat_String89", + "public HashMap HashMapOfInteger_String90", + "embedded-value=true public HashMap HashMapOfInteger_String91", + "embedded-value=false public HashMap HashMapOfInteger_String92", + "embedded-key=true public HashMap HashMapOfInteger_String93", + "embedded-key=true embedded-value=true public HashMap HashMapOfInteger_String94", + "embedded-key=true embedded-value=false public HashMap HashMapOfInteger_String95", + "embedded-key=false public HashMap HashMapOfInteger_String96", + "embedded-key=false embedded-value=true public HashMap HashMapOfInteger_String97", + "embedded-key=false embedded-value=false public HashMap HashMapOfInteger_String98", + "public HashMap HashMapOfLong_String99", + "embedded-value=true public HashMap HashMapOfLong_String100", + "embedded-value=false public HashMap HashMapOfLong_String101", + "embedded-key=true public HashMap HashMapOfLong_String102", + "embedded-key=true embedded-value=true public HashMap HashMapOfLong_String103", + "embedded-key=true embedded-value=false public HashMap HashMapOfLong_String104", + "embedded-key=false public HashMap HashMapOfLong_String105", + "embedded-key=false embedded-value=true public HashMap HashMapOfLong_String106", + "embedded-key=false embedded-value=false public HashMap HashMapOfLong_String107", + "public HashMap HashMapOfShort_String108", + "embedded-value=true public HashMap HashMapOfShort_String109", + "embedded-value=false public HashMap HashMapOfShort_String110", + "embedded-key=true public HashMap HashMapOfShort_String111", + "embedded-key=true embedded-value=true public HashMap HashMapOfShort_String112", + "embedded-key=true embedded-value=false public HashMap HashMapOfShort_String113", + "embedded-key=false public HashMap HashMapOfShort_String114", + "embedded-key=false embedded-value=true public HashMap HashMapOfShort_String115", + "embedded-key=false embedded-value=false public HashMap HashMapOfShort_String116" + }; + public int getLength() + { + return fieldSpecs.length; + } + public HashMap get(int index) + { + switch (index) + { + case(0): + return HashMapOfObject_String0; + case(1): + return HashMapOfObject_String1; + case(2): + return HashMapOfObject_String2; + case(3): + return HashMapOfObject_String3; + case(4): + return HashMapOfObject_String4; + case(5): + return HashMapOfObject_String5; + case(6): + return HashMapOfObject_String6; + case(7): + return HashMapOfObject_String7; + case(8): + return HashMapOfObject_String8; + case(9): + return HashMapOfSimpleClass_String9; + case(10): + return HashMapOfSimpleClass_String10; + case(11): + return HashMapOfSimpleClass_String11; + case(12): + return HashMapOfSimpleClass_String12; + case(13): + return HashMapOfSimpleClass_String13; + case(14): + return HashMapOfSimpleClass_String14; + case(15): + return HashMapOfSimpleClass_String15; + case(16): + return HashMapOfSimpleClass_String16; + case(17): + return HashMapOfSimpleClass_String17; + case(18): + return HashMapOfSimpleInterface_String18; + case(19): + return HashMapOfSimpleInterface_String19; + case(20): + return HashMapOfSimpleInterface_String20; + case(21): + return HashMapOfSimpleInterface_String21; + case(22): + return HashMapOfSimpleInterface_String22; + case(23): + return HashMapOfSimpleInterface_String23; + case(24): + return HashMapOfSimpleInterface_String24; + case(25): + return HashMapOfSimpleInterface_String25; + case(26): + return HashMapOfSimpleInterface_String26; + case(27): + return HashMapOfString_String27; + case(28): + return HashMapOfString_String28; + case(29): + return HashMapOfString_String29; + case(30): + return HashMapOfString_String30; + case(31): + return HashMapOfString_String31; + case(32): + return HashMapOfString_String32; + case(33): + return HashMapOfString_String33; + case(34): + return HashMapOfString_String34; + case(35): + return HashMapOfString_String35; + case(36): + return HashMapOfDate_String36; + case(37): + return HashMapOfDate_String37; + case(38): + return HashMapOfDate_String38; + case(39): + return HashMapOfDate_String39; + case(40): + return HashMapOfDate_String40; + case(41): + return HashMapOfDate_String41; + case(42): + return HashMapOfDate_String42; + case(43): + return HashMapOfDate_String43; + case(44): + return HashMapOfDate_String44; + case(45): + return HashMapOfBigDecimal_String45; + case(46): + return HashMapOfBigDecimal_String46; + case(47): + return HashMapOfBigDecimal_String47; + case(48): + return HashMapOfBigDecimal_String48; + case(49): + return HashMapOfBigDecimal_String49; + case(50): + return HashMapOfBigDecimal_String50; + case(51): + return HashMapOfBigDecimal_String51; + case(52): + return HashMapOfBigDecimal_String52; + case(53): + return HashMapOfBigDecimal_String53; + case(54): + return HashMapOfBigInteger_String54; + case(55): + return HashMapOfBigInteger_String55; + case(56): + return HashMapOfBigInteger_String56; + case(57): + return HashMapOfBigInteger_String57; + case(58): + return HashMapOfBigInteger_String58; + case(59): + return HashMapOfBigInteger_String59; + case(60): + return HashMapOfBigInteger_String60; + case(61): + return HashMapOfBigInteger_String61; + case(62): + return HashMapOfBigInteger_String62; + case(63): + return HashMapOfByte_String63; + case(64): + return HashMapOfByte_String64; + case(65): + return HashMapOfByte_String65; + case(66): + return HashMapOfByte_String66; + case(67): + return HashMapOfByte_String67; + case(68): + return HashMapOfByte_String68; + case(69): + return HashMapOfByte_String69; + case(70): + return HashMapOfByte_String70; + case(71): + return HashMapOfByte_String71; + case(72): + return HashMapOfDouble_String72; + case(73): + return HashMapOfDouble_String73; + case(74): + return HashMapOfDouble_String74; + case(75): + return HashMapOfDouble_String75; + case(76): + return HashMapOfDouble_String76; + case(77): + return HashMapOfDouble_String77; + case(78): + return HashMapOfDouble_String78; + case(79): + return HashMapOfDouble_String79; + case(80): + return HashMapOfDouble_String80; + case(81): + return HashMapOfFloat_String81; + case(82): + return HashMapOfFloat_String82; + case(83): + return HashMapOfFloat_String83; + case(84): + return HashMapOfFloat_String84; + case(85): + return HashMapOfFloat_String85; + case(86): + return HashMapOfFloat_String86; + case(87): + return HashMapOfFloat_String87; + case(88): + return HashMapOfFloat_String88; + case(89): + return HashMapOfFloat_String89; + case(90): + return HashMapOfInteger_String90; + case(91): + return HashMapOfInteger_String91; + case(92): + return HashMapOfInteger_String92; + case(93): + return HashMapOfInteger_String93; + case(94): + return HashMapOfInteger_String94; + case(95): + return HashMapOfInteger_String95; + case(96): + return HashMapOfInteger_String96; + case(97): + return HashMapOfInteger_String97; + case(98): + return HashMapOfInteger_String98; + case(99): + return HashMapOfLong_String99; + case(100): + return HashMapOfLong_String100; + case(101): + return HashMapOfLong_String101; + case(102): + return HashMapOfLong_String102; + case(103): + return HashMapOfLong_String103; + case(104): + return HashMapOfLong_String104; + case(105): + return HashMapOfLong_String105; + case(106): + return HashMapOfLong_String106; + case(107): + return HashMapOfLong_String107; + case(108): + return HashMapOfShort_String108; + case(109): + return HashMapOfShort_String109; + case(110): + return HashMapOfShort_String110; + case(111): + return HashMapOfShort_String111; + case(112): + return HashMapOfShort_String112; + case(113): + return HashMapOfShort_String113; + case(114): + return HashMapOfShort_String114; + case(115): + return HashMapOfShort_String115; + case(116): + return HashMapOfShort_String116; + default: + throw new IndexOutOfBoundsException(); + } + } + public boolean set(int index,HashMap value) + { + if(fieldSpecs[index].indexOf("final") != -1) + return false; + switch (index) + { + case(0): + HashMapOfObject_String0= value; + break; + case(1): + HashMapOfObject_String1= value; + break; + case(2): + HashMapOfObject_String2= value; + break; + case(3): + HashMapOfObject_String3= value; + break; + case(4): + HashMapOfObject_String4= value; + break; + case(5): + HashMapOfObject_String5= value; + break; + case(6): + HashMapOfObject_String6= value; + break; + case(7): + HashMapOfObject_String7= value; + break; + case(8): + HashMapOfObject_String8= value; + break; + case(9): + HashMapOfSimpleClass_String9= value; + break; + case(10): + HashMapOfSimpleClass_String10= value; + break; + case(11): + HashMapOfSimpleClass_String11= value; + break; + case(12): + HashMapOfSimpleClass_String12= value; + break; + case(13): + HashMapOfSimpleClass_String13= value; + break; + case(14): + HashMapOfSimpleClass_String14= value; + break; + case(15): + HashMapOfSimpleClass_String15= value; + break; + case(16): + HashMapOfSimpleClass_String16= value; + break; + case(17): + HashMapOfSimpleClass_String17= value; + break; + case(18): + HashMapOfSimpleInterface_String18= value; + break; + case(19): + HashMapOfSimpleInterface_String19= value; + break; + case(20): + HashMapOfSimpleInterface_String20= value; + break; + case(21): + HashMapOfSimpleInterface_String21= value; + break; + case(22): + HashMapOfSimpleInterface_String22= value; + break; + case(23): + HashMapOfSimpleInterface_String23= value; + break; + case(24): + HashMapOfSimpleInterface_String24= value; + break; + case(25): + HashMapOfSimpleInterface_String25= value; + break; + case(26): + HashMapOfSimpleInterface_String26= value; + break; + case(27): + HashMapOfString_String27= value; + break; + case(28): + HashMapOfString_String28= value; + break; + case(29): + HashMapOfString_String29= value; + break; + case(30): + HashMapOfString_String30= value; + break; + case(31): + HashMapOfString_String31= value; + break; + case(32): + HashMapOfString_String32= value; + break; + case(33): + HashMapOfString_String33= value; + break; + case(34): + HashMapOfString_String34= value; + break; + case(35): + HashMapOfString_String35= value; + break; + case(36): + HashMapOfDate_String36= value; + break; + case(37): + HashMapOfDate_String37= value; + break; + case(38): + HashMapOfDate_String38= value; + break; + case(39): + HashMapOfDate_String39= value; + break; + case(40): + HashMapOfDate_String40= value; + break; + case(41): + HashMapOfDate_String41= value; + break; + case(42): + HashMapOfDate_String42= value; + break; + case(43): + HashMapOfDate_String43= value; + break; + case(44): + HashMapOfDate_String44= value; + break; + case(45): + HashMapOfBigDecimal_String45= value; + break; + case(46): + HashMapOfBigDecimal_String46= value; + break; + case(47): + HashMapOfBigDecimal_String47= value; + break; + case(48): + HashMapOfBigDecimal_String48= value; + break; + case(49): + HashMapOfBigDecimal_String49= value; + break; + case(50): + HashMapOfBigDecimal_String50= value; + break; + case(51): + HashMapOfBigDecimal_String51= value; + break; + case(52): + HashMapOfBigDecimal_String52= value; + break; + case(53): + HashMapOfBigDecimal_String53= value; + break; + case(54): + HashMapOfBigInteger_String54= value; + break; + case(55): + HashMapOfBigInteger_String55= value; + break; + case(56): + HashMapOfBigInteger_String56= value; + break; + case(57): + HashMapOfBigInteger_String57= value; + break; + case(58): + HashMapOfBigInteger_String58= value; + break; + case(59): + HashMapOfBigInteger_String59= value; + break; + case(60): + HashMapOfBigInteger_String60= value; + break; + case(61): + HashMapOfBigInteger_String61= value; + break; + case(62): + HashMapOfBigInteger_String62= value; + break; + case(63): + HashMapOfByte_String63= value; + break; + case(64): + HashMapOfByte_String64= value; + break; + case(65): + HashMapOfByte_String65= value; + break; + case(66): + HashMapOfByte_String66= value; + break; + case(67): + HashMapOfByte_String67= value; + break; + case(68): + HashMapOfByte_String68= value; + break; + case(69): + HashMapOfByte_String69= value; + break; + case(70): + HashMapOfByte_String70= value; + break; + case(71): + HashMapOfByte_String71= value; + break; + case(72): + HashMapOfDouble_String72= value; + break; + case(73): + HashMapOfDouble_String73= value; + break; + case(74): + HashMapOfDouble_String74= value; + break; + case(75): + HashMapOfDouble_String75= value; + break; + case(76): + HashMapOfDouble_String76= value; + break; + case(77): + HashMapOfDouble_String77= value; + break; + case(78): + HashMapOfDouble_String78= value; + break; + case(79): + HashMapOfDouble_String79= value; + break; + case(80): + HashMapOfDouble_String80= value; + break; + case(81): + HashMapOfFloat_String81= value; + break; + case(82): + HashMapOfFloat_String82= value; + break; + case(83): + HashMapOfFloat_String83= value; + break; + case(84): + HashMapOfFloat_String84= value; + break; + case(85): + HashMapOfFloat_String85= value; + break; + case(86): + HashMapOfFloat_String86= value; + break; + case(87): + HashMapOfFloat_String87= value; + break; + case(88): + HashMapOfFloat_String88= value; + break; + case(89): + HashMapOfFloat_String89= value; + break; + case(90): + HashMapOfInteger_String90= value; + break; + case(91): + HashMapOfInteger_String91= value; + break; + case(92): + HashMapOfInteger_String92= value; + break; + case(93): + HashMapOfInteger_String93= value; + break; + case(94): + HashMapOfInteger_String94= value; + break; + case(95): + HashMapOfInteger_String95= value; + break; + case(96): + HashMapOfInteger_String96= value; + break; + case(97): + HashMapOfInteger_String97= value; + break; + case(98): + HashMapOfInteger_String98= value; + break; + case(99): + HashMapOfLong_String99= value; + break; + case(100): + HashMapOfLong_String100= value; + break; + case(101): + HashMapOfLong_String101= value; + break; + case(102): + HashMapOfLong_String102= value; + break; + case(103): + HashMapOfLong_String103= value; + break; + case(104): + HashMapOfLong_String104= value; + break; + case(105): + HashMapOfLong_String105= value; + break; + case(106): + HashMapOfLong_String106= value; + break; + case(107): + HashMapOfLong_String107= value; + break; + case(108): + HashMapOfShort_String108= value; + break; + case(109): + HashMapOfShort_String109= value; + break; + case(110): + HashMapOfShort_String110= value; + break; + case(111): + HashMapOfShort_String111= value; + break; + case(112): + HashMapOfShort_String112= value; + break; + case(113): + HashMapOfShort_String113= value; + break; + case(114): + HashMapOfShort_String114= value; + break; + case(115): + HashMapOfShort_String115= value; + break; + case(116): + HashMapOfShort_String116= value; + break; + default: + throw new IndexOutOfBoundsException(); + } + return true; + } + + public static class Oid implements Serializable { + public int identifier; + + public Oid() { + } + + public Oid(String s) { identifier = Integer.parseInt(s); } + + public String toString() { return this.getClass().getName() + ": " + identifier;} + + public int hashCode() { return (int)identifier ; } + + public boolean equals(Object other) { + if (other != null && (other instanceof Oid)) { + Oid k = (Oid)other; + return k.identifier == this.identifier; + } + return false; + } + + } + +} Added: incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/fieldtypes/HashSetCollections.java URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/fieldtypes/HashSetCollections.java?view=auto&rev=158179 ============================================================================== --- incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/fieldtypes/HashSetCollections.java (added) +++ incubator/jdo/trunk/tck11/test/java/org/apache/jdo/tck/pc/fieldtypes/HashSetCollections.java Fri Mar 18 17:07:39 2005 @@ -0,0 +1,366 @@ +/* + * Copyright 2005 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.jdo.tck.pc.fieldtypes; + +import java.io.Serializable; +import java.util.HashSet; + +public class HashSetCollections { + public int identifier; + public HashSet HashSetOfObject0; + public HashSet HashSetOfObject1; + public HashSet HashSetOfObject2; + public HashSet HashSetOfSimpleClass3; + public HashSet HashSetOfSimpleClass4; + public HashSet HashSetOfSimpleClass5; + public HashSet HashSetOfSimpleInterface6; + public HashSet HashSetOfSimpleInterface7; + public HashSet HashSetOfSimpleInterface8; + public HashSet HashSetOfString9; + public HashSet HashSetOfString10; + public HashSet HashSetOfString11; + public HashSet HashSetOfDate12; + public HashSet HashSetOfDate13; + public HashSet HashSetOfDate14; + public HashSet HashSetOfLocale15; + public HashSet HashSetOfLocale16; + public HashSet HashSetOfLocale17; + public HashSet HashSetOfBigDecimal18; + public HashSet HashSetOfBigDecimal19; + public HashSet HashSetOfBigDecimal20; + public HashSet HashSetOfBigInteger21; + public HashSet HashSetOfBigInteger22; + public HashSet HashSetOfBigInteger23; + public HashSet HashSetOfByte24; + public HashSet HashSetOfByte25; + public HashSet HashSetOfByte26; + public HashSet HashSetOfDouble27; + public HashSet HashSetOfDouble28; + public HashSet HashSetOfDouble29; + public HashSet HashSetOfFloat30; + public HashSet HashSetOfFloat31; + public HashSet HashSetOfFloat32; + public HashSet HashSetOfInteger33; + public HashSet HashSetOfInteger34; + public HashSet HashSetOfInteger35; + public HashSet HashSetOfLong36; + public HashSet HashSetOfLong37; + public HashSet HashSetOfLong38; + public HashSet HashSetOfShort39; + public HashSet HashSetOfShort40; + public HashSet HashSetOfShort41; + + public static final String [] fieldSpecs = { + "public HashSet HashSetOfObject0", + "embedded-element=true public HashSet HashSetOfObject1", + "embedded-element=false public HashSet HashSetOfObject2", + "public HashSet HashSetOfSimpleClass3", + "embedded-element=true public HashSet HashSetOfSimpleClass4", + "embedded-element=false public HashSet HashSetOfSimpleClass5", + "public HashSet HashSetOfSimpleInterface6", + "embedded-element=true public HashSet HashSetOfSimpleInterface7", + "embedded-element=false public HashSet HashSetOfSimpleInterface8", + "public HashSet HashSetOfString9", + "embedded-element=true public HashSet HashSetOfString10", + "embedded-element=false public HashSet HashSetOfString11", + "public HashSet HashSetOfDate12", + "embedded-element=true public HashSet HashSetOfDate13", + "embedded-element=false public HashSet HashSetOfDate14", + "public HashSet HashSetOfLocale15", + "embedded-element=true public HashSet HashSetOfLocale16", + "embedded-element=false public HashSet HashSetOfLocale17", + "public HashSet HashSetOfBigDecimal18", + "embedded-element=true public HashSet HashSetOfBigDecimal19", + "embedded-element=false public HashSet HashSetOfBigDecimal20", + "public HashSet HashSetOfBigInteger21", + "embedded-element=true public HashSet HashSetOfBigInteger22", + "embedded-element=false public HashSet HashSetOfBigInteger23", + "public HashSet HashSetOfByte24", + "embedded-element=true public HashSet HashSetOfByte25", + "embedded-element=false public HashSet HashSetOfByte26", + "public HashSet HashSetOfDouble27", + "embedded-element=true public HashSet HashSetOfDouble28", + "embedded-element=false public HashSet HashSetOfDouble29", + "public HashSet HashSetOfFloat30", + "embedded-element=true public HashSet HashSetOfFloat31", + "embedded-element=false public HashSet HashSetOfFloat32", + "public HashSet HashSetOfInteger33", + "embedded-element=true public HashSet HashSetOfInteger34", + "embedded-element=false public HashSet HashSetOfInteger35", + "public HashSet HashSetOfLong36", + "embedded-element=true public HashSet HashSetOfLong37", + "embedded-element=false public HashSet HashSetOfLong38", + "public HashSet HashSetOfShort39", + "embedded-element=true public HashSet HashSetOfShort40", + "embedded-element=false public HashSet HashSetOfShort41" + }; + public int getLength() + { + return fieldSpecs.length; + } + public HashSet get(int index) + { + switch (index) + { + case(0): + return HashSetOfObject0; + case(1): + return HashSetOfObject1; + case(2): + return HashSetOfObject2; + case(3): + return HashSetOfSimpleClass3; + case(4): + return HashSetOfSimpleClass4; + case(5): + return HashSetOfSimpleClass5; + case(6): + return HashSetOfSimpleInterface6; + case(7): + return HashSetOfSimpleInterface7; + case(8): + return HashSetOfSimpleInterface8; + case(9): + return HashSetOfString9; + case(10): + return HashSetOfString10; + case(11): + return HashSetOfString11; + case(12): + return HashSetOfDate12; + case(13): + return HashSetOfDate13; + case(14): + return HashSetOfDate14; + case(15): + return HashSetOfLocale15; + case(16): + return HashSetOfLocale16; + case(17): + return HashSetOfLocale17; + case(18): + return HashSetOfBigDecimal18; + case(19): + return HashSetOfBigDecimal19; + case(20): + return HashSetOfBigDecimal20; + case(21): + return HashSetOfBigInteger21; + case(22): + return HashSetOfBigInteger22; + case(23): + return HashSetOfBigInteger23; + case(24): + return HashSetOfByte24; + case(25): + return HashSetOfByte25; + case(26): + return HashSetOfByte26; + case(27): + return HashSetOfDouble27; + case(28): + return HashSetOfDouble28; + case(29): + return HashSetOfDouble29; + case(30): + return HashSetOfFloat30; + case(31): + return HashSetOfFloat31; + case(32): + return HashSetOfFloat32; + case(33): + return HashSetOfInteger33; + case(34): + return HashSetOfInteger34; + case(35): + return HashSetOfInteger35; + case(36): + return HashSetOfLong36; + case(37): + return HashSetOfLong37; + case(38): + return HashSetOfLong38; + case(39): + return HashSetOfShort39; + case(40): + return HashSetOfShort40; + case(41): + return HashSetOfShort41; + default: + throw new IndexOutOfBoundsException(); + } + } + public boolean set(int index,HashSet value) + { + if(fieldSpecs[index].indexOf("final") != -1) + return false; + switch (index) + { + case(0): + HashSetOfObject0= value; + break; + case(1): + HashSetOfObject1= value; + break; + case(2): + HashSetOfObject2= value; + break; + case(3): + HashSetOfSimpleClass3= value; + break; + case(4): + HashSetOfSimpleClass4= value; + break; + case(5): + HashSetOfSimpleClass5= value; + break; + case(6): + HashSetOfSimpleInterface6= value; + break; + case(7): + HashSetOfSimpleInterface7= value; + break; + case(8): + HashSetOfSimpleInterface8= value; + break; + case(9): + HashSetOfString9= value; + break; + case(10): + HashSetOfString10= value; + break; + case(11): + HashSetOfString11= value; + break; + case(12): + HashSetOfDate12= value; + break; + case(13): + HashSetOfDate13= value; + break; + case(14): + HashSetOfDate14= value; + break; + case(15): + HashSetOfLocale15= value; + break; + case(16): + HashSetOfLocale16= value; + break; + case(17): + HashSetOfLocale17= value; + break; + case(18): + HashSetOfBigDecimal18= value; + break; + case(19): + HashSetOfBigDecimal19= value; + break; + case(20): + HashSetOfBigDecimal20= value; + break; + case(21): + HashSetOfBigInteger21= value; + break; + case(22): + HashSetOfBigInteger22= value; + break; + case(23): + HashSetOfBigInteger23= value; + break; + case(24): + HashSetOfByte24= value; + break; + case(25): + HashSetOfByte25= value; + break; + case(26): + HashSetOfByte26= value; + break; + case(27): + HashSetOfDouble27= value; + break; + case(28): + HashSetOfDouble28= value; + break; + case(29): + HashSetOfDouble29= value; + break; + case(30): + HashSetOfFloat30= value; + break; + case(31): + HashSetOfFloat31= value; + break; + case(32): + HashSetOfFloat32= value; + break; + case(33): + HashSetOfInteger33= value; + break; + case(34): + HashSetOfInteger34= value; + break; + case(35): + HashSetOfInteger35= value; + break; + case(36): + HashSetOfLong36= value; + break; + case(37): + HashSetOfLong37= value; + break; + case(38): + HashSetOfLong38= value; + break; + case(39): + HashSetOfShort39= value; + break; + case(40): + HashSetOfShort40= value; + break; + case(41): + HashSetOfShort41= value; + break; + default: + throw new IndexOutOfBoundsException(); + } + return true; + } + + public static class Oid implements Serializable { + public int identifier; + + public Oid() { + } + + public Oid(String s) { identifier = Integer.parseInt(s); } + + public String toString() { return this.getClass().getName() + ": " + identifier;} + + public int hashCode() { return (int)identifier ; } + + public boolean equals(Object other) { + if (other != null && (other instanceof Oid)) { + Oid k = (Oid)other; + return k.identifier == this.identifier; + } + return false; + } + + } +}