You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by pc...@apache.org on 2008/01/31 01:13:33 UTC

svn commit: r616965 - in /openjpa/branches/1.0.x: openjpa-kernel/src/main/java/org/apache/openjpa/enhance/ openjpa-kernel/src/main/java/org/apache/openjpa/meta/ openjpa-kernel/src/main/java/org/apache/openjpa/util/ openjpa-persistence-jdbc/src/test/jav...

Author: pcl
Date: Wed Jan 30 16:13:31 2008
New Revision: 616965

URL: http://svn.apache.org/viewvc?rev=616965&view=rev
Log:
OPENJPA-331. Ported to 1.0.x: svn merge -c 604621 ../../trunk; svn merge -c 607478 ../../trunk

Added:
    openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/util/BigDecimalId.java
      - copied, changed from r604621, openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/BigDecimalId.java
    openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/util/BigIntegerId.java
      - copied, changed from r604621, openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/BigIntegerId.java
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/SQLBigDecimalIdEntity.java
      - copied, changed from r604621, openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/SQLBigDecimalIdEntity.java
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/SQLBigIntegerIdEntity.java
      - copied, changed from r604621, openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/SQLBigIntegerIdEntity.java
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/TestSQLBigDecimalId.java
      - copied, changed from r604621, openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/TestSQLBigDecimalId.java
    openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/TestSQLBigIntegerId.java
      - copied, changed from r604621, openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/TestSQLBigIntegerId.java
Modified:
    openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java
    openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ClassMetaData.java
    openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/util/ApplicationIds.java
    openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/JPAFacadeHelper.java
    openjpa/branches/1.0.x/openjpa-project/NOTICE.txt

Modified: openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java?rev=616965&r1=616964&r2=616965&view=diff
==============================================================================
--- openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java (original)
+++ openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/enhance/PCEnhancer.java Wed Jan 30 16:13:31 2008
@@ -47,7 +47,6 @@
 import org.apache.commons.lang.StringUtils;
 import org.apache.openjpa.conf.OpenJPAConfiguration;
 import org.apache.openjpa.conf.OpenJPAConfigurationImpl;
-import org.apache.openjpa.lib.conf.Configuration;
 import org.apache.openjpa.lib.conf.Configurations;
 import org.apache.openjpa.lib.log.Log;
 import org.apache.openjpa.lib.meta.ClassArgParser;
@@ -65,6 +64,8 @@
 import org.apache.openjpa.meta.ValueStrategies;
 import org.apache.openjpa.util.GeneralException;
 import org.apache.openjpa.util.InternalException;
+import org.apache.openjpa.util.BigDecimalId;
+import org.apache.openjpa.util.BigIntegerId;
 import org.apache.openjpa.util.ByteId;
 import org.apache.openjpa.util.CharId;
 import org.apache.openjpa.util.DateId;
@@ -2070,6 +2071,18 @@
                     code.checkcast().setType(StringId.class);
                     code.invokevirtual().setMethod(StringId.class, "getId",
                         String.class, null);
+                    break;
+                case JavaTypes.BIGDECIMAL:
+                    code.aload().setLocal(oid);
+                    code.checkcast().setType(BigDecimalId.class);
+                    code.invokevirtual().setMethod(BigDecimalId.class, "getId",
+                        BigDecimalId.class, null);
+                    break;
+                case JavaTypes.BIGINTEGER:
+                    code.aload().setLocal(oid);
+                    code.checkcast().setType(BigIntegerId.class);
+                    code.invokevirtual().setMethod(BigIntegerId.class, "getId",
+                        BigIntegerId.class, null);
                     break;
                 default:
                     code.aload().setLocal(oid);

Modified: openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ClassMetaData.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ClassMetaData.java?rev=616965&r1=616964&r2=616965&view=diff
==============================================================================
--- openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ClassMetaData.java (original)
+++ openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/meta/ClassMetaData.java Wed Jan 30 16:13:31 2008
@@ -46,6 +46,8 @@
 import org.apache.openjpa.lib.util.J2DoPrivHelper;
 import org.apache.openjpa.lib.util.Localizer;
 import org.apache.openjpa.lib.xml.Commentable;
+import org.apache.openjpa.util.BigDecimalId;
+import org.apache.openjpa.util.BigIntegerId;
 import org.apache.openjpa.util.ByteId;
 import org.apache.openjpa.util.CharId;
 import org.apache.openjpa.util.DateId;
@@ -481,6 +483,12 @@
             case JavaTypes.OID:
             case JavaTypes.OBJECT:
                 _objectId = ObjectId.class;
+                break;
+            case JavaTypes.BIGDECIMAL:
+                _objectId = BigDecimalId.class;
+                break;
+            case JavaTypes.BIGINTEGER:
+                _objectId = BigIntegerId.class;
                 break;
         }
         return _objectId;

Modified: openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/util/ApplicationIds.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/util/ApplicationIds.java?rev=616965&r1=616964&r2=616965&view=diff
==============================================================================
--- openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/util/ApplicationIds.java (original)
+++ openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/util/ApplicationIds.java Wed Jan 30 16:13:31 2008
@@ -20,6 +20,8 @@
 
 import java.lang.reflect.Field;
 import java.lang.reflect.Modifier;
+import java.math.BigDecimal;
+import java.math.BigInteger;
 import java.security.AccessController;
 import java.security.PrivilegedActionException;
 import java.util.Date;
@@ -170,6 +172,14 @@
                 case JavaTypes.OID:
                 case JavaTypes.OBJECT:
                     return new ObjectId(meta.getDescribedType(), val);
+                case JavaTypes.BIGDECIMAL:
+                    if (!convert && !(val instanceof BigDecimal))
+                        throw new ClassCastException("!(x instanceof BigDecimal)");
+                    return new BigDecimalId(meta.getDescribedType(), (BigDecimal)val);
+                case JavaTypes.BIGINTEGER:
+                    if (!convert && !(val instanceof BigInteger))
+                        throw new ClassCastException("!(x instanceof BigInteger)");
+                    return new BigIntegerId(meta.getDescribedType(), (BigInteger)val);
                 default:
                     throw new InternalException();
             }
@@ -274,6 +284,12 @@
                         koid.hasSubclasses());
                 case JavaTypes.DATE:
                     return new DateId(cls, ((DateId) oid).getId(),
+                        koid.hasSubclasses());
+                case JavaTypes.BIGDECIMAL:
+                    return new BigDecimalId(cls, ((BigDecimalId) oid).getId(),
+                        koid.hasSubclasses());
+                case JavaTypes.BIGINTEGER:
+                    return new BigIntegerId(cls, ((BigIntegerId) oid).getId(),
                         koid.hasSubclasses());
                 default:
                     throw new InternalException();

Copied: openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/util/BigDecimalId.java (from r604621, openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/BigDecimalId.java)
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/util/BigDecimalId.java?p2=openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/util/BigDecimalId.java&p1=openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/BigDecimalId.java&r1=604621&r2=616965&rev=616965&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/BigDecimalId.java (original)
+++ openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/util/BigDecimalId.java Wed Jan 30 16:13:31 2008
@@ -1,18 +1,20 @@
 /*
- *  Copyright 2007 Miroslav Nachev.
- * 
- *  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.
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.openjpa.util;
 

Copied: openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/util/BigIntegerId.java (from r604621, openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/BigIntegerId.java)
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/util/BigIntegerId.java?p2=openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/util/BigIntegerId.java&p1=openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/BigIntegerId.java&r1=604621&r2=616965&rev=616965&view=diff
==============================================================================
--- openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/BigIntegerId.java (original)
+++ openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/util/BigIntegerId.java Wed Jan 30 16:13:31 2008
@@ -1,18 +1,20 @@
 /*
- *  Copyright 2007 Miroslav Nachev.
- * 
- *  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.
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.openjpa.util;
 

Copied: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/SQLBigDecimalIdEntity.java (from r604621, openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/SQLBigDecimalIdEntity.java)
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/SQLBigDecimalIdEntity.java?p2=openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/SQLBigDecimalIdEntity.java&p1=openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/SQLBigDecimalIdEntity.java&r1=604621&r2=616965&rev=616965&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/SQLBigDecimalIdEntity.java (original)
+++ openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/SQLBigDecimalIdEntity.java Wed Jan 30 16:13:31 2008
@@ -1,18 +1,20 @@
 /*
- *  Copyright 2007 Miroslav Nachev.
- * 
- *  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.
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.openjpa.persistence.identity;
 

Copied: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/SQLBigIntegerIdEntity.java (from r604621, openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/SQLBigIntegerIdEntity.java)
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/SQLBigIntegerIdEntity.java?p2=openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/SQLBigIntegerIdEntity.java&p1=openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/SQLBigIntegerIdEntity.java&r1=604621&r2=616965&rev=616965&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/SQLBigIntegerIdEntity.java (original)
+++ openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/SQLBigIntegerIdEntity.java Wed Jan 30 16:13:31 2008
@@ -1,18 +1,20 @@
 /*
- *  Copyright 2007 Miroslav Nachev.
- * 
- *  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.
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.openjpa.persistence.identity;
 

Copied: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/TestSQLBigDecimalId.java (from r604621, openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/TestSQLBigDecimalId.java)
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/TestSQLBigDecimalId.java?p2=openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/TestSQLBigDecimalId.java&p1=openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/TestSQLBigDecimalId.java&r1=604621&r2=616965&rev=616965&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/TestSQLBigDecimalId.java (original)
+++ openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/TestSQLBigDecimalId.java Wed Jan 30 16:13:31 2008
@@ -1,18 +1,20 @@
 /*
- *  Copyright 2007 Miroslav Nachev.
- * 
- *  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.
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.openjpa.persistence.identity;
 

Copied: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/TestSQLBigIntegerId.java (from r604621, openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/TestSQLBigIntegerId.java)
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/TestSQLBigIntegerId.java?p2=openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/TestSQLBigIntegerId.java&p1=openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/TestSQLBigIntegerId.java&r1=604621&r2=616965&rev=616965&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/TestSQLBigIntegerId.java (original)
+++ openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/TestSQLBigIntegerId.java Wed Jan 30 16:13:31 2008
@@ -1,18 +1,20 @@
 /*
- *  Copyright 2007 Miroslav Nachev.
- * 
- *  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.
- *  under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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.openjpa.persistence.identity;
 

Modified: openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/JPAFacadeHelper.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/JPAFacadeHelper.java?rev=616965&r1=616964&r2=616965&view=diff
==============================================================================
--- openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/JPAFacadeHelper.java (original)
+++ openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/JPAFacadeHelper.java Wed Jan 30 16:13:31 2008
@@ -18,6 +18,8 @@
  */
 package org.apache.openjpa.persistence;
 
+import java.math.BigDecimal;
+import java.math.BigInteger;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Iterator;
@@ -27,6 +29,8 @@
 import org.apache.openjpa.kernel.Broker;
 import org.apache.openjpa.kernel.BrokerFactory;
 import org.apache.openjpa.meta.ClassMetaData;
+import org.apache.openjpa.util.BigDecimalId;
+import org.apache.openjpa.util.BigIntegerId;
 import org.apache.openjpa.util.ByteId;
 import org.apache.openjpa.util.CharId;
 import org.apache.openjpa.util.DoubleId;
@@ -231,6 +235,10 @@
             return new ShortId(cls, (Short) oid);
         if (oid instanceof String)
             return new StringId(cls, (String) oid);
+        if (oid instanceof BigDecimal)
+            return new BigDecimalId(cls, (BigDecimal) oid);
+        if (oid instanceof BigInteger)
+            return new BigIntegerId(cls, (BigInteger) oid);
         return new ObjectId(cls, oid);
     }
 
@@ -301,7 +309,11 @@
         if (oidClass == ShortId.class)
             return Short.class;
         if (oidClass == StringId.class)
-			return String.class;
-		return oidClass;
+            return String.class;
+        if (oidClass == BigDecimalId.class)
+            return BigDecimal.class;
+        if (oidClass == BigIntegerId.class)
+            return BigInteger.class;
+        return oidClass;
 	}
 }

Modified: openjpa/branches/1.0.x/openjpa-project/NOTICE.txt
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-project/NOTICE.txt?rev=616965&r1=616964&r2=616965&view=diff
==============================================================================
--- openjpa/branches/1.0.x/openjpa-project/NOTICE.txt (original)
+++ openjpa/branches/1.0.x/openjpa-project/NOTICE.txt Wed Jan 30 16:13:31 2008
@@ -16,4 +16,12 @@
     Sun Microsystems and licensed under the CDDL 1.0. The source code is
     available at: https://glassfish.dev.java.net/source/browse/glassfish/
 
+* OpenJPA includes the following software copyright 2007 Miroslav Nachev
+
+openjpa-kernel/src/main/java/org/apache/openjpa/util/BigDecimalId.java
+openjpa-kernel/src/main/java/org/apache/openjpa/util/BigIntegerId.java
+openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/SQLBigIntegerIdEntity.java
+openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/SQLBigDecimalIdEntity.java
+openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/TestSQLBigIntegerId.java
+openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/TestSQLBigDecimalId.java