From 8dc08e8c57331192a7e4ff05890dce629191138a Mon Sep 17 00:00:00 2001 From: dsoni Date: Tue, 13 Aug 2019 18:20:22 -0700 Subject: [PATCH] add floating property facet type --- .../apache/olingo/client/core/edm/xml/ClientCsdlParameter.java | 3 ++- .../apache/olingo/client/core/edm/xml/ClientCsdlProperty.java | 3 ++- .../olingo/client/core/edm/xml/ClientCsdlReturnType.java | 3 ++- .../org/apache/olingo/client/core/edm/xml/ClientCsdlTerm.java | 3 ++- .../olingo/client/core/edm/xml/ClientCsdlTypeDefinition.java | 3 ++- .../olingo/client/core/edm/xml/annotation/ClientCsdlCast.java | 3 ++- .../olingo/client/core/edm/xml/annotation/ClientCsdlIsOf.java | 3 ++- 7 files changed, 14 insertions(+), 7 deletions(-) diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientCsdlParameter.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientCsdlParameter.java index 1b8d05d56..c6e782e4e 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientCsdlParameter.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientCsdlParameter.java @@ -67,7 +67,8 @@ class ClientCsdlParameter extends CsdlParameter implements Serializable { parameter.setPrecision(Integer.valueOf(jp.nextTextValue())); } else if ("Scale".equals(jp.getCurrentName())) { final String scale = jp.nextTextValue(); - parameter.setScale("variable".equalsIgnoreCase(scale) ? 0 : Integer.valueOf(scale)); + parameter.setScale("variable".equalsIgnoreCase(scale) || "floating".equalsIgnoreCase(scale) ? + 0 : Integer.valueOf(scale)); } else if ("SRID".equals(jp.getCurrentName())) { final String srid = jp.nextTextValue(); if (srid != null) { diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientCsdlProperty.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientCsdlProperty.java index 86a87156c..4ac0c9a1d 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientCsdlProperty.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientCsdlProperty.java @@ -69,7 +69,8 @@ class ClientCsdlProperty extends CsdlProperty implements Serializable { property.setPrecision(Integer.valueOf(jp.nextTextValue())); } else if ("Scale".equals(jp.getCurrentName())) { final String scale = jp.nextTextValue(); - property.setScale("variable".equalsIgnoreCase(scale) ? 0 : Integer.valueOf(scale)); + property.setScale("variable".equalsIgnoreCase(scale) || "floating".equalsIgnoreCase(scale) ? + 0 : Integer.valueOf(scale)); } else if ("Unicode".equals(jp.getCurrentName())) { property.setUnicode(BooleanUtils.toBoolean(jp.nextTextValue())); } else if ("SRID".equals(jp.getCurrentName())) { diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientCsdlReturnType.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientCsdlReturnType.java index ceffc2336..d422ef27a 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientCsdlReturnType.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientCsdlReturnType.java @@ -64,7 +64,8 @@ class ClientCsdlReturnType extends CsdlReturnType implements Serializable { returnType.setPrecision(Integer.valueOf(jp.nextTextValue())); } else if ("Scale".equals(jp.getCurrentName())) { final String scale = jp.nextTextValue(); - returnType.setScale("variable".equalsIgnoreCase(scale) ? 0 : Integer.valueOf(scale)); + returnType.setScale("variable".equalsIgnoreCase(scale) || "floating".equalsIgnoreCase(scale) ? + 0 : Integer.valueOf(scale)); } else if ("SRID".equals(jp.getCurrentName())) { final String srid = jp.nextTextValue(); if (srid != null) { diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientCsdlTerm.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientCsdlTerm.java index df3dc3930..c89887db9 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientCsdlTerm.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientCsdlTerm.java @@ -64,7 +64,8 @@ class ClientCsdlTerm extends CsdlTerm implements Serializable { term.setPrecision(Integer.valueOf(jp.nextTextValue())); } else if ("Scale".equals(jp.getCurrentName())) { final String scale = jp.nextTextValue(); - term.setScale("variable".equalsIgnoreCase(scale) ? 0 : Integer.valueOf(scale)); + term.setScale("variable".equalsIgnoreCase(scale) || "floating".equalsIgnoreCase(scale) ? + 0 : Integer.valueOf(scale)); } else if ("SRID".equals(jp.getCurrentName())) { final String srid = jp.nextTextValue(); if (srid != null) { diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientCsdlTypeDefinition.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientCsdlTypeDefinition.java index ba271dae9..ef9ee665f 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientCsdlTypeDefinition.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/ClientCsdlTypeDefinition.java @@ -57,7 +57,8 @@ class ClientCsdlTypeDefinition extends CsdlTypeDefinition implements Serializabl typeDefinition.setPrecision(jp.nextIntValue(0)); } else if ("Scale".equals(jp.getCurrentName())) { final String scale = jp.nextTextValue(); - typeDefinition.setScale("variable".equalsIgnoreCase(scale) ? 0 : Integer.valueOf(scale)); + typeDefinition.setScale("variable".equalsIgnoreCase(scale) || "floating".equalsIgnoreCase(scale) ? + 0 : Integer.valueOf(scale)); } else if ("SRID".equals(jp.getCurrentName())) { final String srid = jp.nextTextValue(); if (srid != null) { diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientCsdlCast.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientCsdlCast.java index e62c48f2b..8a28af114 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientCsdlCast.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientCsdlCast.java @@ -56,7 +56,8 @@ class ClientCsdlCast extends CsdlCast implements Serializable { cast.setPrecision(Integer.valueOf(jp.nextTextValue())); } else if ("Scale".equals(jp.getCurrentName())) { final String scale = jp.nextTextValue(); - cast.setScale("variable".equalsIgnoreCase(scale) ? 0 : Integer.valueOf(scale)); + cast.setScale("variable".equalsIgnoreCase(scale) || "floating".equalsIgnoreCase(scale) ? + 0 : Integer.valueOf(scale)); } else if ("SRID".equals(jp.getCurrentName())) { final String srid = jp.nextTextValue(); if (srid != null) { diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientCsdlIsOf.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientCsdlIsOf.java index 0244c550b..bc7d784a1 100644 --- a/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientCsdlIsOf.java +++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/edm/xml/annotation/ClientCsdlIsOf.java @@ -55,7 +55,8 @@ class ClientCsdlIsOf extends CsdlIsOf implements Serializable { isof.setPrecision(Integer.valueOf(jp.nextTextValue())); } else if ("Scale".equals(jp.getCurrentName())) { final String scale = jp.nextTextValue(); - isof.setScale("variable".equalsIgnoreCase(scale) ? 0 : Integer.valueOf(scale)); + isof.setScale("variable".equalsIgnoreCase(scale) || "floating".equalsIgnoreCase(scale) ? + 0 : Integer.valueOf(scale)); } else if ("SRID".equals(jp.getCurrentName())) { final String srid = jp.nextTextValue(); if (srid != null) {