olingo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject [2/3] git commit: [OLINGO-467] Fixed EdmConcurrencyControl
Date Mon, 03 Nov 2014 12:26:39 GMT
[OLINGO-467] Fixed EdmConcurrencyControl


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

Branch: refs/heads/master
Commit: e56d1009f79ded7471353445d538dd5e294e7294
Parents: ffe5150
Author: Michael Bolz <michael.bolz@sap.com>
Authored: Mon Nov 3 09:38:47 2014 +0100
Committer: Michael Bolz <michael.bolz@sap.com>
Committed: Mon Nov 3 09:38:47 2014 +0100

----------------------------------------------------------------------
 .../annotation/processor/core/edm/AnnotationEdmProviderTest.java  | 3 +++
 .../olingo/odata2/annotation/processor/core/model/Room.java       | 1 +
 .../olingo/odata2/api/annotation/edm/EdmConcurrencyControl.java   | 2 +-
 3 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/e56d1009/odata2-annotation-processor/annotation-processor-core/src/test/java/org/apache/olingo/odata2/annotation/processor/core/edm/AnnotationEdmProviderTest.java
----------------------------------------------------------------------
diff --git a/odata2-annotation-processor/annotation-processor-core/src/test/java/org/apache/olingo/odata2/annotation/processor/core/edm/AnnotationEdmProviderTest.java
b/odata2-annotation-processor/annotation-processor-core/src/test/java/org/apache/olingo/odata2/annotation/processor/core/edm/AnnotationEdmProviderTest.java
index a067a19..bc78f6f 100644
--- a/odata2-annotation-processor/annotation-processor-core/src/test/java/org/apache/olingo/odata2/annotation/processor/core/edm/AnnotationEdmProviderTest.java
+++ b/odata2-annotation-processor/annotation-processor-core/src/test/java/org/apache/olingo/odata2/annotation/processor/core/edm/AnnotationEdmProviderTest.java
@@ -40,6 +40,7 @@ import org.apache.olingo.odata2.annotation.processor.core.model.Team;
 import org.apache.olingo.odata2.api.annotation.edm.EdmComplexType;
 import org.apache.olingo.odata2.api.annotation.edm.EdmEntitySet;
 import org.apache.olingo.odata2.api.annotation.edm.EdmEntityType;
+import org.apache.olingo.odata2.api.edm.EdmConcurrencyMode;
 import org.apache.olingo.odata2.api.edm.EdmMultiplicity;
 import org.apache.olingo.odata2.api.edm.FullQualifiedName;
 import org.apache.olingo.odata2.api.edm.provider.Association;
@@ -331,6 +332,7 @@ public class AnnotationEdmProviderTest {
     assertEquals("Employee", employee.getName());
     Property name = getProperty(employee, "EmployeeName");
     assertEquals(Integer.valueOf(20), name.getFacets().getMaxLength());
+    assertNull(name.getFacets().getConcurrencyMode());
     assertTrue(name.getFacets().isNullable());
     Property id = getProperty(employee, "EmployeeId");
     assertFalse(id.getFacets().isNullable());
@@ -343,6 +345,7 @@ public class AnnotationEdmProviderTest {
     Property version = getProperty(room, "Version");
     assertEquals(Integer.valueOf(0), version.getFacets().getScale());
     assertEquals(Integer.valueOf(0), version.getFacets().getPrecision());
+    assertEquals(EdmConcurrencyMode.Fixed, version.getFacets().getConcurrencyMode());
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/e56d1009/odata2-annotation-processor/annotation-processor-core/src/test/java/org/apache/olingo/odata2/annotation/processor/core/model/Room.java
----------------------------------------------------------------------
diff --git a/odata2-annotation-processor/annotation-processor-core/src/test/java/org/apache/olingo/odata2/annotation/processor/core/model/Room.java
b/odata2-annotation-processor/annotation-processor-core/src/test/java/org/apache/olingo/odata2/annotation/processor/core/model/Room.java
index 40f9202..f422ad7 100644
--- a/odata2-annotation-processor/annotation-processor-core/src/test/java/org/apache/olingo/odata2/annotation/processor/core/model/Room.java
+++ b/odata2-annotation-processor/annotation-processor-core/src/test/java/org/apache/olingo/odata2/annotation/processor/core/model/Room.java
@@ -35,6 +35,7 @@ public class Room extends RefBase {
   @EdmProperty
   private Integer seats;
   @EdmProperty(facets = @EdmFacets(scale = 0, precision = 0))
+  @EdmConcurrencyControl
   private Integer version;
   @EdmNavigationProperty(name = "nr_Building", association = "BuildingRooms")
   private Building building;

http://git-wip-us.apache.org/repos/asf/olingo-odata2/blob/e56d1009/odata2-lib/odata-annotation/src/main/java/org/apache/olingo/odata2/api/annotation/edm/EdmConcurrencyControl.java
----------------------------------------------------------------------
diff --git a/odata2-lib/odata-annotation/src/main/java/org/apache/olingo/odata2/api/annotation/edm/EdmConcurrencyControl.java
b/odata2-lib/odata-annotation/src/main/java/org/apache/olingo/odata2/api/annotation/edm/EdmConcurrencyControl.java
index 1761810..7b1fa51 100644
--- a/odata2-lib/odata-annotation/src/main/java/org/apache/olingo/odata2/api/annotation/edm/EdmConcurrencyControl.java
+++ b/odata2-lib/odata-annotation/src/main/java/org/apache/olingo/odata2/api/annotation/edm/EdmConcurrencyControl.java
@@ -31,5 +31,5 @@ import java.lang.annotation.Target;
  * = NONE</code>.
  */
 @Retention(RetentionPolicy.RUNTIME)
-@Target(ElementType.ANNOTATION_TYPE)
+@Target(ElementType.FIELD)
 public @interface EdmConcurrencyControl {}


Mime
View raw message