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 2014/10/09 16:49:54 UTC
[2/9] line ending issue again
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/b155bda5/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/converter/BlobToByteConverter.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/converter/BlobToByteConverter.java b/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/converter/BlobToByteConverter.java
index e950d69..16835fe 100644
--- a/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/converter/BlobToByteConverter.java
+++ b/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/converter/BlobToByteConverter.java
@@ -1,70 +1,70 @@
-/*******************************************************************************
- * 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.odata2.jpa.processor.ref.converter;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.sql.Blob;
-import java.sql.SQLException;
-
-import javax.persistence.AttributeConverter;
-import javax.persistence.Converter;
-
-import org.hsqldb.jdbc.JDBCBlob;
-
-@Converter(autoApply = true)
-public class BlobToByteConverter implements AttributeConverter<Blob, byte[]> {
-
- @Override
- public byte[] convertToDatabaseColumn(final Blob arg0) {
- if (arg0 == null) {
- return null;
- }
- ByteArrayOutputStream buffer = new ByteArrayOutputStream();
- InputStream is;
- try {
- is = arg0.getBinaryStream();
- int b;
- b = is.read();
- while (b != -1) {
- buffer.write(b);
- b = is.read();
- }
- } catch (SQLException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- }
- return buffer.toByteArray();
- }
-
- @Override
- public Blob convertToEntityAttribute(final byte[] arg0) {
- try {
- if (arg0 == null) {
- return null;
- }
- return new JDBCBlob(arg0);
- } catch (SQLException e) {
- e.printStackTrace();
- }
- return null;
- }
-}
+/*******************************************************************************
+ * 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.odata2.jpa.processor.ref.converter;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.sql.Blob;
+import java.sql.SQLException;
+
+import javax.persistence.AttributeConverter;
+import javax.persistence.Converter;
+
+import org.hsqldb.jdbc.JDBCBlob;
+
+@Converter(autoApply = true)
+public class BlobToByteConverter implements AttributeConverter<Blob, byte[]> {
+
+ @Override
+ public byte[] convertToDatabaseColumn(final Blob arg0) {
+ if (arg0 == null) {
+ return null;
+ }
+ ByteArrayOutputStream buffer = new ByteArrayOutputStream();
+ InputStream is;
+ try {
+ is = arg0.getBinaryStream();
+ int b;
+ b = is.read();
+ while (b != -1) {
+ buffer.write(b);
+ b = is.read();
+ }
+ } catch (SQLException e) {
+ e.printStackTrace();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ return buffer.toByteArray();
+ }
+
+ @Override
+ public Blob convertToEntityAttribute(final byte[] arg0) {
+ try {
+ if (arg0 == null) {
+ return null;
+ }
+ return new JDBCBlob(arg0);
+ } catch (SQLException e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/b155bda5/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/factory/JPAEntityManagerFactory.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/factory/JPAEntityManagerFactory.java b/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/factory/JPAEntityManagerFactory.java
index 1f4a7a8..9e53eb3 100644
--- a/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/factory/JPAEntityManagerFactory.java
+++ b/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/factory/JPAEntityManagerFactory.java
@@ -1,46 +1,46 @@
-/*******************************************************************************
- * 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.odata2.jpa.processor.ref.factory;
-
-import java.util.HashMap;
-
-import javax.persistence.EntityManagerFactory;
-import javax.persistence.Persistence;
-
-public class JPAEntityManagerFactory {
- private static HashMap<String, EntityManagerFactory> emfMap;
-
- public static EntityManagerFactory getEntityManagerFactory(final String pUnit) {
- if (pUnit == null) {
- return null;
- }
- if (emfMap == null) {
- emfMap = new HashMap<String, EntityManagerFactory>();
- }
-
- if (emfMap.containsKey(pUnit)) {
- return emfMap.get(pUnit);
- } else {
- EntityManagerFactory emf = Persistence.createEntityManagerFactory(pUnit);
- emfMap.put(pUnit, emf);
- return emf;
- }
-
- }
-}
+/*******************************************************************************
+ * 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.odata2.jpa.processor.ref.factory;
+
+import java.util.HashMap;
+
+import javax.persistence.EntityManagerFactory;
+import javax.persistence.Persistence;
+
+public class JPAEntityManagerFactory {
+ private static HashMap<String, EntityManagerFactory> emfMap;
+
+ public static EntityManagerFactory getEntityManagerFactory(final String pUnit) {
+ if (pUnit == null) {
+ return null;
+ }
+ if (emfMap == null) {
+ emfMap = new HashMap<String, EntityManagerFactory>();
+ }
+
+ if (emfMap.containsKey(pUnit)) {
+ return emfMap.get(pUnit);
+ } else {
+ EntityManagerFactory emf = Persistence.createEntityManagerFactory(pUnit);
+ emfMap.put(pUnit, emf);
+ return emf;
+ }
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/b155bda5/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/listeners/SalesOrderItemTombstoneListener.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/listeners/SalesOrderItemTombstoneListener.java b/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/listeners/SalesOrderItemTombstoneListener.java
index 05de214..26c5b81 100644
--- a/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/listeners/SalesOrderItemTombstoneListener.java
+++ b/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/listeners/SalesOrderItemTombstoneListener.java
@@ -1,93 +1,93 @@
-/*******************************************************************************
- * 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.odata2.jpa.processor.ref.listeners;
-
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.List;
-
-import javax.persistence.EntityManager;
-import javax.persistence.Query;
-
-import org.apache.olingo.odata2.api.edm.EdmException;
-import org.apache.olingo.odata2.api.uri.info.GetEntitySetUriInfo;
-import org.apache.olingo.odata2.jpa.processor.api.ODataJPATombstoneContext;
-import org.apache.olingo.odata2.jpa.processor.api.ODataJPATombstoneEntityListener;
-import org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPAModelException;
-import org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPARuntimeException;
-import org.apache.olingo.odata2.jpa.processor.api.jpql.JPQLContext;
-import org.apache.olingo.odata2.jpa.processor.api.jpql.JPQLContextType;
-import org.apache.olingo.odata2.jpa.processor.api.jpql.JPQLStatement;
-
-public class SalesOrderItemTombstoneListener extends ODataJPATombstoneEntityListener {
-
- @Override
- public Query getQuery(final GetEntitySetUriInfo resultsView, final EntityManager em) {
- JPQLContextType contextType = null;
-
- try {
- if (!resultsView.getStartEntitySet().getName().equals(resultsView.getTargetEntitySet().getName())) {
- contextType = JPQLContextType.JOIN;
- } else {
- contextType = JPQLContextType.SELECT;
- }
-
- JPQLContext jpqlContext = JPQLContext.createBuilder(contextType, resultsView).build();
- JPQLStatement jpqlStatement = JPQLStatement.createBuilder(jpqlContext).build();
- String deltaToken = ODataJPATombstoneContext.getDeltaToken();
-
- Query query = null;
- if (deltaToken != null) {
- String statement = jpqlStatement.toString();
- String[] statementParts = statement.split(JPQLStatement.KEYWORD.WHERE);
- String deltaCondition = jpqlContext.getJPAEntityAlias() + ".creationDate >= {ts '" + deltaToken + "'}";
- if (statementParts.length > 1) {
- statement =
- statementParts[0] + JPQLStatement.DELIMITER.SPACE + JPQLStatement.KEYWORD.WHERE
- + JPQLStatement.DELIMITER.SPACE + deltaCondition + JPQLStatement.DELIMITER.SPACE
- + JPQLStatement.Operator.AND + statementParts[1];
- } else {
- statement =
- statementParts[0] + JPQLStatement.DELIMITER.SPACE + JPQLStatement.KEYWORD.WHERE
- + JPQLStatement.DELIMITER.SPACE + deltaCondition;
- }
-
- query = em.createQuery(statement);
- } else {
- query = em.createQuery(jpqlStatement.toString());
- }
-
- return query;
- } catch (EdmException e) {
- return null;
- } catch (ODataJPAModelException e) {
- return null;
- } catch (ODataJPARuntimeException e) {
- return null;
- }
- }
-
- @Override
- public String generateDeltaToken(final List<Object> deltas, final Query query) {
- SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.000");
-
- Date date = new Date(System.currentTimeMillis());
- return dateFormat.format(date);
- }
-}
+/*******************************************************************************
+ * 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.odata2.jpa.processor.ref.listeners;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+
+import javax.persistence.EntityManager;
+import javax.persistence.Query;
+
+import org.apache.olingo.odata2.api.edm.EdmException;
+import org.apache.olingo.odata2.api.uri.info.GetEntitySetUriInfo;
+import org.apache.olingo.odata2.jpa.processor.api.ODataJPATombstoneContext;
+import org.apache.olingo.odata2.jpa.processor.api.ODataJPATombstoneEntityListener;
+import org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPAModelException;
+import org.apache.olingo.odata2.jpa.processor.api.exception.ODataJPARuntimeException;
+import org.apache.olingo.odata2.jpa.processor.api.jpql.JPQLContext;
+import org.apache.olingo.odata2.jpa.processor.api.jpql.JPQLContextType;
+import org.apache.olingo.odata2.jpa.processor.api.jpql.JPQLStatement;
+
+public class SalesOrderItemTombstoneListener extends ODataJPATombstoneEntityListener {
+
+ @Override
+ public Query getQuery(final GetEntitySetUriInfo resultsView, final EntityManager em) {
+ JPQLContextType contextType = null;
+
+ try {
+ if (!resultsView.getStartEntitySet().getName().equals(resultsView.getTargetEntitySet().getName())) {
+ contextType = JPQLContextType.JOIN;
+ } else {
+ contextType = JPQLContextType.SELECT;
+ }
+
+ JPQLContext jpqlContext = JPQLContext.createBuilder(contextType, resultsView).build();
+ JPQLStatement jpqlStatement = JPQLStatement.createBuilder(jpqlContext).build();
+ String deltaToken = ODataJPATombstoneContext.getDeltaToken();
+
+ Query query = null;
+ if (deltaToken != null) {
+ String statement = jpqlStatement.toString();
+ String[] statementParts = statement.split(JPQLStatement.KEYWORD.WHERE);
+ String deltaCondition = jpqlContext.getJPAEntityAlias() + ".creationDate >= {ts '" + deltaToken + "'}";
+ if (statementParts.length > 1) {
+ statement =
+ statementParts[0] + JPQLStatement.DELIMITER.SPACE + JPQLStatement.KEYWORD.WHERE
+ + JPQLStatement.DELIMITER.SPACE + deltaCondition + JPQLStatement.DELIMITER.SPACE
+ + JPQLStatement.Operator.AND + statementParts[1];
+ } else {
+ statement =
+ statementParts[0] + JPQLStatement.DELIMITER.SPACE + JPQLStatement.KEYWORD.WHERE
+ + JPQLStatement.DELIMITER.SPACE + deltaCondition;
+ }
+
+ query = em.createQuery(statement);
+ } else {
+ query = em.createQuery(jpqlStatement.toString());
+ }
+
+ return query;
+ } catch (EdmException e) {
+ return null;
+ } catch (ODataJPAModelException e) {
+ return null;
+ } catch (ODataJPARuntimeException e) {
+ return null;
+ }
+ }
+
+ @Override
+ public String generateDeltaToken(final List<Object> deltas, final Query query) {
+ SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.000");
+
+ Date date = new Date(System.currentTimeMillis());
+ return dateFormat.format(date);
+ }
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/b155bda5/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/listeners/SalesOrderTombstoneListener.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/listeners/SalesOrderTombstoneListener.java b/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/listeners/SalesOrderTombstoneListener.java
index 0545eac..55f2013 100644
--- a/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/listeners/SalesOrderTombstoneListener.java
+++ b/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/listeners/SalesOrderTombstoneListener.java
@@ -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.olingo.odata2.jpa.processor.ref.listeners;
-
-import java.util.List;
-
-import javax.persistence.EntityManager;
-import javax.persistence.PostLoad;
-import javax.persistence.Query;
-
-import org.apache.olingo.odata2.api.uri.info.GetEntitySetUriInfo;
-import org.apache.olingo.odata2.jpa.processor.api.ODataJPATombstoneContext;
-import org.apache.olingo.odata2.jpa.processor.api.ODataJPATombstoneEntityListener;
-import org.apache.olingo.odata2.jpa.processor.ref.model.SalesOrderHeader;
-
-public class SalesOrderTombstoneListener extends ODataJPATombstoneEntityListener {
-
- public static String ENTITY_NAME = "SalesOrderHeader";
-
- @PostLoad
- public void handleDelta(final Object entity) {
- SalesOrderHeader so = (SalesOrderHeader) entity;
-
- if (so.getCreationDate().getTime().getTime() < ODataJPATombstoneContext.getDeltaTokenUTCTimeStamp()) {
- return;
- } else {
- addToDelta(entity, ENTITY_NAME);
- }
- }
-
- @Override
- public String generateDeltaToken(final List<Object> deltas, final Query query) {
- return String.valueOf(System.currentTimeMillis());
- }
-
- @Override
- public Query getQuery(final GetEntitySetUriInfo resultsView, final EntityManager em) {
- return null;
- }
-
-}
+/*******************************************************************************
+ * 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.odata2.jpa.processor.ref.listeners;
+
+import java.util.List;
+
+import javax.persistence.EntityManager;
+import javax.persistence.PostLoad;
+import javax.persistence.Query;
+
+import org.apache.olingo.odata2.api.uri.info.GetEntitySetUriInfo;
+import org.apache.olingo.odata2.jpa.processor.api.ODataJPATombstoneContext;
+import org.apache.olingo.odata2.jpa.processor.api.ODataJPATombstoneEntityListener;
+import org.apache.olingo.odata2.jpa.processor.ref.model.SalesOrderHeader;
+
+public class SalesOrderTombstoneListener extends ODataJPATombstoneEntityListener {
+
+ public static String ENTITY_NAME = "SalesOrderHeader";
+
+ @PostLoad
+ public void handleDelta(final Object entity) {
+ SalesOrderHeader so = (SalesOrderHeader) entity;
+
+ if (so.getCreationDate().getTime().getTime() < ODataJPATombstoneContext.getDeltaTokenUTCTimeStamp()) {
+ return;
+ } else {
+ addToDelta(entity, ENTITY_NAME);
+ }
+ }
+
+ @Override
+ public String generateDeltaToken(final List<Object> deltas, final Query query) {
+ return String.valueOf(System.currentTimeMillis());
+ }
+
+ @Override
+ public Query getQuery(final GetEntitySetUriInfo resultsView, final EntityManager em) {
+ return null;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/b155bda5/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Address.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Address.java b/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Address.java
index 0ae4adf..14adb5e 100644
--- a/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Address.java
+++ b/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Address.java
@@ -1,94 +1,94 @@
-/*******************************************************************************
- * 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.odata2.jpa.processor.ref.model;
-
-import javax.persistence.Column;
-import javax.persistence.Embeddable;
-
-@Embeddable
-public class Address {
-
- public Address() {
- super();
- }
-
- public Address(final short houseNumber, final String streetName, final String city,
- final String country) {
- this();
- this.houseNumber = houseNumber;
- this.streetName = streetName;
- this.city = city;
- this.country = country;
- }
-
- @Column(name = "HOUSE_NUMBER")
- private short houseNumber;
-
- @Column(name = "STREET_NAME")
- private String streetName;
-
- @Column(name = "CITY")
- private String city;
-
- @Column(name = "COUNTRY")
- private String country;
-
- @Column(name = "PINCODE")
- private String pincode;
-
- public String getPincode() {
- return pincode;
- }
-
- public void setPincode(final String pincode) {
- this.pincode = pincode;
- }
-
- public short getHouseNumber() {
- return houseNumber;
- }
-
- public void setHouseNumber(final short houseNumber) {
- this.houseNumber = houseNumber;
- }
-
- public String getStreetName() {
- return streetName;
- }
-
- public void setStreetName(final String streetName) {
- this.streetName = streetName;
- }
-
- public String getCity() {
- return city;
- }
-
- public void setCity(final String city) {
- this.city = city;
- }
-
- public String getCountry() {
- return country;
- }
-
- public void setCountry(final String country) {
- this.country = country;
- }
-}
+/*******************************************************************************
+ * 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.odata2.jpa.processor.ref.model;
+
+import javax.persistence.Column;
+import javax.persistence.Embeddable;
+
+@Embeddable
+public class Address {
+
+ public Address() {
+ super();
+ }
+
+ public Address(final short houseNumber, final String streetName, final String city,
+ final String country) {
+ this();
+ this.houseNumber = houseNumber;
+ this.streetName = streetName;
+ this.city = city;
+ this.country = country;
+ }
+
+ @Column(name = "HOUSE_NUMBER")
+ private short houseNumber;
+
+ @Column(name = "STREET_NAME")
+ private String streetName;
+
+ @Column(name = "CITY")
+ private String city;
+
+ @Column(name = "COUNTRY")
+ private String country;
+
+ @Column(name = "PINCODE")
+ private String pincode;
+
+ public String getPincode() {
+ return pincode;
+ }
+
+ public void setPincode(final String pincode) {
+ this.pincode = pincode;
+ }
+
+ public short getHouseNumber() {
+ return houseNumber;
+ }
+
+ public void setHouseNumber(final short houseNumber) {
+ this.houseNumber = houseNumber;
+ }
+
+ public String getStreetName() {
+ return streetName;
+ }
+
+ public void setStreetName(final String streetName) {
+ this.streetName = streetName;
+ }
+
+ public String getCity() {
+ return city;
+ }
+
+ public void setCity(final String city) {
+ this.city = city;
+ }
+
+ public String getCountry() {
+ return country;
+ }
+
+ public void setCountry(final String country) {
+ this.country = country;
+ }
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/b155bda5/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Category.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Category.java b/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Category.java
index 7c8965e..d21e5bc 100644
--- a/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Category.java
+++ b/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Category.java
@@ -1,80 +1,80 @@
-/*******************************************************************************
- * 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.odata2.jpa.processor.ref.model;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.OneToMany;
-import javax.persistence.Table;
-
-@Entity
-@Table(name = "T_CATEGORY")
-public class Category {
-
- @Id
- @Column(name = "CODE")
- private char code[] = new char[2];
-
- @Id
- @Column(name = "ID")
- private long id;
-
- @Column(name = "DESC")
- private String description;
-
- @OneToMany(mappedBy = "category")
- private List<Material> materials = new ArrayList<Material>();
-
- public List<Material> getMaterials() {
- return materials;
- }
-
- public void setMaterials(final List<Material> materials) {
- this.materials = materials;
- }
-
- public long getId() {
- return id;
- }
-
- public void setId(final long id) {
- this.id = id;
- }
-
- public char[] getCode() {
- return code;
- }
-
- public void setCode(final char[] code) {
- this.code = code;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(final String description) {
- this.description = description;
- }
-
-}
+/*******************************************************************************
+ * 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.odata2.jpa.processor.ref.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.OneToMany;
+import javax.persistence.Table;
+
+@Entity
+@Table(name = "T_CATEGORY")
+public class Category {
+
+ @Id
+ @Column(name = "CODE")
+ private char code[] = new char[2];
+
+ @Id
+ @Column(name = "ID")
+ private long id;
+
+ @Column(name = "DESC")
+ private String description;
+
+ @OneToMany(mappedBy = "category")
+ private List<Material> materials = new ArrayList<Material>();
+
+ public List<Material> getMaterials() {
+ return materials;
+ }
+
+ public void setMaterials(final List<Material> materials) {
+ this.materials = materials;
+ }
+
+ public long getId() {
+ return id;
+ }
+
+ public void setId(final long id) {
+ this.id = id;
+ }
+
+ public char[] getCode() {
+ return code;
+ }
+
+ public void setCode(final char[] code) {
+ this.code = code;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(final String description) {
+ this.description = description;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/b155bda5/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Customer.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Customer.java b/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Customer.java
index 48243d0..6dabd2a 100644
--- a/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Customer.java
+++ b/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Customer.java
@@ -1,93 +1,93 @@
-/*******************************************************************************
- * 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.odata2.jpa.processor.ref.model;
-
-import java.sql.Timestamp;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.persistence.CascadeType;
-import javax.persistence.Column;
-import javax.persistence.Embedded;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.OneToMany;
-import javax.persistence.Table;
-
-@Entity
-@Table(name = "T_CUSTOMER")
-public class Customer {
-
- @Id
- @Column(name = "ID")
- private Long id;
-
- @Column(name = "NAME")
- private String name;
-
- @Embedded
- private Address address;
-
- @Column(name = "CREATED_AT")
- private Timestamp createdAt;
-
- @OneToMany(mappedBy = "customer", cascade = CascadeType.ALL)
- private List<SalesOrderHeader> orders = new ArrayList<SalesOrderHeader>();
-
- public Long getId() {
- return id;
- }
-
- public void setId(final Long id) {
- this.id = id;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(final String name) {
- this.name = name;
- }
-
- public List<SalesOrderHeader> getOrders() {
- return orders;
- }
-
- public void setOrders(final List<SalesOrderHeader> orders) {
- this.orders = orders;
- }
-
- public Address getAddress() {
- return address;
- }
-
- public void setAddress(final Address address) {
- this.address = address;
- }
-
- public Timestamp getCreatedAt() {
- return createdAt;
- }
-
- public void setCreatedAt(final Timestamp createdAt) {
- this.createdAt = createdAt;
- }
-
-}
+/*******************************************************************************
+ * 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.odata2.jpa.processor.ref.model;
+
+import java.sql.Timestamp;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Embedded;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.OneToMany;
+import javax.persistence.Table;
+
+@Entity
+@Table(name = "T_CUSTOMER")
+public class Customer {
+
+ @Id
+ @Column(name = "ID")
+ private Long id;
+
+ @Column(name = "NAME")
+ private String name;
+
+ @Embedded
+ private Address address;
+
+ @Column(name = "CREATED_AT")
+ private Timestamp createdAt;
+
+ @OneToMany(mappedBy = "customer", cascade = CascadeType.ALL)
+ private List<SalesOrderHeader> orders = new ArrayList<SalesOrderHeader>();
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(final Long id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ public List<SalesOrderHeader> getOrders() {
+ return orders;
+ }
+
+ public void setOrders(final List<SalesOrderHeader> orders) {
+ this.orders = orders;
+ }
+
+ public Address getAddress() {
+ return address;
+ }
+
+ public void setAddress(final Address address) {
+ this.address = address;
+ }
+
+ public Timestamp getCreatedAt() {
+ return createdAt;
+ }
+
+ public void setCreatedAt(final Timestamp createdAt) {
+ this.createdAt = createdAt;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/b155bda5/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Material.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Material.java b/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Material.java
index 8a2ef0c..f6e798c 100644
--- a/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Material.java
+++ b/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Material.java
@@ -1,136 +1,136 @@
-/*******************************************************************************
- * 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.odata2.jpa.processor.ref.model;
-
-import java.sql.Blob;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.persistence.Column;
-import javax.persistence.Convert;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.JoinColumns;
-import javax.persistence.Lob;
-import javax.persistence.ManyToMany;
-import javax.persistence.ManyToOne;
-import javax.persistence.Table;
-
-@Entity
-@Table(name = "T_MATERIAL")
-public class Material {
-
- public Material() {}
-
- public Material(final String materialName, final char[] typeCode, final double price,
- final String measurementUnit) {
- super();
- this.materialName = materialName;
- this.price = price;
- this.measurementUnit = measurementUnit;
- }
-
- @Id
- @Column(name = "MATERIAL_ID")
- private long materialId;
-
- @Column(name = "MATERIAL_NAME")
- private String materialName;
-
- @Column(name = "PRICE")
- private double price;
-
- @Column(name = "MEASUREMENT_UNIT")
- private String measurementUnit;
-
- @Lob
- @Column(name = "MIMAGE")
- @Convert(converter = org.apache.olingo.odata2.jpa.processor.ref.converter.BlobToByteConverter.class)
- private Blob materialImage;
-
- public Blob getMaterialImage() {
- return materialImage;
- }
-
- public void setMaterialImage(final Blob materialImage) {
- this.materialImage = materialImage;
- }
-
- @ManyToMany
- private List<Store> stores = new ArrayList<Store>();
-
- @ManyToOne
- @JoinColumns({ @JoinColumn(name = "TYPE_CODE", referencedColumnName = "CODE"),
- @JoinColumn(name = "CAT_ID", referencedColumnName = "ID") })
- private Category category;
-
- public long getMaterialId() {
- return materialId;
- }
-
- public void setMaterialId(final long materialId) {
- this.materialId = materialId;
- }
-
- public Category getCategory() {
- return category;
- }
-
- public void setCategory(final Category category) {
- this.category = category;
- }
-
- public String getMaterialName() {
- return materialName;
- }
-
- public void setMaterialName(final String materialName) {
- this.materialName = materialName;
- }
-
- public double getPrice() {
- return price;
- }
-
- public void setPrice(final double price) {
- this.price = price;
- }
-
- public String getMeasurementUnit() {
- return measurementUnit;
- }
-
- public void setMeasurementUnit(final String measurementUnit) {
- this.measurementUnit = measurementUnit;
- }
-
- public List<Store> getStores() {
- return stores;
- }
-
- public void setStores(final List<Store> stores) {
- this.stores = stores;
- Iterator<Store> itr = stores.iterator();
- while (itr.hasNext()) {
- itr.next().getMaterials().add(this);
- }
- }
-}
+/*******************************************************************************
+ * 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.odata2.jpa.processor.ref.model;
+
+import java.sql.Blob;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.persistence.Column;
+import javax.persistence.Convert;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.JoinColumns;
+import javax.persistence.Lob;
+import javax.persistence.ManyToMany;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+
+@Entity
+@Table(name = "T_MATERIAL")
+public class Material {
+
+ public Material() {}
+
+ public Material(final String materialName, final char[] typeCode, final double price,
+ final String measurementUnit) {
+ super();
+ this.materialName = materialName;
+ this.price = price;
+ this.measurementUnit = measurementUnit;
+ }
+
+ @Id
+ @Column(name = "MATERIAL_ID")
+ private long materialId;
+
+ @Column(name = "MATERIAL_NAME")
+ private String materialName;
+
+ @Column(name = "PRICE")
+ private double price;
+
+ @Column(name = "MEASUREMENT_UNIT")
+ private String measurementUnit;
+
+ @Lob
+ @Column(name = "MIMAGE")
+ @Convert(converter = org.apache.olingo.odata2.jpa.processor.ref.converter.BlobToByteConverter.class)
+ private Blob materialImage;
+
+ public Blob getMaterialImage() {
+ return materialImage;
+ }
+
+ public void setMaterialImage(final Blob materialImage) {
+ this.materialImage = materialImage;
+ }
+
+ @ManyToMany
+ private List<Store> stores = new ArrayList<Store>();
+
+ @ManyToOne
+ @JoinColumns({ @JoinColumn(name = "TYPE_CODE", referencedColumnName = "CODE"),
+ @JoinColumn(name = "CAT_ID", referencedColumnName = "ID") })
+ private Category category;
+
+ public long getMaterialId() {
+ return materialId;
+ }
+
+ public void setMaterialId(final long materialId) {
+ this.materialId = materialId;
+ }
+
+ public Category getCategory() {
+ return category;
+ }
+
+ public void setCategory(final Category category) {
+ this.category = category;
+ }
+
+ public String getMaterialName() {
+ return materialName;
+ }
+
+ public void setMaterialName(final String materialName) {
+ this.materialName = materialName;
+ }
+
+ public double getPrice() {
+ return price;
+ }
+
+ public void setPrice(final double price) {
+ this.price = price;
+ }
+
+ public String getMeasurementUnit() {
+ return measurementUnit;
+ }
+
+ public void setMeasurementUnit(final String measurementUnit) {
+ this.measurementUnit = measurementUnit;
+ }
+
+ public List<Store> getStores() {
+ return stores;
+ }
+
+ public void setStores(final List<Store> stores) {
+ this.stores = stores;
+ Iterator<Store> itr = stores.iterator();
+ while (itr.hasNext()) {
+ itr.next().getMaterials().add(this);
+ }
+ }
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/b155bda5/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Note.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Note.java b/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Note.java
index 5691dca..434770e 100644
--- a/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Note.java
+++ b/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Note.java
@@ -1,121 +1,121 @@
-/*******************************************************************************
- * 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.odata2.jpa.processor.ref.model;
-
-import java.sql.Clob;
-import java.util.Calendar;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.IdClass;
-import javax.persistence.JoinColumn;
-import javax.persistence.Lob;
-import javax.persistence.ManyToOne;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-
-@Entity
-@IdClass(value = NoteKey.class)
-@Table(name = "T_NOTE")
-public class Note {
-
- public Note() {}
-
- public Note(final Calendar creationTime, final Calendar creationDate, final String createdBy,
- final Clob text) {
- super();
- this.creationTime = creationTime;
- this.creationDate = creationDate;
- this.createdBy = createdBy;
- this.text = text;
- }
-
- @Id
- @Temporal(TemporalType.TIME)
- private Calendar creationTime;
-
- @Id
- @Temporal(TemporalType.DATE)
- private Calendar creationDate;
-
- @Id
- private String createdBy;
-
- @Column
- @Lob
- private Clob text;
-
- @Column(name = "SO_ID")
- private long soId;
-
- @JoinColumn(name = "SO_ID", referencedColumnName = "SO_ID", insertable = false, updatable = false)
- @ManyToOne
- private SalesOrderHeader salesOrderHeader;
-
- public Calendar getCreationTime() {
- return creationTime;
- }
-
- public void setCreationTime(final Calendar creationTime) {
- this.creationTime = creationTime;
- }
-
- public Calendar getCreationDate() {
- return creationDate;
- }
-
- public void setCreationDate(final Calendar creationDate) {
- this.creationDate = creationDate;
- }
-
- public String getCreatedBy() {
- return createdBy;
- }
-
- public void setCreatedBy(final String createdBy) {
- this.createdBy = createdBy;
- }
-
- public Clob getText() {
- return text;
- }
-
- public void setText(final Clob text) {
- this.text = text;
- }
-
- public long getSoId() {
- return soId;
- }
-
- public void setSoId(final long soId) {
- this.soId = soId;
- }
-
- public SalesOrderHeader getSalesOrderHeader() {
- return salesOrderHeader;
- }
-
- public void setSalesOrderHeader(final SalesOrderHeader salesOrderHeader) {
- this.salesOrderHeader = salesOrderHeader;
- this.salesOrderHeader.getNotes().add(this);
- }
-}
+/*******************************************************************************
+ * 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.odata2.jpa.processor.ref.model;
+
+import java.sql.Clob;
+import java.util.Calendar;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.IdClass;
+import javax.persistence.JoinColumn;
+import javax.persistence.Lob;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
+
+@Entity
+@IdClass(value = NoteKey.class)
+@Table(name = "T_NOTE")
+public class Note {
+
+ public Note() {}
+
+ public Note(final Calendar creationTime, final Calendar creationDate, final String createdBy,
+ final Clob text) {
+ super();
+ this.creationTime = creationTime;
+ this.creationDate = creationDate;
+ this.createdBy = createdBy;
+ this.text = text;
+ }
+
+ @Id
+ @Temporal(TemporalType.TIME)
+ private Calendar creationTime;
+
+ @Id
+ @Temporal(TemporalType.DATE)
+ private Calendar creationDate;
+
+ @Id
+ private String createdBy;
+
+ @Column
+ @Lob
+ private Clob text;
+
+ @Column(name = "SO_ID")
+ private long soId;
+
+ @JoinColumn(name = "SO_ID", referencedColumnName = "SO_ID", insertable = false, updatable = false)
+ @ManyToOne
+ private SalesOrderHeader salesOrderHeader;
+
+ public Calendar getCreationTime() {
+ return creationTime;
+ }
+
+ public void setCreationTime(final Calendar creationTime) {
+ this.creationTime = creationTime;
+ }
+
+ public Calendar getCreationDate() {
+ return creationDate;
+ }
+
+ public void setCreationDate(final Calendar creationDate) {
+ this.creationDate = creationDate;
+ }
+
+ public String getCreatedBy() {
+ return createdBy;
+ }
+
+ public void setCreatedBy(final String createdBy) {
+ this.createdBy = createdBy;
+ }
+
+ public Clob getText() {
+ return text;
+ }
+
+ public void setText(final Clob text) {
+ this.text = text;
+ }
+
+ public long getSoId() {
+ return soId;
+ }
+
+ public void setSoId(final long soId) {
+ this.soId = soId;
+ }
+
+ public SalesOrderHeader getSalesOrderHeader() {
+ return salesOrderHeader;
+ }
+
+ public void setSalesOrderHeader(final SalesOrderHeader salesOrderHeader) {
+ this.salesOrderHeader = salesOrderHeader;
+ this.salesOrderHeader.getNotes().add(this);
+ }
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/b155bda5/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/NoteKey.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/NoteKey.java b/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/NoteKey.java
index 2585f97..8079d92 100644
--- a/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/NoteKey.java
+++ b/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/NoteKey.java
@@ -1,83 +1,83 @@
-/*******************************************************************************
- * 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.odata2.jpa.processor.ref.model;
-
-import java.io.Serializable;
-import java.util.Calendar;
-
-public class NoteKey implements Serializable {
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
- public Calendar getCreationTime() {
- return creationTime;
- }
-
- public void setCreationTime(final Calendar creationTime) {
- this.creationTime = creationTime;
- }
-
- public Calendar getCreationDate() {
- return creationDate;
- }
-
- public void setCreationDate(final Calendar creationDate) {
- this.creationDate = creationDate;
- }
-
- public String getCreatedBy() {
- return createdBy;
- }
-
- public void setCreatedBy(final String createdBy) {
- this.createdBy = createdBy;
- }
-
- @Override
- public int hashCode() {
- return creationTime.hashCode() + creationDate.hashCode() + createdBy.hashCode();
- }
-
- @Override
- public boolean equals(final Object obj) {
- if (obj instanceof Note) {
- Note note = (Note) obj;
-
- if (!note.getCreatedBy().equals(getCreatedBy())) {
- return false;
- }
- if (!note.getCreationDate().equals(getCreationDate())) {
- return false;
- }
- if (!note.getCreationTime().equals(getCreationTime())) {
- return false;
- }
- return true;
- }
- return false;
- }
-
- private Calendar creationTime;
- private Calendar creationDate;
- private String createdBy;
-
-}
+/*******************************************************************************
+ * 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.odata2.jpa.processor.ref.model;
+
+import java.io.Serializable;
+import java.util.Calendar;
+
+public class NoteKey implements Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+
+ public Calendar getCreationTime() {
+ return creationTime;
+ }
+
+ public void setCreationTime(final Calendar creationTime) {
+ this.creationTime = creationTime;
+ }
+
+ public Calendar getCreationDate() {
+ return creationDate;
+ }
+
+ public void setCreationDate(final Calendar creationDate) {
+ this.creationDate = creationDate;
+ }
+
+ public String getCreatedBy() {
+ return createdBy;
+ }
+
+ public void setCreatedBy(final String createdBy) {
+ this.createdBy = createdBy;
+ }
+
+ @Override
+ public int hashCode() {
+ return creationTime.hashCode() + creationDate.hashCode() + createdBy.hashCode();
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj instanceof Note) {
+ Note note = (Note) obj;
+
+ if (!note.getCreatedBy().equals(getCreatedBy())) {
+ return false;
+ }
+ if (!note.getCreationDate().equals(getCreationDate())) {
+ return false;
+ }
+ if (!note.getCreationTime().equals(getCreationTime())) {
+ return false;
+ }
+ return true;
+ }
+ return false;
+ }
+
+ private Calendar creationTime;
+ private Calendar creationDate;
+ private String createdBy;
+
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/b155bda5/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/SalesOrderItem.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/SalesOrderItem.java b/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/SalesOrderItem.java
index a819ff0..6da7a3c 100644
--- a/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/SalesOrderItem.java
+++ b/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/SalesOrderItem.java
@@ -1,135 +1,135 @@
-/*******************************************************************************
- * 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.odata2.jpa.processor.ref.model;
-
-import javax.persistence.Column;
-import javax.persistence.EmbeddedId;
-import javax.persistence.Entity;
-import javax.persistence.EntityListeners;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.Table;
-import javax.persistence.Transient;
-
-@Entity
-@Table(name = "T_SALESORDERITEM")
-@EntityListeners(org.apache.olingo.odata2.jpa.processor.ref.listeners.SalesOrderItemTombstoneListener.class)
-public class SalesOrderItem {
-
- public SalesOrderItem() {}
-
- public SalesOrderItem(final int quantity, final double amount,
- final double discount, final Material material) {
- super();
- this.quantity = quantity;
- this.amount = amount;
- this.discount = discount;
- this.material = material;
- }
-
- @EmbeddedId
- private SalesOrderItemKey salesOrderItemKey;
-
- @Column
- private int quantity;
-
- @Column
- private double amount;
-
- @Column
- private double discount;
-
- @Transient
- private double netAmount;
-
- @Column
- private boolean delivered;
-
- public Boolean isDelivered() {
- return delivered;
- }
-
- public void setDelivered(final Boolean deliveryStatus) {
- delivered = deliveryStatus;
- }
-
- @JoinColumn(name = "Material_Id")
- @ManyToOne
- private Material material;
-
- @JoinColumn(name = "Sales_Order_Id", referencedColumnName = "SO_ID", insertable = false, updatable = false)
- @ManyToOne
- private SalesOrderHeader salesOrderHeader;
-
- public SalesOrderItemKey getSalesOrderItemKey() {
- return salesOrderItemKey;
- }
-
- public void setSalesOrderItemKey(final SalesOrderItemKey salesOrderItemKey) {
- this.salesOrderItemKey = salesOrderItemKey;
- }
-
- public int getQuantity() {
- return quantity;
- }
-
- public void setQuantity(final int quantity) {
- this.quantity = quantity;
- }
-
- public double getAmount() {
- return amount;
- }
-
- public void setAmount(final double amount) {
- this.amount = amount;
- }
-
- public double getDiscount() {
- return discount;
- }
-
- public void setDiscount(final double discount) {
- this.discount = discount;
- }
-
- public double getNetAmount() {
- return netAmount;
- }
-
- public void setNetAmount(final double netAmount) {
- this.netAmount = netAmount;
- }
-
- public Material getMaterial() {
- return material;
- }
-
- public void setMaterial(final Material material) {
- this.material = material;
- }
-
- public SalesOrderHeader getSalesOrderHeader() {
- return salesOrderHeader;
- }
-
- public void setSalesOrderHeader(final SalesOrderHeader salesOrderHeader) {
- this.salesOrderHeader = salesOrderHeader;
- }
-}
+/*******************************************************************************
+ * 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.odata2.jpa.processor.ref.model;
+
+import javax.persistence.Column;
+import javax.persistence.EmbeddedId;
+import javax.persistence.Entity;
+import javax.persistence.EntityListeners;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+import javax.persistence.Transient;
+
+@Entity
+@Table(name = "T_SALESORDERITEM")
+@EntityListeners(org.apache.olingo.odata2.jpa.processor.ref.listeners.SalesOrderItemTombstoneListener.class)
+public class SalesOrderItem {
+
+ public SalesOrderItem() {}
+
+ public SalesOrderItem(final int quantity, final double amount,
+ final double discount, final Material material) {
+ super();
+ this.quantity = quantity;
+ this.amount = amount;
+ this.discount = discount;
+ this.material = material;
+ }
+
+ @EmbeddedId
+ private SalesOrderItemKey salesOrderItemKey;
+
+ @Column
+ private int quantity;
+
+ @Column
+ private double amount;
+
+ @Column
+ private double discount;
+
+ @Transient
+ private double netAmount;
+
+ @Column
+ private boolean delivered;
+
+ public Boolean isDelivered() {
+ return delivered;
+ }
+
+ public void setDelivered(final Boolean deliveryStatus) {
+ delivered = deliveryStatus;
+ }
+
+ @JoinColumn(name = "Material_Id")
+ @ManyToOne
+ private Material material;
+
+ @JoinColumn(name = "Sales_Order_Id", referencedColumnName = "SO_ID", insertable = false, updatable = false)
+ @ManyToOne
+ private SalesOrderHeader salesOrderHeader;
+
+ public SalesOrderItemKey getSalesOrderItemKey() {
+ return salesOrderItemKey;
+ }
+
+ public void setSalesOrderItemKey(final SalesOrderItemKey salesOrderItemKey) {
+ this.salesOrderItemKey = salesOrderItemKey;
+ }
+
+ public int getQuantity() {
+ return quantity;
+ }
+
+ public void setQuantity(final int quantity) {
+ this.quantity = quantity;
+ }
+
+ public double getAmount() {
+ return amount;
+ }
+
+ public void setAmount(final double amount) {
+ this.amount = amount;
+ }
+
+ public double getDiscount() {
+ return discount;
+ }
+
+ public void setDiscount(final double discount) {
+ this.discount = discount;
+ }
+
+ public double getNetAmount() {
+ return netAmount;
+ }
+
+ public void setNetAmount(final double netAmount) {
+ this.netAmount = netAmount;
+ }
+
+ public Material getMaterial() {
+ return material;
+ }
+
+ public void setMaterial(final Material material) {
+ this.material = material;
+ }
+
+ public SalesOrderHeader getSalesOrderHeader() {
+ return salesOrderHeader;
+ }
+
+ public void setSalesOrderHeader(final SalesOrderHeader salesOrderHeader) {
+ this.salesOrderHeader = salesOrderHeader;
+ }
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/b155bda5/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/SalesOrderItemKey.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/SalesOrderItemKey.java b/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/SalesOrderItemKey.java
index efc09d2..282259b 100644
--- a/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/SalesOrderItemKey.java
+++ b/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/SalesOrderItemKey.java
@@ -1,89 +1,89 @@
-/*******************************************************************************
- * 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.odata2.jpa.processor.ref.model;
-
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Embeddable;
-
-@Embeddable
-public class SalesOrderItemKey implements Serializable {
-
- private static final long serialVersionUID = 1L;
-
- public SalesOrderItemKey() {}
-
- public SalesOrderItemKey(final long liId) {
- super();
- this.liId = liId;
- }
-
- @Column(name = "Sales_Order_Id", nullable = false)
- private long soId;
-
- @Column(name = "Sales_Order_Item_Id", unique = true)
- private long liId;
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + (int) (liId ^ (liId >>> 32));
- result = prime * result + (int) (soId ^ (soId >>> 32));
- return result;
- }
-
- @Override
- public boolean equals(final Object obj) {
- if (this == obj) {
- return true;
- }
- if (obj == null) {
- return false;
- }
- if (getClass() != obj.getClass()) {
- return false;
- }
- SalesOrderItemKey other = (SalesOrderItemKey) obj;
- if (liId != other.liId) {
- return false;
- }
- if (soId != other.soId) {
- return false;
- }
- return true;
- }
-
- public long getSoId() {
- return soId;
- }
-
- public void setSoId(final long soId) {
- this.soId = soId;
- }
-
- public long getLiId() {
- return liId;
- }
-
- public void setLiId(final long liId) {
- this.liId = liId;
- }
-}
+/*******************************************************************************
+ * 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.odata2.jpa.processor.ref.model;
+
+import java.io.Serializable;
+
+import javax.persistence.Column;
+import javax.persistence.Embeddable;
+
+@Embeddable
+public class SalesOrderItemKey implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ public SalesOrderItemKey() {}
+
+ public SalesOrderItemKey(final long liId) {
+ super();
+ this.liId = liId;
+ }
+
+ @Column(name = "Sales_Order_Id", nullable = false)
+ private long soId;
+
+ @Column(name = "Sales_Order_Item_Id", unique = true)
+ private long liId;
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + (int) (liId ^ (liId >>> 32));
+ result = prime * result + (int) (soId ^ (soId >>> 32));
+ return result;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ SalesOrderItemKey other = (SalesOrderItemKey) obj;
+ if (liId != other.liId) {
+ return false;
+ }
+ if (soId != other.soId) {
+ return false;
+ }
+ return true;
+ }
+
+ public long getSoId() {
+ return soId;
+ }
+
+ public void setSoId(final long soId) {
+ this.soId = soId;
+ }
+
+ public long getLiId() {
+ return liId;
+ }
+
+ public void setLiId(final long liId) {
+ this.liId = liId;
+ }
+}
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/b155bda5/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Store.java
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Store.java b/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Store.java
index b88bc3a..e609dc2 100644
--- a/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Store.java
+++ b/odata2-jpa-processor/jpa-ref/src/main/java/org/apache/olingo/odata2/jpa/processor/ref/model/Store.java
@@ -1,92 +1,92 @@
-/*******************************************************************************
- * 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.odata2.jpa.processor.ref.model;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.persistence.Column;
-import javax.persistence.Embedded;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.ManyToMany;
-import javax.persistence.Table;
-
-@Entity
-@Table(name = "T_STORE")
-public class Store {
-
- public Store() {}
-
- public Store(final String storeName, final Address storeAddress) {
- super();
- this.storeName = storeName;
- this.storeAddress = storeAddress;
- }
-
- @Id
- @Column(name = "STORE_ID")
- private long storeId;
-
- @Column(name = "STORE_NAME", unique = true)
- private String storeName;
-
- @Embedded
- private Address storeAddress;
-
- @ManyToMany(mappedBy = "stores")
- private List<Material> materials = new ArrayList<Material>();
-
- public long getStoreId() {
- return storeId;
- }
-
- public void setStoreId(final long storeId) {
- this.storeId = storeId;
- }
-
- public String getStoreName() {
- return storeName;
- }
-
- public void setStoreName(final String storeName) {
- this.storeName = storeName;
- }
-
- public Address getStoreAddress() {
- return storeAddress;
- }
-
- public void setStoreAddress(final Address storeAddress) {
- this.storeAddress = storeAddress;
- }
-
- public List<Material> getMaterials() {
- return materials;
- }
-
- public void setMaterials(final List<Material> materials) {
- this.materials = materials;
- Iterator<Material> itr = materials.iterator();
- while (itr.hasNext()) {
- itr.next().getStores().add(this);
- }
- }
+/*******************************************************************************
+ * 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.odata2.jpa.processor.ref.model;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.persistence.Column;
+import javax.persistence.Embedded;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import javax.persistence.ManyToMany;
+import javax.persistence.Table;
+
+@Entity
+@Table(name = "T_STORE")
+public class Store {
+
+ public Store() {}
+
+ public Store(final String storeName, final Address storeAddress) {
+ super();
+ this.storeName = storeName;
+ this.storeAddress = storeAddress;
+ }
+
+ @Id
+ @Column(name = "STORE_ID")
+ private long storeId;
+
+ @Column(name = "STORE_NAME", unique = true)
+ private String storeName;
+
+ @Embedded
+ private Address storeAddress;
+
+ @ManyToMany(mappedBy = "stores")
+ private List<Material> materials = new ArrayList<Material>();
+
+ public long getStoreId() {
+ return storeId;
+ }
+
+ public void setStoreId(final long storeId) {
+ this.storeId = storeId;
+ }
+
+ public String getStoreName() {
+ return storeName;
+ }
+
+ public void setStoreName(final String storeName) {
+ this.storeName = storeName;
+ }
+
+ public Address getStoreAddress() {
+ return storeAddress;
+ }
+
+ public void setStoreAddress(final Address storeAddress) {
+ this.storeAddress = storeAddress;
+ }
+
+ public List<Material> getMaterials() {
+ return materials;
+ }
+
+ public void setMaterials(final List<Material> materials) {
+ this.materials = materials;
+ Iterator<Material> itr = materials.iterator();
+ while (itr.hasNext()) {
+ itr.next().getStores().add(this);
+ }
+ }
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/b155bda5/odata2-jpa-processor/jpa-ref/src/main/resources/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/odata2-jpa-processor/jpa-ref/src/main/resources/META-INF/persistence.xml b/odata2-jpa-processor/jpa-ref/src/main/resources/META-INF/persistence.xml
index 5bbfcf4..023aee1 100644
--- a/odata2-jpa-processor/jpa-ref/src/main/resources/META-INF/persistence.xml
+++ b/odata2-jpa-processor/jpa-ref/src/main/resources/META-INF/persistence.xml
@@ -1,44 +1,44 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- 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. -->
-<persistence version="2.0"
- xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
- <persistence-unit name="salesorderprocessing"
- transaction-type="RESOURCE_LOCAL">
- <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
- <class>org.apache.olingo.odata2.jpa.processor.ref.model.SalesOrderHeader</class>
- <class>org.apache.olingo.odata2.jpa.processor.ref.model.SalesOrderItem</class>
- <class>org.apache.olingo.odata2.jpa.processor.ref.model.Note</class>
- <class>org.apache.olingo.odata2.jpa.processor.ref.model.Store</class>
- <class>org.apache.olingo.odata2.jpa.processor.ref.model.Customer</class>
- <class>org.apache.olingo.odata2.jpa.processor.ref.model.Category</class>
- <class>org.apache.olingo.odata2.jpa.processor.ref.model.Material</class>
- <class>org.apache.olingo.odata2.jpa.processor.ref.model.AppointmentActivity</class>
- <class>org.apache.olingo.odata2.jpa.processor.ref.model.Activity</class>
- <class>org.apache.olingo.odata2.jpa.processor.ref.model.ActivityParty</class>
- <class>org.apache.olingo.odata2.jpa.processor.ref.converter.BlobToByteConverter</class>
- <properties>
- <property name="javax.persistence.jdbc.driver" value="org.hsqldb.jdbcDriver" />
- <property name="javax.persistence.jdbc.url"
- value="jdbc:hsqldb:mem:org.apache.olingo.jpa.sample" />
- <property name="javax.persistence.jdbc.user" value="sa" />
- <property name="javax.persistence.jdbc.password" value="" />
- <property name="eclipselink.target-database"
- value="org.eclipse.persistence.platform.database.HSQLPlatform" />
- <property name="eclipselink.logging.level" value="ALL" />
- <property name="eclipselink.orm.throw.exceptions" value="true" />
- <property name="eclipselink.ddl-generation" value="create-tables" />
- <property name="eclipselink.ddl-generation.output-mode"
- value="database" />
- </properties>
- </persistence-unit>
-</persistence>
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 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. -->
+<persistence version="2.0"
+ xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
+ <persistence-unit name="salesorderprocessing"
+ transaction-type="RESOURCE_LOCAL">
+ <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
+ <class>org.apache.olingo.odata2.jpa.processor.ref.model.SalesOrderHeader</class>
+ <class>org.apache.olingo.odata2.jpa.processor.ref.model.SalesOrderItem</class>
+ <class>org.apache.olingo.odata2.jpa.processor.ref.model.Note</class>
+ <class>org.apache.olingo.odata2.jpa.processor.ref.model.Store</class>
+ <class>org.apache.olingo.odata2.jpa.processor.ref.model.Customer</class>
+ <class>org.apache.olingo.odata2.jpa.processor.ref.model.Category</class>
+ <class>org.apache.olingo.odata2.jpa.processor.ref.model.Material</class>
+ <class>org.apache.olingo.odata2.jpa.processor.ref.model.AppointmentActivity</class>
+ <class>org.apache.olingo.odata2.jpa.processor.ref.model.Activity</class>
+ <class>org.apache.olingo.odata2.jpa.processor.ref.model.ActivityParty</class>
+ <class>org.apache.olingo.odata2.jpa.processor.ref.converter.BlobToByteConverter</class>
+ <properties>
+ <property name="javax.persistence.jdbc.driver" value="org.hsqldb.jdbcDriver" />
+ <property name="javax.persistence.jdbc.url"
+ value="jdbc:hsqldb:mem:org.apache.olingo.jpa.sample" />
+ <property name="javax.persistence.jdbc.user" value="sa" />
+ <property name="javax.persistence.jdbc.password" value="" />
+ <property name="eclipselink.target-database"
+ value="org.eclipse.persistence.platform.database.HSQLPlatform" />
+ <property name="eclipselink.logging.level" value="ALL" />
+ <property name="eclipselink.orm.throw.exceptions" value="true" />
+ <property name="eclipselink.ddl-generation" value="create-tables" />
+ <property name="eclipselink.ddl-generation.output-mode"
+ value="database" />
+ </properties>
+ </persistence-unit>
+</persistence>