You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by ch...@apache.org on 2013/09/20 15:34:20 UTC
[58/59] [abbrv] git commit: cleanup jpa ref
cleanup jpa ref
Project: http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/commit/b31ec847
Tree: http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/tree/b31ec847
Diff: http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/diff/b31ec847
Branch: refs/heads/master
Commit: b31ec84741e4356a1b0e7fcf454e3a3ed1e82695
Parents: 02a598b
Author: Christian Amend <ch...@apache.org>
Authored: Fri Sep 20 15:25:55 2013 +0200
Committer: Christian Amend <ch...@apache.org>
Committed: Fri Sep 20 15:25:55 2013 +0200
----------------------------------------------------------------------
.../ref/factory/JPAEntityManagerFactory.java | 13 ++++-----
.../odata2/jpa/processor/ref/model/Address.java | 10 +++----
.../jpa/processor/ref/model/Material.java | 10 +++----
.../odata2/jpa/processor/ref/model/Note.java | 10 +++----
.../processor/ref/model/SalesOrderHeader.java | 30 +++++++++++---------
.../jpa/processor/ref/model/SalesOrderItem.java | 10 +++----
.../processor/ref/model/SalesOrderItemKey.java | 10 +++----
.../odata2/jpa/processor/ref/model/Store.java | 10 +++----
8 files changed, 52 insertions(+), 51 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/b31ec847/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/factory/JPAEntityManagerFactory.java
----------------------------------------------------------------------
diff --git a/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/factory/JPAEntityManagerFactory.java b/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/factory/JPAEntityManagerFactory.java
index 688d125..1f4a7a8 100644
--- a/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/factory/JPAEntityManagerFactory.java
+++ b/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/factory/JPAEntityManagerFactory.java
@@ -1,18 +1,18 @@
/*******************************************************************************
* Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
+ * 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
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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
+ * KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
******************************************************************************/
@@ -36,8 +36,7 @@ public class JPAEntityManagerFactory {
if (emfMap.containsKey(pUnit)) {
return emfMap.get(pUnit);
- } else
- {
+ } else {
EntityManagerFactory emf = Persistence.createEntityManagerFactory(pUnit);
emfMap.put(pUnit, emf);
return emf;
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/b31ec847/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Address.java
----------------------------------------------------------------------
diff --git a/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Address.java b/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Address.java
index d7a5ea0..a0aabcb 100644
--- a/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Address.java
+++ b/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Address.java
@@ -1,18 +1,18 @@
/*******************************************************************************
* Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
+ * 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
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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
+ * KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
******************************************************************************/
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/b31ec847/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Material.java
----------------------------------------------------------------------
diff --git a/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Material.java b/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Material.java
index a34f240..6f08119 100644
--- a/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Material.java
+++ b/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Material.java
@@ -1,18 +1,18 @@
/*******************************************************************************
* Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
+ * 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
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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
+ * KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
******************************************************************************/
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/b31ec847/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Note.java
----------------------------------------------------------------------
diff --git a/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Note.java b/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Note.java
index ea09511..4a93509 100644
--- a/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Note.java
+++ b/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Note.java
@@ -1,18 +1,18 @@
/*******************************************************************************
* Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
+ * 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
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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
+ * KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
******************************************************************************/
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/b31ec847/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/SalesOrderHeader.java
----------------------------------------------------------------------
diff --git a/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/SalesOrderHeader.java b/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/SalesOrderHeader.java
index c40512c..2aad540 100644
--- a/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/SalesOrderHeader.java
+++ b/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/SalesOrderHeader.java
@@ -1,18 +1,18 @@
/*******************************************************************************
* Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
+ * 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
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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
+ * KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
******************************************************************************/
@@ -61,15 +61,15 @@ public class SalesOrderHeader {
@Temporal(TemporalType.TIMESTAMP)
private Calendar creationDate;
-
+
@Column
private Character status;
-
+
public Character getStatus() {
return status;
}
- public void setStatus(Character status) {
+ public void setStatus(final Character status) {
this.status = status;
}
@@ -127,9 +127,9 @@ public class SalesOrderHeader {
long originalTime;
if (creationDate != null) {
originalTime = creationDate.getTime().getTime();
- }
- else
+ } else {
originalTime = Calendar.getInstance(TimeZone.getDefault()).getTime().getTime();
+ }
Date newDate = new Date(originalTime - TimeZone.getDefault().getOffset(originalTime));
Calendar newCalendar = Calendar.getInstance();
newCalendar.setTime(newDate);
@@ -212,7 +212,7 @@ public class SalesOrderHeader {
return shortText;
}
- public void setShortText(char[] shortText) {
+ public void setShortText(final char[] shortText) {
this.shortText = shortText;
}
@@ -220,13 +220,15 @@ public class SalesOrderHeader {
return longText;
}
- public void setLongText(Character[] longText) {
+ public void setLongText(final Character[] longText) {
this.longText = longText;
}
@PostPersist
public void defaultValues() {
- if (this.creationDate == null) setCreationDate(this.creationDate);
+ if (creationDate == null) {
+ setCreationDate(creationDate);
+ }
}
-
+
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/b31ec847/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/SalesOrderItem.java
----------------------------------------------------------------------
diff --git a/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/SalesOrderItem.java b/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/SalesOrderItem.java
index 07eb6e6..fa20b47 100644
--- a/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/SalesOrderItem.java
+++ b/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/SalesOrderItem.java
@@ -1,18 +1,18 @@
/*******************************************************************************
* Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
+ * 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
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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
+ * KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
******************************************************************************/
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/b31ec847/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/SalesOrderItemKey.java
----------------------------------------------------------------------
diff --git a/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/SalesOrderItemKey.java b/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/SalesOrderItemKey.java
index f4bc895..efc09d2 100644
--- a/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/SalesOrderItemKey.java
+++ b/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/SalesOrderItemKey.java
@@ -1,18 +1,18 @@
/*******************************************************************************
* Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
+ * 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
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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
+ * KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
******************************************************************************/
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/b31ec847/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Store.java
----------------------------------------------------------------------
diff --git a/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Store.java b/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Store.java
index 95c2625..b88bc3a 100644
--- a/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Store.java
+++ b/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Store.java
@@ -1,18 +1,18 @@
/*******************************************************************************
* Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
+ * 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
+ * with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * 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
+ * KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
******************************************************************************/