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 [20/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/src/main/java/org/apache/openjpa/persistence/AutoDetachType.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AutoDetachType.java?rev=757280&r1=757279&r2=757280&view=diff
==============================================================================
--- openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AutoDetachType.java (original)
+++ openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AutoDetachType.java Sun Mar 22 23:45:15 2009
@@ -1,63 +1,63 @@
-/*
- * 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;
-
-import java.util.EnumSet;
-
-import org.apache.openjpa.kernel.AutoDetach;
-
-/**
- * The possible settings for the auto-detach behavior of an
- * {@link OpenJPAEntityManager}.
- *
- * @since 1.0.0
- * @published
- */
-public enum AutoDetachType {
-    CLOSE(AutoDetach.DETACH_CLOSE),
-    COMMIT(AutoDetach.DETACH_COMMIT),
-    NON_TRANSACTIONAL_READ(AutoDetach.DETACH_NONTXREAD),
-    ROLLBACK(AutoDetach.DETACH_ROLLBACK);
-
-    private final int autoDetachConstant;
-
-    private AutoDetachType(int value) {
-        autoDetachConstant = value;
-    }
-
-    public static EnumSet<AutoDetachType> toEnumSet(int autoDetach) {
-        EnumSet<AutoDetachType> types = EnumSet.noneOf(AutoDetachType.class);
-        if ((autoDetach & AutoDetach.DETACH_CLOSE) != 0)
-            types.add(CLOSE);
-        if ((autoDetach & AutoDetach.DETACH_COMMIT) != 0)
-            types.add(COMMIT);
-        if ((autoDetach & AutoDetach.DETACH_NONTXREAD) != 0)
-            types.add(NON_TRANSACTIONAL_READ);
-        if ((autoDetach & AutoDetach.DETACH_ROLLBACK) != 0)
-            types.add(ROLLBACK);
-        return types;
-    }
-
-    public static int fromEnumSet(EnumSet<AutoDetachType> types) {
-        int autoDetach = 0;
-        for (AutoDetachType type : types)
-            autoDetach |= type.autoDetachConstant;
-        return autoDetach;
-    }
-}
+/*
+ * 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;
+
+import java.util.EnumSet;
+
+import org.apache.openjpa.kernel.AutoDetach;
+
+/**
+ * The possible settings for the auto-detach behavior of an
+ * {@link OpenJPAEntityManager}.
+ *
+ * @since 1.0.0
+ * @published
+ */
+public enum AutoDetachType {
+    CLOSE(AutoDetach.DETACH_CLOSE),
+    COMMIT(AutoDetach.DETACH_COMMIT),
+    NON_TRANSACTIONAL_READ(AutoDetach.DETACH_NONTXREAD),
+    ROLLBACK(AutoDetach.DETACH_ROLLBACK);
+
+    private final int autoDetachConstant;
+
+    private AutoDetachType(int value) {
+        autoDetachConstant = value;
+    }
+
+    public static EnumSet<AutoDetachType> toEnumSet(int autoDetach) {
+        EnumSet<AutoDetachType> types = EnumSet.noneOf(AutoDetachType.class);
+        if ((autoDetach & AutoDetach.DETACH_CLOSE) != 0)
+            types.add(CLOSE);
+        if ((autoDetach & AutoDetach.DETACH_COMMIT) != 0)
+            types.add(COMMIT);
+        if ((autoDetach & AutoDetach.DETACH_NONTXREAD) != 0)
+            types.add(NON_TRANSACTIONAL_READ);
+        if ((autoDetach & AutoDetach.DETACH_ROLLBACK) != 0)
+            types.add(ROLLBACK);
+        return types;
+    }
+
+    public static int fromEnumSet(EnumSet<AutoDetachType> types) {
+        int autoDetach = 0;
+        for (AutoDetachType type : types)
+            autoDetach |= type.autoDetachConstant;
+        return autoDetach;
+    }
+}

Propchange: openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/AutoDetachType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/CallbackMode.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/CallbackMode.java?rev=757280&r1=757279&r2=757280&view=diff
==============================================================================
--- openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/CallbackMode.java (original)
+++ openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/CallbackMode.java Sun Mar 22 23:45:15 2009
@@ -1,66 +1,66 @@
-/*
- * 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;
-
-import java.util.EnumSet;
-
-import org.apache.openjpa.event.CallbackModes;
-
-/**
- * The possible settings for the callback behavior of an
- * {@link OpenJPAEntityManager}.
- *
- * @since 1.0.0
- * @published
- */
-public enum CallbackMode {
-    FAIL_FAST(CallbackModes.CALLBACK_FAIL_FAST),
-    IGNORE(CallbackModes.CALLBACK_IGNORE),
-    LOG(CallbackModes.CALLBACK_LOG),
-    RETHROW(CallbackModes.CALLBACK_RETHROW),
-    ROLLBACK(CallbackModes.CALLBACK_ROLLBACK);
-
-    private final int callbackMode;
-
-    private CallbackMode(int value) {
-        callbackMode = value;
-    }
-
-    static EnumSet<CallbackMode> toEnumSet(int callback) {
-        EnumSet<CallbackMode> modes = EnumSet.noneOf(CallbackMode.class);
-        if ((callback & CallbackModes.CALLBACK_FAIL_FAST) != 0)
-            modes.add(FAIL_FAST);
-        if ((callback & CallbackModes.CALLBACK_IGNORE) != 0)
-            modes.add(IGNORE);
-        if ((callback & CallbackModes.CALLBACK_LOG) != 0)
-            modes.add(LOG);
-        if ((callback & CallbackModes.CALLBACK_RETHROW) != 0)
-            modes.add(RETHROW);
-        if ((callback & CallbackModes.CALLBACK_ROLLBACK) != 0)
-            modes.add(ROLLBACK);
-        return modes;
-    }
-
-    static int fromEnumSet(EnumSet<CallbackMode> modes) {
-        int callback = 0;
-        for (CallbackMode mode : modes)
-            callback |= mode.callbackMode;
-        return callback;
-    }
-}
+/*
+ * 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;
+
+import java.util.EnumSet;
+
+import org.apache.openjpa.event.CallbackModes;
+
+/**
+ * The possible settings for the callback behavior of an
+ * {@link OpenJPAEntityManager}.
+ *
+ * @since 1.0.0
+ * @published
+ */
+public enum CallbackMode {
+    FAIL_FAST(CallbackModes.CALLBACK_FAIL_FAST),
+    IGNORE(CallbackModes.CALLBACK_IGNORE),
+    LOG(CallbackModes.CALLBACK_LOG),
+    RETHROW(CallbackModes.CALLBACK_RETHROW),
+    ROLLBACK(CallbackModes.CALLBACK_ROLLBACK);
+
+    private final int callbackMode;
+
+    private CallbackMode(int value) {
+        callbackMode = value;
+    }
+
+    static EnumSet<CallbackMode> toEnumSet(int callback) {
+        EnumSet<CallbackMode> modes = EnumSet.noneOf(CallbackMode.class);
+        if ((callback & CallbackModes.CALLBACK_FAIL_FAST) != 0)
+            modes.add(FAIL_FAST);
+        if ((callback & CallbackModes.CALLBACK_IGNORE) != 0)
+            modes.add(IGNORE);
+        if ((callback & CallbackModes.CALLBACK_LOG) != 0)
+            modes.add(LOG);
+        if ((callback & CallbackModes.CALLBACK_RETHROW) != 0)
+            modes.add(RETHROW);
+        if ((callback & CallbackModes.CALLBACK_ROLLBACK) != 0)
+            modes.add(ROLLBACK);
+        return modes;
+    }
+
+    static int fromEnumSet(EnumSet<CallbackMode> modes) {
+        int callback = 0;
+        for (CallbackMode mode : modes)
+            callback |= mode.callbackMode;
+        return callback;
+    }
+}

Propchange: openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/CallbackMode.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/ConnectionRetainMode.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/ConnectionRetainMode.java?rev=757280&r1=757279&r2=757280&view=diff
==============================================================================
--- openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/ConnectionRetainMode.java (original)
+++ openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/ConnectionRetainMode.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;
-
-import org.apache.openjpa.kernel.ConnectionRetainModes;
-
-/**
- * The possible values for use when configuring the connection retain
- * behavior for an {@link OpenJPAEntityManager}.
- *
- * @since 1.0.0
- * @published
- */
-public enum ConnectionRetainMode {
-    ON_DEMAND(ConnectionRetainModes.CONN_RETAIN_DEMAND),
-    TRANSACTION(ConnectionRetainModes.CONN_RETAIN_TRANS),
-    ALWAYS(ConnectionRetainModes.CONN_RETAIN_ALWAYS);
-
-    private final int connectionRetainConstant;
-
-    private ConnectionRetainMode(int value) {
-        connectionRetainConstant = value;
-    }
-
-    int toKernelConstant() {
-        return connectionRetainConstant;
-    }
-
-    static ConnectionRetainMode fromKernelConstant(int kernelConstant) {
-        switch (kernelConstant) {
-            case ConnectionRetainModes.CONN_RETAIN_DEMAND:
-                return ON_DEMAND;
-
-            case ConnectionRetainModes.CONN_RETAIN_ALWAYS:
-                return ALWAYS;
-
-            case ConnectionRetainModes.CONN_RETAIN_TRANS:
-                return TRANSACTION;
-
-            default:
-                throw new IllegalArgumentException(kernelConstant + "");
-        }
-    }
-}
+/*
+ * 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;
+
+import org.apache.openjpa.kernel.ConnectionRetainModes;
+
+/**
+ * The possible values for use when configuring the connection retain
+ * behavior for an {@link OpenJPAEntityManager}.
+ *
+ * @since 1.0.0
+ * @published
+ */
+public enum ConnectionRetainMode {
+    ON_DEMAND(ConnectionRetainModes.CONN_RETAIN_DEMAND),
+    TRANSACTION(ConnectionRetainModes.CONN_RETAIN_TRANS),
+    ALWAYS(ConnectionRetainModes.CONN_RETAIN_ALWAYS);
+
+    private final int connectionRetainConstant;
+
+    private ConnectionRetainMode(int value) {
+        connectionRetainConstant = value;
+    }
+
+    int toKernelConstant() {
+        return connectionRetainConstant;
+    }
+
+    static ConnectionRetainMode fromKernelConstant(int kernelConstant) {
+        switch (kernelConstant) {
+            case ConnectionRetainModes.CONN_RETAIN_DEMAND:
+                return ON_DEMAND;
+
+            case ConnectionRetainModes.CONN_RETAIN_ALWAYS:
+                return ALWAYS;
+
+            case ConnectionRetainModes.CONN_RETAIN_TRANS:
+                return TRANSACTION;
+
+            default:
+                throw new IllegalArgumentException(kernelConstant + "");
+        }
+    }
+}

Propchange: openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/ConnectionRetainMode.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/DataCache.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/DataStoreId.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/Dependent.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/DetachStateType.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/DetachStateType.java?rev=757280&r1=757279&r2=757280&view=diff
==============================================================================
--- openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/DetachStateType.java (original)
+++ openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/DetachStateType.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;
-
-import org.apache.openjpa.kernel.DetachState;
-
-/**
- * The possible settings for the detachment behavior of an
- * {@link OpenJPAEntityManager}.
- *
- * @since 1.0.0
- * @published
- */
-public enum DetachStateType {
-    FETCH_GROUPS(DetachState.DETACH_FETCH_GROUPS),
-    LOADED(DetachState.DETACH_LOADED),
-    ALL(DetachState.DETACH_ALL);
-
-    private final int detachStateConstant;
-
-    private DetachStateType(int value) {
-        detachStateConstant = value;
-    }
-
-    int toKernelConstant() {
-        return detachStateConstant;
-    }
-
-    static DetachStateType fromKernelConstant(int kernelConstant) {
-        switch (kernelConstant) {
-            case DetachState.DETACH_FETCH_GROUPS:
-                return FETCH_GROUPS;
-
-            case DetachState.DETACH_LOADED:
-                return LOADED;
-
-            case DetachState.DETACH_ALL:
-                return ALL;
-
-            default:
-                throw new IllegalArgumentException(kernelConstant + "");
-        }
-    }
-}
+/*
+ * 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;
+
+import org.apache.openjpa.kernel.DetachState;
+
+/**
+ * The possible settings for the detachment behavior of an
+ * {@link OpenJPAEntityManager}.
+ *
+ * @since 1.0.0
+ * @published
+ */
+public enum DetachStateType {
+    FETCH_GROUPS(DetachState.DETACH_FETCH_GROUPS),
+    LOADED(DetachState.DETACH_LOADED),
+    ALL(DetachState.DETACH_ALL);
+
+    private final int detachStateConstant;
+
+    private DetachStateType(int value) {
+        detachStateConstant = value;
+    }
+
+    int toKernelConstant() {
+        return detachStateConstant;
+    }
+
+    static DetachStateType fromKernelConstant(int kernelConstant) {
+        switch (kernelConstant) {
+            case DetachState.DETACH_FETCH_GROUPS:
+                return FETCH_GROUPS;
+
+            case DetachState.DETACH_LOADED:
+                return LOADED;
+
+            case DetachState.DETACH_ALL:
+                return ALL;
+
+            default:
+                throw new IllegalArgumentException(kernelConstant + "");
+        }
+    }
+}

Propchange: openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/DetachStateType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/DetachedState.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/ElementDependent.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/ElementType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityExistsException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerFactoryImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: openjpa/branches/1.0.x/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerFactoryValue.java
------------------------------------------------------------------------------
    svn:eol-style = native