You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by mi...@apache.org on 2009/03/23 00:45:35 UTC
svn commit: r757280 [17/23] - in /openjpa/branches/1.0.x:
openjpa-examples/src/main/java/hellojpa/
openjpa-examples/src/main/java/relations/
openjpa-jdbc-5/src/main/java/org/apache/openjpa/jdbc/meta/strats/
openjpa-jdbc/src/main/java/org/apache/openjpa...
Modified: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/fields/EnumSetOwner.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/fields/EnumSetOwner.java?rev=757280&r1=757279&r2=757280&view=diff
==============================================================================
--- openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/fields/EnumSetOwner.java (original)
+++ openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/fields/EnumSetOwner.java Sun Mar 22 23:45:15 2009
@@ -1,75 +1,75 @@
-/*
- * 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.fields;
-
-import java.util.EnumSet;
-import java.util.Collections;
-import java.util.Set;
-import javax.persistence.Id;
-import javax.persistence.Version;
-import javax.persistence.Entity;
-
-import org.apache.openjpa.persistence.Persistent;
-import org.apache.openjpa.persistence.Externalizer;
-
-@Entity
-public class EnumSetOwner {
-
- @Id
- private int id;
-
- @Version
- private int version;
-
- @Persistent
- @Externalizer("externalizer")
- private EnumSetHolder enumSetHolder;
-
- public Set<SampleEnum> getEnumSet() {
- return Collections.unmodifiableSet(enumSetHolder.enumSet);
- }
-
- public void setEnumSet(EnumSet<SampleEnum> enumSet) {
- enumSetHolder = new EnumSetHolder(enumSet);
- }
-
- public static class EnumSetHolder {
-
- private final EnumSet<SampleEnum> enumSet;
-
- public EnumSetHolder(String externalizedValue) {
- // this implementation can only handle the special form created
- // by the externalizer above
- if (!"all".equals(externalizedValue))
- throw new IllegalStateException(externalizedValue);
-
- enumSet = EnumSet.allOf(SampleEnum.class);
- }
-
- private EnumSetHolder(EnumSet<SampleEnum> enumSet) {
- this.enumSet = enumSet;
- }
-
- public String externalizer() {
- // this implementation always externalizes to a special
- // representation of all the values.
- return "all";
- }
- }
-}
+/*
+ * 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.fields;
+
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.Set;
+import javax.persistence.Id;
+import javax.persistence.Version;
+import javax.persistence.Entity;
+
+import org.apache.openjpa.persistence.Persistent;
+import org.apache.openjpa.persistence.Externalizer;
+
+@Entity
+public class EnumSetOwner {
+
+ @Id
+ private int id;
+
+ @Version
+ private int version;
+
+ @Persistent
+ @Externalizer("externalizer")
+ private EnumSetHolder enumSetHolder;
+
+ public Set<SampleEnum> getEnumSet() {
+ return Collections.unmodifiableSet(enumSetHolder.enumSet);
+ }
+
+ public void setEnumSet(EnumSet<SampleEnum> enumSet) {
+ enumSetHolder = new EnumSetHolder(enumSet);
+ }
+
+ public static class EnumSetHolder {
+
+ private final EnumSet<SampleEnum> enumSet;
+
+ public EnumSetHolder(String externalizedValue) {
+ // this implementation can only handle the special form created
+ // by the externalizer above
+ if (!"all".equals(externalizedValue))
+ throw new IllegalStateException(externalizedValue);
+
+ enumSet = EnumSet.allOf(SampleEnum.class);
+ }
+
+ private EnumSetHolder(EnumSet<SampleEnum> enumSet) {
+ this.enumSet = enumSet;
+ }
+
+ public String externalizer() {
+ // this implementation always externalizes to a special
+ // representation of all the values.
+ return "all";
+ }
+ }
+}
Propchange: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/fields/EnumSetOwner.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/fields/NonstandardMappingEntity.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/fields/NonstandardMappingEntity.java?rev=757280&r1=757279&r2=757280&view=diff
==============================================================================
--- openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/fields/NonstandardMappingEntity.java (original)
+++ openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/fields/NonstandardMappingEntity.java Sun Mar 22 23:45:15 2009
@@ -1,38 +1,38 @@
-/*
- * 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.fields;
-
-import java.util.Map;
-import java.util.HashMap;
-
-import javax.persistence.Entity;
-
-import org.apache.openjpa.persistence.PersistentMap;
-import org.apache.openjpa.persistence.jdbc.ContainerTable;
-
-@Entity
-public class NonstandardMappingEntity {
- @PersistentMap
- @ContainerTable(name="NONSTD_MAPPING_MAP")
- private Map<String, String> map = new HashMap<String, String>();
-
- public Map<String, String> getMap() {
- return map;
- }
-}
+/*
+ * 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.fields;
+
+import java.util.Map;
+import java.util.HashMap;
+
+import javax.persistence.Entity;
+
+import org.apache.openjpa.persistence.PersistentMap;
+import org.apache.openjpa.persistence.jdbc.ContainerTable;
+
+@Entity
+public class NonstandardMappingEntity {
+ @PersistentMap
+ @ContainerTable(name="NONSTD_MAPPING_MAP")
+ private Map<String, String> map = new HashMap<String, String>();
+
+ public Map<String, String> getMap() {
+ return map;
+ }
+}
Propchange: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/fields/NonstandardMappingEntity.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/fields/SampleEnum.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/fields/SampleEnum.java?rev=757280&r1=757279&r2=757280&view=diff
==============================================================================
--- openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/fields/SampleEnum.java (original)
+++ openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/fields/SampleEnum.java Sun Mar 22 23:45:15 2009
@@ -1,23 +1,23 @@
-/*
- * 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.fields;
-
-public enum SampleEnum {
- FOO, BAR, BAZ, QUUX
-}
+/*
+ * 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.fields;
+
+public enum SampleEnum {
+ FOO, BAR, BAZ, QUUX
+}
Propchange: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/fields/SampleEnum.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/fields/TestEnumQueryConstructor.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/fields/TestEnumQueryConstructor.java?rev=757280&r1=757279&r2=757280&view=diff
==============================================================================
--- openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/fields/TestEnumQueryConstructor.java (original)
+++ openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/fields/TestEnumQueryConstructor.java Sun Mar 22 23:45:15 2009
@@ -1,50 +1,50 @@
-/*
- * 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.fields;
-
-import java.util.List;
-import javax.persistence.EntityManager;
-import javax.persistence.Query;
-
-import org.apache.openjpa.persistence.test.SingleEMTestCase;
-import org.apache.openjpa.persistence.simple.AllFieldTypes;
-
-public class TestEnumQueryConstructor
- extends SingleEMTestCase {
-
- public void setUp() {
- setUp(EnumFieldType.class, CLEAR_TABLES);
-
- EnumFieldType e = new EnumFieldType();
- e.setEnumField(SampleEnum.FOO);
- EntityManager em = emf.createEntityManager();
- em.getTransaction().begin();
- em.persist(e);
- em.getTransaction().commit();
- em.close();
- }
-
- public void testEnumQueryConstructor() {
- Query q = em.createQuery(
- "select new EnumFieldType(e.intField, e.enumField) " +
- "from EnumFieldType e");
- EnumFieldType e = (EnumFieldType) q.getSingleResult();
- assertEquals(SampleEnum.FOO, e.getEnumField());
- }
+/*
+ * 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.fields;
+
+import java.util.List;
+import javax.persistence.EntityManager;
+import javax.persistence.Query;
+
+import org.apache.openjpa.persistence.test.SingleEMTestCase;
+import org.apache.openjpa.persistence.simple.AllFieldTypes;
+
+public class TestEnumQueryConstructor
+ extends SingleEMTestCase {
+
+ public void setUp() {
+ setUp(EnumFieldType.class, CLEAR_TABLES);
+
+ EnumFieldType e = new EnumFieldType();
+ e.setEnumField(SampleEnum.FOO);
+ EntityManager em = emf.createEntityManager();
+ em.getTransaction().begin();
+ em.persist(e);
+ em.getTransaction().commit();
+ em.close();
+ }
+
+ public void testEnumQueryConstructor() {
+ Query q = em.createQuery(
+ "select new EnumFieldType(e.intField, e.enumField) " +
+ "from EnumFieldType e");
+ EnumFieldType e = (EnumFieldType) q.getSingleResult();
+ assertEquals(SampleEnum.FOO, e.getEnumField());
+ }
}
\ No newline at end of file
Propchange: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/fields/TestEnumQueryConstructor.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/fields/TestEnumSets.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/fields/TestEnumSets.java?rev=757280&r1=757279&r2=757280&view=diff
==============================================================================
--- openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/fields/TestEnumSets.java (original)
+++ openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/fields/TestEnumSets.java Sun Mar 22 23:45:15 2009
@@ -1,48 +1,48 @@
-/*
- * 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.fields;
-
-import java.util.EnumSet;
-
-import org.apache.openjpa.persistence.test.SingleEMTestCase;
-
-public class TestEnumSets
- extends SingleEMTestCase {
-
- public void setUp() {
- setUp(EnumSetOwner.class, CLEAR_TABLES);
- }
-
- public void testExternalizedEnumSet() {
- // test that inserting works
- EnumSetOwner o = new EnumSetOwner();
- o.setEnumSet(EnumSet.allOf(SampleEnum.class));
-
- em.getTransaction().begin();
- em.persist(o);
- em.getTransaction().commit();
- Object oid = em.getObjectId(o);
- em.close();
-
- // ... and that loading works, with a new EM
- em = emf.createEntityManager();
- o = em.find(EnumSetOwner.class, oid);
- assertEquals(EnumSet.allOf(SampleEnum.class), o.getEnumSet());
- }
+/*
+ * 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.fields;
+
+import java.util.EnumSet;
+
+import org.apache.openjpa.persistence.test.SingleEMTestCase;
+
+public class TestEnumSets
+ extends SingleEMTestCase {
+
+ public void setUp() {
+ setUp(EnumSetOwner.class, CLEAR_TABLES);
+ }
+
+ public void testExternalizedEnumSet() {
+ // test that inserting works
+ EnumSetOwner o = new EnumSetOwner();
+ o.setEnumSet(EnumSet.allOf(SampleEnum.class));
+
+ em.getTransaction().begin();
+ em.persist(o);
+ em.getTransaction().commit();
+ Object oid = em.getObjectId(o);
+ em.close();
+
+ // ... and that loading works, with a new EM
+ em = emf.createEntityManager();
+ o = em.find(EnumSetOwner.class, oid);
+ assertEquals(EnumSet.allOf(SampleEnum.class), o.getEnumSet());
+ }
}
\ No newline at end of file
Propchange: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/fields/TestEnumSets.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/fields/TestPersistentMapTableConfiguration.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/fields/TestPersistentMapTableConfiguration.java?rev=757280&r1=757279&r2=757280&view=diff
==============================================================================
--- openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/fields/TestPersistentMapTableConfiguration.java (original)
+++ openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/fields/TestPersistentMapTableConfiguration.java Sun Mar 22 23:45:15 2009
@@ -1,57 +1,57 @@
-/*
- * 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.fields;
-
-import org.apache.openjpa.persistence.test.SQLListenerTestCase;
-import org.apache.openjpa.persistence.OpenJPAEntityManager;
-import org.apache.openjpa.persistence.JPAFacadeHelper;
-import org.apache.openjpa.jdbc.meta.ClassMapping;
-
-public class TestPersistentMapTableConfiguration
- extends SQLListenerTestCase {
-
- public void setUp() {
- setUp(NonstandardMappingEntity.class);
- }
-
- public void testPersistentMapMetaData() {
- ClassMapping cm = (ClassMapping) JPAFacadeHelper.getMetaData(emf,
- NonstandardMappingEntity.class);
- assertEquals("NONSTD_MAPPING_MAP",
- cm.getFieldMapping("map").getTable().getName());
- }
-
- public void testPersistentMapInsert() {
- NonstandardMappingEntity e = new NonstandardMappingEntity();
- OpenJPAEntityManager em = emf.createEntityManager();
- em.getIdGenerator(NonstandardMappingEntity.class).allocate(1);
- sql.clear();
- try {
- em.getTransaction().begin();
- em.persist(e);
- e.getMap().put("foo", "bar");
- em.flush();
- assertEquals(2, sql.size());
- assertSQL(".*NONSTD_MAPPING_MAP.*");
- } finally {
- if (em.getTransaction().isActive())
- em.getTransaction().rollback();
- }
- }
+/*
+ * 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.fields;
+
+import org.apache.openjpa.persistence.test.SQLListenerTestCase;
+import org.apache.openjpa.persistence.OpenJPAEntityManager;
+import org.apache.openjpa.persistence.JPAFacadeHelper;
+import org.apache.openjpa.jdbc.meta.ClassMapping;
+
+public class TestPersistentMapTableConfiguration
+ extends SQLListenerTestCase {
+
+ public void setUp() {
+ setUp(NonstandardMappingEntity.class);
+ }
+
+ public void testPersistentMapMetaData() {
+ ClassMapping cm = (ClassMapping) JPAFacadeHelper.getMetaData(emf,
+ NonstandardMappingEntity.class);
+ assertEquals("NONSTD_MAPPING_MAP",
+ cm.getFieldMapping("map").getTable().getName());
+ }
+
+ public void testPersistentMapInsert() {
+ NonstandardMappingEntity e = new NonstandardMappingEntity();
+ OpenJPAEntityManager em = emf.createEntityManager();
+ em.getIdGenerator(NonstandardMappingEntity.class).allocate(1);
+ sql.clear();
+ try {
+ em.getTransaction().begin();
+ em.persist(e);
+ e.getMap().put("foo", "bar");
+ em.flush();
+ assertEquals(2, sql.size());
+ assertSQL(".*NONSTD_MAPPING_MAP.*");
+ } finally {
+ if (em.getTransaction().isActive())
+ em.getTransaction().rollback();
+ }
+ }
}
\ No newline at end of file
Propchange: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/fields/TestPersistentMapTableConfiguration.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/generationtype/GeneratedValues.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/generationtype/GeneratedValues.java?rev=757280&r1=757279&r2=757280&view=diff
==============================================================================
--- openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/generationtype/GeneratedValues.java (original)
+++ openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/generationtype/GeneratedValues.java Sun Mar 22 23:45:15 2009
@@ -1,60 +1,60 @@
-/*
- * 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.generationtype;
-
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-
-@Entity
-public class GeneratedValues {
- @Id
- @GeneratedValue
- private int id;
-
- @GeneratedValue
- private long field;
-
- public GeneratedValues() {
- super();
- }
-
- public GeneratedValues(int id, long field) {
- super();
- this.id = id;
- this.field = field;
- }
-
- public int getId() {
- return id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public long getField() {
- return field;
- }
-
- public void setField(long field) {
- this.field = field;
- }
-
-}
+/*
+ * 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.generationtype;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+
+@Entity
+public class GeneratedValues {
+ @Id
+ @GeneratedValue
+ private int id;
+
+ @GeneratedValue
+ private long field;
+
+ public GeneratedValues() {
+ super();
+ }
+
+ public GeneratedValues(int id, long field) {
+ super();
+ this.id = id;
+ this.field = field;
+ }
+
+ public int getId() {
+ return id;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+
+ public long getField() {
+ return field;
+ }
+
+ public void setField(long field) {
+ this.field = field;
+ }
+
+}
Propchange: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/generationtype/GeneratedValues.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/generationtype/TestGeneratedValues.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/generationtype/TestGeneratedValues.java?rev=757280&r1=757279&r2=757280&view=diff
==============================================================================
--- openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/generationtype/TestGeneratedValues.java (original)
+++ openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/generationtype/TestGeneratedValues.java Sun Mar 22 23:45:15 2009
@@ -1,112 +1,112 @@
-/*
- * 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.generationtype;
-
-import javax.persistence.EntityManager;
-import javax.persistence.EntityExistsException;
-
-import org.apache.openjpa.persistence.InvalidStateException;
-import org.apache.openjpa.persistence.test.SingleEMFTestCase;
-
-public class TestGeneratedValues extends SingleEMFTestCase {
-
- public void setUp() {
- setUp(GeneratedValues.class, CLEAR_TABLES);
- }
-
- public void testDefaultValues() {
- EntityManager em = emf.createEntityManager();
-
- GeneratedValues gv = new GeneratedValues();
- GeneratedValues gv2 = new GeneratedValues();
-
- em.getTransaction().begin();
- em.persist(gv);
- em.persist(gv2);
- em.getTransaction().commit();
-
- em.refresh(gv);
- em.refresh(gv2);
-
- assertFalse(gv.getId() == gv2.getId());
- assertFalse(gv.getField() == gv2.getField());
- }
-
- public void testInitialValues() {
- EntityManager em = emf.createEntityManager();
-
- GeneratedValues gv = new GeneratedValues(7, 9);
-
- try {
- em.getTransaction().begin();
- em.persist(gv);
- em.getTransaction().commit();
- } catch (InvalidStateException ise) {
- // expected result
- return;
- } catch (EntityExistsException eee) {
- // also ok
- return;
- }
-
- // should not get here...
- fail();
- }
-
- public void testIdSetter() {
- EntityManager em = emf.createEntityManager();
-
- GeneratedValues gv = new GeneratedValues();
- gv.setId(3);
-
- try {
- em.getTransaction().begin();
- em.persist(gv);
- em.getTransaction().commit();
- } catch (InvalidStateException ise) {
- // expected result
- return;
- } catch (EntityExistsException eee) {
- // also ok
- return;
- }
-
- // should not get here...
- fail();
- }
-
- public void testFieldSetter() {
- EntityManager em = emf.createEntityManager();
-
- GeneratedValues gv = new GeneratedValues();
- gv.setField(5);
-
- try {
- em.getTransaction().begin();
- em.persist(gv);
- em.getTransaction().commit();
- } catch (InvalidStateException ise) {
- // expected result
- return;
- }
-
- // should not get here...
- fail();
- }
-}
+/*
+ * 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.generationtype;
+
+import javax.persistence.EntityManager;
+import javax.persistence.EntityExistsException;
+
+import org.apache.openjpa.persistence.InvalidStateException;
+import org.apache.openjpa.persistence.test.SingleEMFTestCase;
+
+public class TestGeneratedValues extends SingleEMFTestCase {
+
+ public void setUp() {
+ setUp(GeneratedValues.class, CLEAR_TABLES);
+ }
+
+ public void testDefaultValues() {
+ EntityManager em = emf.createEntityManager();
+
+ GeneratedValues gv = new GeneratedValues();
+ GeneratedValues gv2 = new GeneratedValues();
+
+ em.getTransaction().begin();
+ em.persist(gv);
+ em.persist(gv2);
+ em.getTransaction().commit();
+
+ em.refresh(gv);
+ em.refresh(gv2);
+
+ assertFalse(gv.getId() == gv2.getId());
+ assertFalse(gv.getField() == gv2.getField());
+ }
+
+ public void testInitialValues() {
+ EntityManager em = emf.createEntityManager();
+
+ GeneratedValues gv = new GeneratedValues(7, 9);
+
+ try {
+ em.getTransaction().begin();
+ em.persist(gv);
+ em.getTransaction().commit();
+ } catch (InvalidStateException ise) {
+ // expected result
+ return;
+ } catch (EntityExistsException eee) {
+ // also ok
+ return;
+ }
+
+ // should not get here...
+ fail();
+ }
+
+ public void testIdSetter() {
+ EntityManager em = emf.createEntityManager();
+
+ GeneratedValues gv = new GeneratedValues();
+ gv.setId(3);
+
+ try {
+ em.getTransaction().begin();
+ em.persist(gv);
+ em.getTransaction().commit();
+ } catch (InvalidStateException ise) {
+ // expected result
+ return;
+ } catch (EntityExistsException eee) {
+ // also ok
+ return;
+ }
+
+ // should not get here...
+ fail();
+ }
+
+ public void testFieldSetter() {
+ EntityManager em = emf.createEntityManager();
+
+ GeneratedValues gv = new GeneratedValues();
+ gv.setField(5);
+
+ try {
+ em.getTransaction().begin();
+ em.persist(gv);
+ em.getTransaction().commit();
+ } catch (InvalidStateException ise) {
+ // expected result
+ return;
+ }
+
+ // should not get here...
+ fail();
+ }
+}
Propchange: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/generationtype/TestGeneratedValues.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/IdentityGenerationType.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: openjpa/branches/1.0.x/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?rev=757280&r1=757279&r2=757280&view=diff
==============================================================================
--- openjpa/branches/1.0.x/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 Sun Mar 22 23:45:15 2009
@@ -1,50 +1,50 @@
-/*
- * 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;
-
-import java.math.BigDecimal;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-
-/**
- * @author <a href="mailto:mnachev@gmail.com">Miroslav Nachev</a>
- */
-@Entity
-public class SQLBigDecimalIdEntity {
-
- @Id
- private BigDecimal id;
- private int data;
-
- public BigDecimal getId() {
- return id;
- }
-
- public void setId(BigDecimal id) {
- this.id = id;
- }
-
- public int getData() {
- return data;
- }
-
- public void setData(int data) {
- this.data = data;
- }
-}
+/*
+ * 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;
+
+import java.math.BigDecimal;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+
+/**
+ * @author <a href="mailto:mnachev@gmail.com">Miroslav Nachev</a>
+ */
+@Entity
+public class SQLBigDecimalIdEntity {
+
+ @Id
+ private BigDecimal id;
+ private int data;
+
+ public BigDecimal getId() {
+ return id;
+ }
+
+ public void setId(BigDecimal id) {
+ this.id = id;
+ }
+
+ public int getData() {
+ return data;
+ }
+
+ public void setData(int data) {
+ this.data = data;
+ }
+}
Propchange: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/SQLBigDecimalIdEntity.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: openjpa/branches/1.0.x/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?rev=757280&r1=757279&r2=757280&view=diff
==============================================================================
--- openjpa/branches/1.0.x/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 Sun Mar 22 23:45:15 2009
@@ -1,50 +1,50 @@
-/*
- * 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;
-
-import java.math.BigInteger;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-
-/**
- * @author <a href="mailto:mnachev@gmail.com">Miroslav Nachev</a>
- */
-@Entity
-public class SQLBigIntegerIdEntity {
-
- @Id
- private BigInteger id;
- private int data;
-
- public BigInteger getId() {
- return id;
- }
-
- public void setId(BigInteger id) {
- this.id = id;
- }
-
- public int getData() {
- return data;
- }
-
- public void setData(int data) {
- this.data = data;
- }
-}
+/*
+ * 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;
+
+import java.math.BigInteger;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+
+/**
+ * @author <a href="mailto:mnachev@gmail.com">Miroslav Nachev</a>
+ */
+@Entity
+public class SQLBigIntegerIdEntity {
+
+ @Id
+ private BigInteger id;
+ private int data;
+
+ public BigInteger getId() {
+ return id;
+ }
+
+ public void setId(BigInteger id) {
+ this.id = id;
+ }
+
+ public int getData() {
+ return data;
+ }
+
+ public void setData(int data) {
+ this.data = data;
+ }
+}
Propchange: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/SQLBigIntegerIdEntity.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/TestGenerationType.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: openjpa/branches/1.0.x/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?rev=757280&r1=757279&r2=757280&view=diff
==============================================================================
--- openjpa/branches/1.0.x/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 Sun Mar 22 23:45:15 2009
@@ -1,61 +1,61 @@
-/*
- * 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;
-
-import java.math.BigDecimal;
-import javax.persistence.EntityManager;
-
-import junit.textui.TestRunner;
-import org.apache.openjpa.persistence.test.SingleEMFTestCase;
-
-/**
- * @author <a href="mailto:mnachev@gmail.com">Miroslav Nachev</a>
- */
-public class TestSQLBigDecimalId
- extends SingleEMFTestCase {
-
- public void setUp() {
- setUp(SQLBigDecimalIdEntity.class, CLEAR_TABLES);
- }
-
- public void testPersist() {
- long time = ((long) (System.currentTimeMillis() / 1000)) * 1000;
- BigDecimal decimal = new BigDecimal(time);
-
- SQLBigDecimalIdEntity e = new SQLBigDecimalIdEntity();
- e.setId(decimal);
- e.setData(1);
-
- EntityManager em = emf.createEntityManager();
- em.getTransaction().begin();
- em.persist(e);
- em.getTransaction().commit();
- assertEquals(time, e.getId().longValue());
- em.close();
-
- em = emf.createEntityManager();
- e = em.find(SQLBigDecimalIdEntity.class, decimal);
- assertEquals(1, e.getData());
- em.close();
- }
-
- public static void main(String[] args) {
- TestRunner.run(SQLBigDecimalIdEntity.class);
- }
-}
+/*
+ * 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;
+
+import java.math.BigDecimal;
+import javax.persistence.EntityManager;
+
+import junit.textui.TestRunner;
+import org.apache.openjpa.persistence.test.SingleEMFTestCase;
+
+/**
+ * @author <a href="mailto:mnachev@gmail.com">Miroslav Nachev</a>
+ */
+public class TestSQLBigDecimalId
+ extends SingleEMFTestCase {
+
+ public void setUp() {
+ setUp(SQLBigDecimalIdEntity.class, CLEAR_TABLES);
+ }
+
+ public void testPersist() {
+ long time = ((long) (System.currentTimeMillis() / 1000)) * 1000;
+ BigDecimal decimal = new BigDecimal(time);
+
+ SQLBigDecimalIdEntity e = new SQLBigDecimalIdEntity();
+ e.setId(decimal);
+ e.setData(1);
+
+ EntityManager em = emf.createEntityManager();
+ em.getTransaction().begin();
+ em.persist(e);
+ em.getTransaction().commit();
+ assertEquals(time, e.getId().longValue());
+ em.close();
+
+ em = emf.createEntityManager();
+ e = em.find(SQLBigDecimalIdEntity.class, decimal);
+ assertEquals(1, e.getData());
+ em.close();
+ }
+
+ public static void main(String[] args) {
+ TestRunner.run(SQLBigDecimalIdEntity.class);
+ }
+}
Propchange: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/TestSQLBigDecimalId.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: openjpa/branches/1.0.x/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?rev=757280&r1=757279&r2=757280&view=diff
==============================================================================
--- openjpa/branches/1.0.x/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 Sun Mar 22 23:45:15 2009
@@ -1,62 +1,62 @@
-/*
- * 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;
-
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import javax.persistence.EntityManager;
-
-import junit.textui.TestRunner;
-import org.apache.openjpa.persistence.test.SingleEMFTestCase;
-
-/**
- * @author <a href="mailto:mnachev@gmail.com">Miroslav Nachev</a>
- */
-public class TestSQLBigIntegerId
- extends SingleEMFTestCase {
-
- public void setUp() {
- setUp(SQLBigIntegerIdEntity.class, CLEAR_TABLES);
- }
-
- public void testPersist() {
- long time = ((long) (System.currentTimeMillis() / 1000)) * 1000;
- BigInteger integer = new BigDecimal(time).toBigInteger();
-
- SQLBigIntegerIdEntity e = new SQLBigIntegerIdEntity();
- e.setId(integer);
- e.setData(1);
-
- EntityManager em = emf.createEntityManager();
- em.getTransaction().begin();
- em.persist(e);
- em.getTransaction().commit();
- assertEquals(time, e.getId().longValue());
- em.close();
-
- em = emf.createEntityManager();
- e = em.find(SQLBigIntegerIdEntity.class, integer);
- assertEquals(1, e.getData());
- em.close();
- }
-
- public static void main(String[] args) {
- TestRunner.run(SQLBigIntegerIdEntity.class);
- }
-}
+/*
+ * 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;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import javax.persistence.EntityManager;
+
+import junit.textui.TestRunner;
+import org.apache.openjpa.persistence.test.SingleEMFTestCase;
+
+/**
+ * @author <a href="mailto:mnachev@gmail.com">Miroslav Nachev</a>
+ */
+public class TestSQLBigIntegerId
+ extends SingleEMFTestCase {
+
+ public void setUp() {
+ setUp(SQLBigIntegerIdEntity.class, CLEAR_TABLES);
+ }
+
+ public void testPersist() {
+ long time = ((long) (System.currentTimeMillis() / 1000)) * 1000;
+ BigInteger integer = new BigDecimal(time).toBigInteger();
+
+ SQLBigIntegerIdEntity e = new SQLBigIntegerIdEntity();
+ e.setId(integer);
+ e.setData(1);
+
+ EntityManager em = emf.createEntityManager();
+ em.getTransaction().begin();
+ em.persist(e);
+ em.getTransaction().commit();
+ assertEquals(time, e.getId().longValue());
+ em.close();
+
+ em = emf.createEntityManager();
+ e = em.find(SQLBigIntegerIdEntity.class, integer);
+ assertEquals(1, e.getData());
+ em.close();
+ }
+
+ public static void main(String[] args) {
+ TestRunner.run(SQLBigIntegerIdEntity.class);
+ }
+}
Propchange: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/identity/TestSQLBigIntegerId.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/EntityL3.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/MappedSuperclassBase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/MappedSuperclassL2.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/NoGenEntityL3.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/NoGenEntityL3Sibling.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/NoGenEntityL3Sibling.java?rev=757280&r1=757279&r2=757280&view=diff
==============================================================================
--- openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/NoGenEntityL3Sibling.java (original)
+++ openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/NoGenEntityL3Sibling.java Sun Mar 22 23:45:15 2009
@@ -1,37 +1,37 @@
-/*
- * 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.inheritance;
-
-import javax.persistence.Entity;
-
-@Entity
-public class NoGenEntityL3Sibling
- extends NoGenMappedSuperclassL2 {
-
- private int siblingl3data;
-
- public int getSiblingL3Data() {
- return siblingl3data;
- }
-
- public void setSiblingL3Data(int data) {
- siblingl3data = data;
- }
-}
-
+/*
+ * 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.inheritance;
+
+import javax.persistence.Entity;
+
+@Entity
+public class NoGenEntityL3Sibling
+ extends NoGenMappedSuperclassL2 {
+
+ private int siblingl3data;
+
+ public int getSiblingL3Data() {
+ return siblingl3data;
+ }
+
+ public void setSiblingL3Data(int data) {
+ siblingl3data = data;
+ }
+}
+
Propchange: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/NoGenEntityL3Sibling.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/NoGenMappedSuperclassBase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/NoGenMappedSuperclassL2.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/TestMultipleMappedSuperclassHierarchy.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/TestSharedUnqualifiedClassNames.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/TestSharedUnqualifiedClassNames.java?rev=757280&r1=757279&r2=757280&view=diff
==============================================================================
--- openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/TestSharedUnqualifiedClassNames.java (original)
+++ openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/TestSharedUnqualifiedClassNames.java Sun Mar 22 23:45:15 2009
@@ -1,62 +1,62 @@
-/*
- * 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.inheritance;
-
-import org.apache.openjpa.persistence.test.SingleEMFTestCase;
-import org.apache.openjpa.persistence.OpenJPAPersistence;
-import org.apache.openjpa.meta.ClassMetaData;
-import org.apache.openjpa.kernel.AbstractBrokerFactory;
-
-/**
- * Test that entities, mapped superclasses, and embeddables can all share
- * the same short names without any collisions.
- */
-public class TestSharedUnqualifiedClassNames
- extends SingleEMFTestCase {
-
- public void setUp() {
- setUp(org.apache.openjpa.persistence.inheritance.mappedsuperclass
- .SharedName1.class,
- org.apache.openjpa.persistence.inheritance.entity
- .SharedName1.class,
- org.apache.openjpa.persistence.inheritance.embeddable
- .SharedName2.class,
- org.apache.openjpa.persistence.inheritance.entity
- .SharedName2.class);
- emf.createEntityManager().close();
- }
-
- public void testMappedSuperclass() {
- ClassMetaData meta = emf.getConfiguration()
- .getMetaDataRepositoryInstance()
- .getMetaData("SharedName1", getClass().getClassLoader(), true);
- assertEquals(
- org.apache.openjpa.persistence.inheritance.entity.SharedName1.class,
- meta.getDescribedType());
- }
-
- public void testEmbeddable() {
- ClassMetaData meta = emf.getConfiguration()
- .getMetaDataRepositoryInstance()
- .getMetaData("SharedName2", getClass().getClassLoader(), true);
- assertEquals(
- org.apache.openjpa.persistence.inheritance.entity.SharedName2.class,
- meta.getDescribedType());
- }
-}
+/*
+ * 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.inheritance;
+
+import org.apache.openjpa.persistence.test.SingleEMFTestCase;
+import org.apache.openjpa.persistence.OpenJPAPersistence;
+import org.apache.openjpa.meta.ClassMetaData;
+import org.apache.openjpa.kernel.AbstractBrokerFactory;
+
+/**
+ * Test that entities, mapped superclasses, and embeddables can all share
+ * the same short names without any collisions.
+ */
+public class TestSharedUnqualifiedClassNames
+ extends SingleEMFTestCase {
+
+ public void setUp() {
+ setUp(org.apache.openjpa.persistence.inheritance.mappedsuperclass
+ .SharedName1.class,
+ org.apache.openjpa.persistence.inheritance.entity
+ .SharedName1.class,
+ org.apache.openjpa.persistence.inheritance.embeddable
+ .SharedName2.class,
+ org.apache.openjpa.persistence.inheritance.entity
+ .SharedName2.class);
+ emf.createEntityManager().close();
+ }
+
+ public void testMappedSuperclass() {
+ ClassMetaData meta = emf.getConfiguration()
+ .getMetaDataRepositoryInstance()
+ .getMetaData("SharedName1", getClass().getClassLoader(), true);
+ assertEquals(
+ org.apache.openjpa.persistence.inheritance.entity.SharedName1.class,
+ meta.getDescribedType());
+ }
+
+ public void testEmbeddable() {
+ ClassMetaData meta = emf.getConfiguration()
+ .getMetaDataRepositoryInstance()
+ .getMetaData("SharedName2", getClass().getClassLoader(), true);
+ assertEquals(
+ org.apache.openjpa.persistence.inheritance.entity.SharedName2.class,
+ meta.getDescribedType());
+ }
+}
Propchange: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/TestSharedUnqualifiedClassNames.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/embeddable/SharedName2.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/embeddable/SharedName2.java?rev=757280&r1=757279&r2=757280&view=diff
==============================================================================
--- openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/embeddable/SharedName2.java (original)
+++ openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/embeddable/SharedName2.java Sun Mar 22 23:45:15 2009
@@ -1,30 +1,30 @@
-/*
- * 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.inheritance.embeddable;
-
-import javax.persistence.Embeddable;
-
-/**
- * This class has the same name as {@link
- * org.apache.openjpa.persistence.inheritance.entity.SharedName2}
- */
-@Embeddable
-public class SharedName2 {
-
-}
+/*
+ * 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.inheritance.embeddable;
+
+import javax.persistence.Embeddable;
+
+/**
+ * This class has the same name as {@link
+ * org.apache.openjpa.persistence.inheritance.entity.SharedName2}
+ */
+@Embeddable
+public class SharedName2 {
+
+}
Propchange: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/embeddable/SharedName2.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entity/SharedName1.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entity/SharedName1.java?rev=757280&r1=757279&r2=757280&view=diff
==============================================================================
--- openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entity/SharedName1.java (original)
+++ openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entity/SharedName1.java Sun Mar 22 23:45:15 2009
@@ -1,33 +1,33 @@
-/*
- * 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.inheritance.entity;
-
-import javax.persistence.Entity;
-import javax.persistence.Id;
-
-/**
- * This class has the same name as {@link
- * org.apache.openjpa.persistence.inheritance.mappedsuperclass.SharedName1}
- */
-@Entity
-public class SharedName1 {
-
- @Id
- private long id;
-}
+/*
+ * 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.inheritance.entity;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+
+/**
+ * This class has the same name as {@link
+ * org.apache.openjpa.persistence.inheritance.mappedsuperclass.SharedName1}
+ */
+@Entity
+public class SharedName1 {
+
+ @Id
+ private long id;
+}
Propchange: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entity/SharedName1.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entity/SharedName2.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entity/SharedName2.java?rev=757280&r1=757279&r2=757280&view=diff
==============================================================================
--- openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entity/SharedName2.java (original)
+++ openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entity/SharedName2.java Sun Mar 22 23:45:15 2009
@@ -1,33 +1,33 @@
-/*
- * 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.inheritance.entity;
-
-import javax.persistence.Entity;
-import javax.persistence.Id;
-
-/**
- * This class has the same name as {@link
- * org.apache.openjpa.persistence.inheritance.embeddable.SharedName2}
- */
-@Entity
-public class SharedName2 {
-
- @Id
- private long id;
-}
+/*
+ * 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.inheritance.entity;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+
+/**
+ * This class has the same name as {@link
+ * org.apache.openjpa.persistence.inheritance.embeddable.SharedName2}
+ */
+@Entity
+public class SharedName2 {
+
+ @Id
+ private long id;
+}
Propchange: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/entity/SharedName2.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/mappedsuperclass/SharedName1.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/mappedsuperclass/SharedName1.java?rev=757280&r1=757279&r2=757280&view=diff
==============================================================================
--- openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/mappedsuperclass/SharedName1.java (original)
+++ openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/mappedsuperclass/SharedName1.java Sun Mar 22 23:45:15 2009
@@ -1,30 +1,30 @@
-/*
- * 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.inheritance.mappedsuperclass;
-
-import javax.persistence.MappedSuperclass;
-
-/**
- * This class has the same name as {@link
- * org.apache.openjpa.persistence.inheritance.entity.SharedName1}
- */
-@MappedSuperclass
-public class SharedName1 {
-
-}
+/*
+ * 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.inheritance.mappedsuperclass;
+
+import javax.persistence.MappedSuperclass;
+
+/**
+ * This class has the same name as {@link
+ * org.apache.openjpa.persistence.inheritance.entity.SharedName1}
+ */
+@MappedSuperclass
+public class SharedName1 {
+
+}
Propchange: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/inheritance/mappedsuperclass/SharedName1.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: openjpa/branches/1.0.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/TestFKColumnNames.java
------------------------------------------------------------------------------
svn:eol-style = native