olingo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chanda...@apache.org
Subject olingo-odata4 git commit: [OLINGO-768] Exception Implementation
Date Sun, 06 Sep 2015 15:00:39 GMT
Repository: olingo-odata4
Updated Branches:
  refs/heads/OLINGO-549-ODataV4-JPA 7edc5efaa -> b1d625dd2


[OLINGO-768] Exception Implementation

Signed-off-by: Chandan V A <chandan.v.a@sap.com>

Project: http://git-wip-us.apache.org/repos/asf/olingo-odata4/repo
Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata4/commit/b1d625dd
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4/tree/b1d625dd
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4/diff/b1d625dd

Branch: refs/heads/OLINGO-549-ODataV4-JPA
Commit: b1d625dd215054f693fd49af8e447e71fc9d2c99
Parents: 7edc5ef
Author: Chandan V A <chandan.v.a@sap.com>
Authored: Sun Sep 6 20:30:29 2015 +0530
Committer: Chandan V A <chandan.v.a@sap.com>
Committed: Sun Sep 6 20:30:29 2015 +0530

----------------------------------------------------------------------
 .../core/exception/ODataJPAModelException.java  | 49 ++++++++++++++++++++
 .../exception/ODataJPARuntimeException.java     |  2 +-
 .../odata-jpa-core-exception-i18n.properties    | 21 ---------
 .../odata-jpa-model-exception-i18n.properties   | 20 ++++++++
 .../odata-jpa-rt-exception-i18n.properties      | 21 +++++++++
 5 files changed, 91 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/b1d625dd/ext/odata-jpa/odata-jpa-core/src/main/java/org/apache/olingo/jpa/core/exception/ODataJPAModelException.java
----------------------------------------------------------------------
diff --git a/ext/odata-jpa/odata-jpa-core/src/main/java/org/apache/olingo/jpa/core/exception/ODataJPAModelException.java
b/ext/odata-jpa/odata-jpa-core/src/main/java/org/apache/olingo/jpa/core/exception/ODataJPAModelException.java
new file mode 100644
index 0000000..fa50a36
--- /dev/null
+++ b/ext/odata-jpa/odata-jpa-core/src/main/java/org/apache/olingo/jpa/core/exception/ODataJPAModelException.java
@@ -0,0 +1,49 @@
+/*
+ * 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.olingo.jpa.core.exception;
+
+import org.apache.olingo.jpa.api.exception.ODataJPAException;
+
+public class ODataJPAModelException extends ODataJPAException {
+  /**
+   * 
+   */
+  private static final long serialVersionUID = 1L;
+  private static final String DEFAULT_BUNDLE_NAME = "odata-jpa-model-exception-i18n";
+
+  public static enum MessageKeys implements MessageKey {
+    INVALID_PERSISTENCE_UNIT;
+    
+    @Override
+    public String getKey() {
+      return name();
+    }
+  }
+
+  public ODataJPAModelException(String developmentMessage, Throwable cause, MessageKey messageKey,
+      String[] parameters) {
+    super(developmentMessage, cause, messageKey, parameters);
+  }
+
+  @Override
+  protected String getBundleName() {
+    return DEFAULT_BUNDLE_NAME ;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/b1d625dd/ext/odata-jpa/odata-jpa-core/src/main/java/org/apache/olingo/jpa/core/exception/ODataJPARuntimeException.java
----------------------------------------------------------------------
diff --git a/ext/odata-jpa/odata-jpa-core/src/main/java/org/apache/olingo/jpa/core/exception/ODataJPARuntimeException.java
b/ext/odata-jpa/odata-jpa-core/src/main/java/org/apache/olingo/jpa/core/exception/ODataJPARuntimeException.java
index 0731d2b..9886fc0 100644
--- a/ext/odata-jpa/odata-jpa-core/src/main/java/org/apache/olingo/jpa/core/exception/ODataJPARuntimeException.java
+++ b/ext/odata-jpa/odata-jpa-core/src/main/java/org/apache/olingo/jpa/core/exception/ODataJPARuntimeException.java
@@ -26,7 +26,7 @@ public class ODataJPARuntimeException extends ODataJPAException {
    * 
    */
   private static final long serialVersionUID = 1L;
-  private static final String DEFAULT_BUNDLE_NAME = "odata-jpa-core-exception-i18n";
+  private static final String DEFAULT_BUNDLE_NAME = "odata-jpa-rt-exception-i18n";
 
   public static enum MessageKeys implements MessageKey {
     NULL_PUNIT;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/b1d625dd/ext/odata-jpa/odata-jpa-core/src/main/resources/odata-jpa-core-exception-i18n.properties
----------------------------------------------------------------------
diff --git a/ext/odata-jpa/odata-jpa-core/src/main/resources/odata-jpa-core-exception-i18n.properties
b/ext/odata-jpa/odata-jpa-core/src/main/resources/odata-jpa-core-exception-i18n.properties
deleted file mode 100644
index 91911c7..0000000
--- a/ext/odata-jpa/odata-jpa-core/src/main/resources/odata-jpa-core-exception-i18n.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-#-------------------------------------------------------------------------------
-# 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.
-#-------------------------------------------------------------------------------
-# Basic Apache Olingo exception messages
-#
-ODataJPARuntimeException.NULL_PUNIT = "Persistence Unit Name cannot be null" 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/b1d625dd/ext/odata-jpa/odata-jpa-core/src/main/resources/odata-jpa-model-exception-i18n.properties
----------------------------------------------------------------------
diff --git a/ext/odata-jpa/odata-jpa-core/src/main/resources/odata-jpa-model-exception-i18n.properties
b/ext/odata-jpa/odata-jpa-core/src/main/resources/odata-jpa-model-exception-i18n.properties
new file mode 100644
index 0000000..366086b
--- /dev/null
+++ b/ext/odata-jpa/odata-jpa-core/src/main/resources/odata-jpa-model-exception-i18n.properties
@@ -0,0 +1,20 @@
+#-------------------------------------------------------------------------------
+# 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.
+#-------------------------------------------------------------------------------
+# Basic Apache Olingo exception messages
+#

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/b1d625dd/ext/odata-jpa/odata-jpa-core/src/main/resources/odata-jpa-rt-exception-i18n.properties
----------------------------------------------------------------------
diff --git a/ext/odata-jpa/odata-jpa-core/src/main/resources/odata-jpa-rt-exception-i18n.properties
b/ext/odata-jpa/odata-jpa-core/src/main/resources/odata-jpa-rt-exception-i18n.properties
new file mode 100644
index 0000000..91911c7
--- /dev/null
+++ b/ext/odata-jpa/odata-jpa-core/src/main/resources/odata-jpa-rt-exception-i18n.properties
@@ -0,0 +1,21 @@
+#-------------------------------------------------------------------------------
+# 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.
+#-------------------------------------------------------------------------------
+# Basic Apache Olingo exception messages
+#
+ODataJPARuntimeException.NULL_PUNIT = "Persistence Unit Name cannot be null" 
\ No newline at end of file


Mime
View raw message