diff --git a/jre/pom.xml b/jre/pom.xml
index 11639b7..b558cb4 100644
--- a/jre/pom.xml
+++ b/jre/pom.xml
@@ -37,18 +37,48 @@ Licensed under the MIT License.
unit
27.0.1-jre
+ 2.9.9
1.10.19
3.11.0
+ 4.1.39.Final
+ 3.9.1
+ 1.7.28
+
+ com.fasterxml.jackson.core
+ jackson-databind
+ ${jackson.version}
+
+
com.google.guava
guava
${guava.version}
+
+ com.google.protobuf
+ protobuf-java
+ ${protobuf.version}
+ test
+
+
+
+ com.google.protobuf
+ protobuf-java-util
+ ${protobuf.version}
+ test
+
+
+
+ io.netty
+ netty-buffer
+ ${netty.version}
+
+
org.mockito
mockito-core
@@ -63,6 +93,12 @@ Licensed under the MIT License.
test
+
+ org.slf4j
+ slf4j-api
+ ${slf4j.version}
+
+
diff --git a/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/internal/Utf8StringJsonConverter.java b/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/internal/Utf8StringJsonConverter.java
deleted file mode 100644
index c13cd4e..0000000
--- a/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/internal/Utf8StringJsonConverter.java
+++ /dev/null
@@ -1,34 +0,0 @@
-//------------------------------------------------------------
-// Copyright (c) Microsoft Corporation. All rights reserved.
-//------------------------------------------------------------
-
-package azure.data.cosmos.serialization.hybridrow.internal;
-
-import Newtonsoft.Json.*;
-
-/**
- * Helper class for parsing from JSON.
- */
-public class Utf8StringJsonConverter extends JsonConverter {
- @Override
- public boolean getCanWrite() {
- return true;
- }
-
- @Override
- public boolean CanConvert(java.lang.Class objectType) {
- return objectType.isAssignableFrom(Utf8String.class);
- }
-
- @Override
- public Object ReadJson(JsonReader reader, java.lang.Class objectType, Object existingValue,
- JsonSerializer serializer) {
- Contract.Requires(reader.TokenType == JsonToken.String);
- return Utf8String.TranscodeUtf16((String)reader.Value);
- }
-
- @Override
- public void WriteJson(JsonWriter writer, Object value, JsonSerializer serializer) {
- writer.WriteValue(((Utf8String)value).toString());
- }
-}
\ No newline at end of file
diff --git a/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/ILayoutSpanReadable.java b/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/ILayoutSpanReadable.java
deleted file mode 100644
index fe0cf30..0000000
--- a/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/ILayoutSpanReadable.java
+++ /dev/null
@@ -1,26 +0,0 @@
-//------------------------------------------------------------
-// Copyright (c) Microsoft Corporation. All rights reserved.
-//------------------------------------------------------------
-
-package azure.data.cosmos.serialization.hybridrow.layouts;
-
-import azure.data.cosmos.serialization.hybridrow.Result;
-import azure.data.cosmos.serialization.hybridrow.RowBuffer;
-import azure.data.cosmos.serialization.hybridrow.RowCursor;
-
-/**
- * An optional interface that indicates a can also read using a
- * .
- *
- * The sub-element type to be written.
- */
-public interface ILayoutSpanReadable extends ILayoutType {
- Result ReadFixed(tangible.RefObject b, tangible.RefObject scope, LayoutColumn col,
- tangible.OutObject> value);
-
- Result ReadSparse(tangible.RefObject b, tangible.RefObject scope,
- tangible.OutObject> value);
-
- Result ReadVariable(tangible.RefObject b, tangible.RefObject scope, LayoutColumn col,
- tangible.OutObject> value);
-}
\ No newline at end of file
diff --git a/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/ILayoutUtf8SpanReadable.java b/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/ILayoutUtf8SpanReadable.java
deleted file mode 100644
index 59aca73..0000000
--- a/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/ILayoutUtf8SpanReadable.java
+++ /dev/null
@@ -1,23 +0,0 @@
-//------------------------------------------------------------
-// Copyright (c) Microsoft Corporation. All rights reserved.
-//------------------------------------------------------------
-
-package azure.data.cosmos.serialization.hybridrow.layouts;
-
-import azure.data.cosmos.serialization.hybridrow.Result;
-import azure.data.cosmos.serialization.hybridrow.RowBuffer;
-import azure.data.cosmos.serialization.hybridrow.RowCursor;
-
-/**
- * An optional interface that indicates a can also read using a
- * .
- */
-public interface ILayoutUtf8SpanReadable extends ILayoutType {
- Result ReadFixed(tangible.RefObject b, tangible.RefObject scope, LayoutColumn col,
- tangible.OutObject value);
-
- Result ReadSparse(tangible.RefObject b, tangible.RefObject scope, tangible.OutObject value);
-
- Result ReadVariable(tangible.RefObject b, tangible.RefObject scope, LayoutColumn col,
- tangible.OutObject value);
-}
\ No newline at end of file
diff --git a/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutDateTime.java b/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutDateTime.java
deleted file mode 100644
index 70ba623..0000000
--- a/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutDateTime.java
+++ /dev/null
@@ -1,88 +0,0 @@
-//------------------------------------------------------------
-// Copyright (c) Microsoft Corporation. All rights reserved.
-//------------------------------------------------------------
-
-package azure.data.cosmos.serialization.hybridrow.layouts;
-
-import azure.data.cosmos.serialization.hybridrow.Result;
-import azure.data.cosmos.serialization.hybridrow.RowBuffer;
-import azure.data.cosmos.serialization.hybridrow.RowCursor;
-
-import java.time.LocalDateTime;
-
-import static com.google.common.base.Preconditions.checkArgument;
-
-public final class LayoutDateTime extends LayoutType {
- public LayoutDateTime() {
- super(azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.DateTime, 8);
- }
-
- @Override
- public boolean getIsFixed() {
- return true;
- }
-
- @Override
- public String getName() {
- return "datetime";
- }
-
- @Override
- public Result ReadFixed(tangible.RefObject b, tangible.RefObject scope, LayoutColumn col,
- tangible.OutObject value) {
- checkArgument(scope.argValue.scopeType instanceof LayoutUDT);
- if (!b.argValue.ReadBit(scope.argValue.start, col.getNullBit().clone())) {
- value.argValue = LocalDateTime.MIN;
- return Result.NotFound;
- }
-
- value.argValue = b.argValue.ReadDateTime(scope.argValue.start + col.getOffset());
- return Result.Success;
- }
-
- @Override
- public Result ReadSparse(tangible.RefObject b, tangible.RefObject edit,
- tangible.OutObject value) {
- Result result = LayoutType.PrepareSparseRead(b, edit, this.LayoutCode);
- if (result != Result.Success) {
- value.argValue = LocalDateTime.MIN;
- return result;
- }
-
- value.argValue = b.argValue.ReadSparseDateTime(edit);
- return Result.Success;
- }
-
- @Override
- public Result WriteFixed(tangible.RefObject b, tangible.RefObject scope, LayoutColumn col,
- LocalDateTime value) {
- checkArgument(scope.argValue.scopeType instanceof LayoutUDT);
- if (scope.argValue.immutable) {
- return Result.InsufficientPermissions;
- }
-
- b.argValue.WriteDateTime(scope.argValue.start + col.getOffset(), value);
- b.argValue.SetBit(scope.argValue.start, col.getNullBit().clone());
- return Result.Success;
- }
-
- //C# TO JAVA CONVERTER NOTE: Java does not support optional parameters. Overloaded method(s) are created above:
- //ORIGINAL LINE: public override Result WriteSparse(ref RowBuffer b, ref RowCursor edit, DateTime value,
- // UpdateOptions options = UpdateOptions.Upsert)
- @Override
- public Result WriteSparse(tangible.RefObject b, tangible.RefObject edit,
- LocalDateTime value, UpdateOptions options) {
- Result result = LayoutType.PrepareSparseWrite(b, edit, this.getTypeArg().clone(), options);
- if (result != Result.Success) {
- return result;
- }
-
- b.argValue.WriteSparseDateTime(edit, value, options);
- return Result.Success;
- }
-
- @Override
- public Result WriteSparse(tangible.RefObject b, tangible.RefObject edit, DateTime value) {
- return WriteSparse(b, edit, value, UpdateOptions.Upsert);
- }
-}
\ No newline at end of file
diff --git a/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutDecimal.java b/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutDecimal.java
deleted file mode 100644
index 0257514..0000000
--- a/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutDecimal.java
+++ /dev/null
@@ -1,90 +0,0 @@
-//------------------------------------------------------------
-// Copyright (c) Microsoft Corporation. All rights reserved.
-//------------------------------------------------------------
-
-package azure.data.cosmos.serialization.hybridrow.layouts;
-
-import azure.data.cosmos.serialization.hybridrow.Result;
-import azure.data.cosmos.serialization.hybridrow.RowBuffer;
-import azure.data.cosmos.serialization.hybridrow.RowCursor;
-
-import java.math.BigDecimal;
-
-import static com.google.common.base.Preconditions.checkArgument;
-
-public final class LayoutDecimal extends LayoutType {
- public LayoutDecimal() {
- // TODO: C# TO JAVA CONVERTER: There is no Java equivalent to 'sizeof':
- super(azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.Decimal, sizeof(BigDecimal));
- }
-
- @Override
- public boolean getIsFixed() {
- return true;
- }
-
- @Override
- public String getName() {
- return "decimal";
- }
-
- @Override
- public Result ReadFixed(tangible.RefObject b, tangible.RefObject scope, LayoutColumn col,
- tangible.OutObject value) {
- checkArgument(scope.argValue.scopeType instanceof LayoutUDT);
- if (!b.argValue.ReadBit(scope.argValue.start, col.getNullBit().clone())) {
- value.argValue = new BigDecimal(0);
- return Result.NotFound;
- }
-
- value.argValue = b.argValue.ReadDecimal(scope.argValue.start + col.getOffset());
- return Result.Success;
- }
-
- @Override
- public Result ReadSparse(tangible.RefObject b, tangible.RefObject edit,
- tangible.OutObject value) {
- Result result = LayoutType.PrepareSparseRead(b, edit, this.LayoutCode);
- if (result != Result.Success) {
- value.argValue = new BigDecimal(0);
- return result;
- }
-
- value.argValue = b.argValue.ReadSparseDecimal(edit);
- return Result.Success;
- }
-
- @Override
- public Result WriteFixed(tangible.RefObject b, tangible.RefObject scope, LayoutColumn col,
- BigDecimal value) {
- checkArgument(scope.argValue.scopeType instanceof LayoutUDT);
- if (scope.argValue.immutable) {
- return Result.InsufficientPermissions;
- }
-
- b.argValue.WriteDecimal(scope.argValue.start + col.getOffset(), value);
- b.argValue.SetBit(scope.argValue.start, col.getNullBit().clone());
- return Result.Success;
- }
-
- //C# TO JAVA CONVERTER NOTE: Java does not support optional parameters. Overloaded method(s) are created above:
- //ORIGINAL LINE: public override Result WriteSparse(ref RowBuffer b, ref RowCursor edit, decimal value,
- // UpdateOptions options = UpdateOptions.Upsert)
- @Override
- public Result WriteSparse(tangible.RefObject b, tangible.RefObject edit, BigDecimal value,
- UpdateOptions options) {
- Result result = LayoutType.PrepareSparseWrite(b, edit, this.getTypeArg().clone(), options);
- if (result != Result.Success) {
- return result;
- }
-
- b.argValue.WriteSparseDecimal(edit, value, options);
- return Result.Success;
- }
-
- @Override
- public Result WriteSparse(tangible.RefObject b, tangible.RefObject edit,
- java.math.BigDecimal value) {
- return WriteSparse(b, edit, value, UpdateOptions.Upsert);
- }
-}
\ No newline at end of file
diff --git a/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutFloat128.java b/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutFloat128.java
deleted file mode 100644
index e7efb86..0000000
--- a/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutFloat128.java
+++ /dev/null
@@ -1,87 +0,0 @@
-//------------------------------------------------------------
-// Copyright (c) Microsoft Corporation. All rights reserved.
-//------------------------------------------------------------
-
-package azure.data.cosmos.serialization.hybridrow.layouts;
-
-import azure.data.cosmos.serialization.hybridrow.Float128;
-import azure.data.cosmos.serialization.hybridrow.Result;
-import azure.data.cosmos.serialization.hybridrow.RowBuffer;
-import azure.data.cosmos.serialization.hybridrow.RowCursor;
-
-import static com.google.common.base.Preconditions.checkArgument;
-
-public final class LayoutFloat128 extends LayoutType {
- public LayoutFloat128() {
- super(azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.Float128, HybridRow.Float128.Size);
- }
-
- @Override
- public boolean getIsFixed() {
- return true;
- }
-
- @Override
- public String getName() {
- return "float128";
- }
-
- @Override
- public Result ReadFixed(tangible.RefObject b, tangible.RefObject scope, LayoutColumn col,
- tangible.OutObject value) {
- checkArgument(scope.argValue.scopeType instanceof LayoutUDT);
- if (!b.argValue.ReadBit(scope.argValue.start, col.getNullBit().clone())) {
- value.argValue = null;
- return Result.NotFound;
- }
-
- value.argValue = b.argValue.ReadFloat128(scope.argValue.start + col.getOffset()).clone();
- return Result.Success;
- }
-
- @Override
- public Result ReadSparse(tangible.RefObject b, tangible.RefObject edit,
- tangible.OutObject value) {
- Result result = LayoutType.PrepareSparseRead(b, edit, this.LayoutCode);
- if (result != Result.Success) {
- value.argValue = null;
- return result;
- }
-
- value.argValue = b.argValue.ReadSparseFloat128(edit).clone();
- return Result.Success;
- }
-
- @Override
- public Result WriteFixed(tangible.RefObject b, tangible.RefObject scope, LayoutColumn col,
- Float128 value) {
- checkArgument(scope.argValue.scopeType instanceof LayoutUDT);
- if (scope.argValue.immutable) {
- return Result.InsufficientPermissions;
- }
-
- b.argValue.WriteFloat128(scope.argValue.start + col.getOffset(), value.clone());
- b.argValue.SetBit(scope.argValue.start, col.getNullBit().clone());
- return Result.Success;
- }
-
- //C# TO JAVA CONVERTER NOTE: Java does not support optional parameters. Overloaded method(s) are created above:
- //ORIGINAL LINE: public override Result WriteSparse(ref RowBuffer b, ref RowCursor edit, Float128 value,
- // UpdateOptions options = UpdateOptions.Upsert)
- @Override
- public Result WriteSparse(tangible.RefObject b, tangible.RefObject edit, Float128 value,
- UpdateOptions options) {
- Result result = LayoutType.PrepareSparseWrite(b, edit, this.getTypeArg().clone(), options);
- if (result != Result.Success) {
- return result;
- }
-
- b.argValue.WriteSparseFloat128(edit, value.clone(), options);
- return Result.Success;
- }
-
- @Override
- public Result WriteSparse(tangible.RefObject b, tangible.RefObject edit, Float128 value) {
- return WriteSparse(b, edit, value, UpdateOptions.Upsert);
- }
-}
\ No newline at end of file
diff --git a/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutFloat32.java b/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutFloat32.java
deleted file mode 100644
index ef072da..0000000
--- a/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutFloat32.java
+++ /dev/null
@@ -1,86 +0,0 @@
-//------------------------------------------------------------
-// Copyright (c) Microsoft Corporation. All rights reserved.
-//------------------------------------------------------------
-
-package azure.data.cosmos.serialization.hybridrow.layouts;
-
-import azure.data.cosmos.serialization.hybridrow.Result;
-import azure.data.cosmos.serialization.hybridrow.RowBuffer;
-import azure.data.cosmos.serialization.hybridrow.RowCursor;
-
-import static com.google.common.base.Preconditions.checkArgument;
-
-public final class LayoutFloat32 extends LayoutType {
- public LayoutFloat32() {
- super(azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.Float32, (Float.SIZE / Byte.SIZE));
- }
-
- @Override
- public boolean getIsFixed() {
- return true;
- }
-
- @Override
- public String getName() {
- return "float32";
- }
-
- @Override
- public Result ReadFixed(tangible.RefObject b, tangible.RefObject scope, LayoutColumn col,
- tangible.OutObject value) {
- checkArgument(scope.argValue.scopeType instanceof LayoutUDT);
- if (!b.argValue.ReadBit(scope.argValue.start, col.getNullBit().clone())) {
- value.argValue = 0;
- return Result.NotFound;
- }
-
- value.argValue = b.argValue.ReadFloat32(scope.argValue.start + col.getOffset());
- return Result.Success;
- }
-
- @Override
- public Result ReadSparse(tangible.RefObject b, tangible.RefObject edit,
- tangible.OutObject value) {
- Result result = LayoutType.PrepareSparseRead(b, edit, this.LayoutCode);
- if (result != Result.Success) {
- value.argValue = 0;
- return result;
- }
-
- value.argValue = b.argValue.ReadSparseFloat32(edit);
- return Result.Success;
- }
-
- @Override
- public Result WriteFixed(tangible.RefObject b, tangible.RefObject scope, LayoutColumn col,
- float value) {
- checkArgument(scope.argValue.scopeType instanceof LayoutUDT);
- if (scope.argValue.immutable) {
- return Result.InsufficientPermissions;
- }
-
- b.argValue.WriteFloat32(scope.argValue.start + col.getOffset(), value);
- b.argValue.SetBit(scope.argValue.start, col.getNullBit().clone());
- return Result.Success;
- }
-
- //C# TO JAVA CONVERTER NOTE: Java does not support optional parameters. Overloaded method(s) are created above:
- //ORIGINAL LINE: public override Result WriteSparse(ref RowBuffer b, ref RowCursor edit, float value,
- // UpdateOptions options = UpdateOptions.Upsert)
- @Override
- public Result WriteSparse(tangible.RefObject b, tangible.RefObject edit, float value,
- UpdateOptions options) {
- Result result = LayoutType.PrepareSparseWrite(b, edit, this.getTypeArg().clone(), options);
- if (result != Result.Success) {
- return result;
- }
-
- b.argValue.WriteSparseFloat32(edit, value, options);
- return Result.Success;
- }
-
- @Override
- public Result WriteSparse(tangible.RefObject b, tangible.RefObject edit, float value) {
- return WriteSparse(b, edit, value, UpdateOptions.Upsert);
- }
-}
\ No newline at end of file
diff --git a/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutFloat64.java b/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutFloat64.java
deleted file mode 100644
index efb898b..0000000
--- a/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutFloat64.java
+++ /dev/null
@@ -1,86 +0,0 @@
-//------------------------------------------------------------
-// Copyright (c) Microsoft Corporation. All rights reserved.
-//------------------------------------------------------------
-
-package azure.data.cosmos.serialization.hybridrow.layouts;
-
-import azure.data.cosmos.serialization.hybridrow.Result;
-import azure.data.cosmos.serialization.hybridrow.RowBuffer;
-import azure.data.cosmos.serialization.hybridrow.RowCursor;
-
-import static com.google.common.base.Preconditions.checkArgument;
-
-public final class LayoutFloat64 extends LayoutType {
- public LayoutFloat64() {
- super(azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.Float64, (Double.SIZE / Byte.SIZE));
- }
-
- @Override
- public boolean getIsFixed() {
- return true;
- }
-
- @Override
- public String getName() {
- return "float64";
- }
-
- @Override
- public Result ReadFixed(tangible.RefObject b, tangible.RefObject scope, LayoutColumn col,
- tangible.OutObject value) {
- checkArgument(scope.argValue.scopeType instanceof LayoutUDT);
- if (!b.argValue.ReadBit(scope.argValue.start, col.getNullBit().clone())) {
- value.argValue = 0;
- return Result.NotFound;
- }
-
- value.argValue = b.argValue.ReadFloat64(scope.argValue.start + col.getOffset());
- return Result.Success;
- }
-
- @Override
- public Result ReadSparse(tangible.RefObject b, tangible.RefObject edit,
- tangible.OutObject value) {
- Result result = LayoutType.PrepareSparseRead(b, edit, this.LayoutCode);
- if (result != Result.Success) {
- value.argValue = 0;
- return result;
- }
-
- value.argValue = b.argValue.ReadSparseFloat64(edit);
- return Result.Success;
- }
-
- @Override
- public Result WriteFixed(tangible.RefObject b, tangible.RefObject scope, LayoutColumn col,
- double value) {
- checkArgument(scope.argValue.scopeType instanceof LayoutUDT);
- if (scope.argValue.immutable) {
- return Result.InsufficientPermissions;
- }
-
- b.argValue.WriteFloat64(scope.argValue.start + col.getOffset(), value);
- b.argValue.SetBit(scope.argValue.start, col.getNullBit().clone());
- return Result.Success;
- }
-
- //C# TO JAVA CONVERTER NOTE: Java does not support optional parameters. Overloaded method(s) are created above:
- //ORIGINAL LINE: public override Result WriteSparse(ref RowBuffer b, ref RowCursor edit, double value,
- // UpdateOptions options = UpdateOptions.Upsert)
- @Override
- public Result WriteSparse(tangible.RefObject b, tangible.RefObject edit, double value,
- UpdateOptions options) {
- Result result = LayoutType.PrepareSparseWrite(b, edit, this.getTypeArg().clone(), options);
- if (result != Result.Success) {
- return result;
- }
-
- b.argValue.WriteSparseFloat64(edit, value, options);
- return Result.Success;
- }
-
- @Override
- public Result WriteSparse(tangible.RefObject b, tangible.RefObject edit, double value) {
- return WriteSparse(b, edit, value, UpdateOptions.Upsert);
- }
-}
\ No newline at end of file
diff --git a/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutGuid.java b/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutGuid.java
deleted file mode 100644
index 8e3e2f8..0000000
--- a/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutGuid.java
+++ /dev/null
@@ -1,89 +0,0 @@
-//------------------------------------------------------------
-// Copyright (c) Microsoft Corporation. All rights reserved.
-//------------------------------------------------------------
-
-package azure.data.cosmos.serialization.hybridrow.layouts;
-
-import azure.data.cosmos.serialization.hybridrow.Result;
-import azure.data.cosmos.serialization.hybridrow.RowBuffer;
-import azure.data.cosmos.serialization.hybridrow.RowCursor;
-
-import java.util.UUID;
-
-import static com.google.common.base.Preconditions.checkArgument;
-
-public final class LayoutGuid extends LayoutType {
- public LayoutGuid() {
- super(azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.Guid, 16);
- }
-
- @Override
- public boolean getIsFixed() {
- return true;
- }
-
- @Override
- public String getName() {
- return "guid";
- }
-
- @Override
- public Result ReadFixed(tangible.RefObject b, tangible.RefObject scope, LayoutColumn col,
- tangible.OutObject value) {
- checkArgument(scope.argValue.scopeType instanceof LayoutUDT);
- if (!b.argValue.ReadBit(scope.argValue.start, col.getNullBit().clone())) {
- value.argValue = null;
- return Result.NotFound;
- }
-
- value.argValue = b.argValue.ReadGuid(scope.argValue.start + col.getOffset());
- return Result.Success;
- }
-
- @Override
- public Result ReadSparse(tangible.RefObject b, tangible.RefObject edit,
- tangible.OutObject value) {
- Result result = LayoutType.PrepareSparseRead(b, edit, this.LayoutCode);
- if (result != Result.Success) {
- value.argValue = null;
- return result;
- }
-
- value.argValue = b.argValue.ReadSparseGuid(edit);
- return Result.Success;
- }
-
- @Override
- public Result WriteFixed(tangible.RefObject b, tangible.RefObject scope, LayoutColumn col,
- UUID value) {
- checkArgument(scope.argValue.scopeType instanceof LayoutUDT);
- if (scope.argValue.immutable) {
- return Result.InsufficientPermissions;
- }
-
- b.argValue.WriteGuid(scope.argValue.start + col.getOffset(), value);
- b.argValue.SetBit(scope.argValue.start, col.getNullBit().clone());
- return Result.Success;
- }
-
- //C# TO JAVA CONVERTER NOTE: Java does not support optional parameters. Overloaded method(s) are created above:
- //ORIGINAL LINE: public override Result WriteSparse(ref RowBuffer b, ref RowCursor edit, Guid value,
- // UpdateOptions options = UpdateOptions.Upsert)
- @Override
- public Result WriteSparse(tangible.RefObject b, tangible.RefObject edit, UUID value,
- UpdateOptions options) {
- Result result = LayoutType.PrepareSparseWrite(b, edit, this.getTypeArg().clone(), options);
- if (result != Result.Success) {
- return result;
- }
-
- b.argValue.WriteSparseGuid(edit, value, options);
- return Result.Success;
- }
-
- @Override
- public Result WriteSparse(tangible.RefObject b, tangible.RefObject edit,
- java.util.UUID value) {
- return WriteSparse(b, edit, value, UpdateOptions.Upsert);
- }
-}
\ No newline at end of file
diff --git a/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutIndexedScope.java b/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutIndexedScope.java
deleted file mode 100644
index a0d7b1b..0000000
--- a/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutIndexedScope.java
+++ /dev/null
@@ -1,26 +0,0 @@
-//------------------------------------------------------------
-// Copyright (c) Microsoft Corporation. All rights reserved.
-//------------------------------------------------------------
-
-package azure.data.cosmos.serialization.hybridrow.layouts;
-
-import azure.data.cosmos.serialization.hybridrow.RowBuffer;
-import azure.data.cosmos.serialization.hybridrow.RowCursor;
-
-public abstract class LayoutIndexedScope extends LayoutScope {
- protected LayoutIndexedScope(LayoutCode code, boolean immutable, boolean isSizedScope, boolean isFixedArity,
- boolean isUniqueScope, boolean isTypedScope) {
- // TODO: C# TO JAVA CONVERTER: C# to Java Converter could not resolve the named parameters in the
- // following line:
- //ORIGINAL LINE: base(code, immutable, isSizedScope, isIndexedScope: true, isFixedArity: isFixedArity,
- // isUniqueScope: isUniqueScope, isTypedScope: isTypedScope);
- super(code, immutable, isSizedScope, isIndexedScope:true, isFixedArity:isFixedArity, isUniqueScope:
- isUniqueScope, isTypedScope:isTypedScope)
- }
-
- @Override
- public void ReadSparsePath(tangible.RefObject row, tangible.RefObject edit) {
- edit.argValue.pathToken = 0;
- edit.argValue.pathOffset = 0;
- }
-}
\ No newline at end of file
diff --git a/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutInt16.java b/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutInt16.java
deleted file mode 100644
index 2a83dde..0000000
--- a/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutInt16.java
+++ /dev/null
@@ -1,86 +0,0 @@
-//------------------------------------------------------------
-// Copyright (c) Microsoft Corporation. All rights reserved.
-//------------------------------------------------------------
-
-package azure.data.cosmos.serialization.hybridrow.layouts;
-
-import azure.data.cosmos.serialization.hybridrow.Result;
-import azure.data.cosmos.serialization.hybridrow.RowBuffer;
-import azure.data.cosmos.serialization.hybridrow.RowCursor;
-
-import static com.google.common.base.Preconditions.checkArgument;
-
-public final class LayoutInt16 extends LayoutType {
- public LayoutInt16() {
- super(azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.Int16, (Short.SIZE / Byte.SIZE));
- }
-
- @Override
- public boolean getIsFixed() {
- return true;
- }
-
- @Override
- public String getName() {
- return "int16";
- }
-
- @Override
- public Result ReadFixed(tangible.RefObject b, tangible.RefObject scope, LayoutColumn col,
- tangible.OutObject value) {
- checkArgument(scope.argValue.scopeType instanceof LayoutUDT);
- if (!b.argValue.ReadBit(scope.argValue.start, col.getNullBit().clone())) {
- value.argValue = 0;
- return Result.NotFound;
- }
-
- value.argValue = b.argValue.ReadInt16(scope.argValue.start + col.getOffset());
- return Result.Success;
- }
-
- @Override
- public Result ReadSparse(tangible.RefObject b, tangible.RefObject edit,
- tangible.OutObject value) {
- Result result = LayoutType.PrepareSparseRead(b, edit, this.LayoutCode);
- if (result != Result.Success) {
- value.argValue = 0;
- return result;
- }
-
- value.argValue = b.argValue.ReadSparseInt16(edit);
- return Result.Success;
- }
-
- @Override
- public Result WriteFixed(tangible.RefObject b, tangible.RefObject scope, LayoutColumn col,
- short value) {
- checkArgument(scope.argValue.scopeType instanceof LayoutUDT);
- if (scope.argValue.immutable) {
- return Result.InsufficientPermissions;
- }
-
- b.argValue.WriteInt16(scope.argValue.start + col.getOffset(), value);
- b.argValue.SetBit(scope.argValue.start, col.getNullBit().clone());
- return Result.Success;
- }
-
- //C# TO JAVA CONVERTER NOTE: Java does not support optional parameters. Overloaded method(s) are created above:
- //ORIGINAL LINE: public override Result WriteSparse(ref RowBuffer b, ref RowCursor edit, short value,
- // UpdateOptions options = UpdateOptions.Upsert)
- @Override
- public Result WriteSparse(tangible.RefObject b, tangible.RefObject edit, short value,
- UpdateOptions options) {
- Result result = LayoutType.PrepareSparseWrite(b, edit, this.getTypeArg().clone(), options);
- if (result != Result.Success) {
- return result;
- }
-
- b.argValue.WriteSparseInt16(edit, value, options);
- return Result.Success;
- }
-
- @Override
- public Result WriteSparse(tangible.RefObject b, tangible.RefObject edit, short value) {
- return WriteSparse(b, edit, value, UpdateOptions.Upsert);
- }
-}
\ No newline at end of file
diff --git a/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutInt32.java b/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutInt32.java
deleted file mode 100644
index 720351c..0000000
--- a/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutInt32.java
+++ /dev/null
@@ -1,86 +0,0 @@
-//------------------------------------------------------------
-// Copyright (c) Microsoft Corporation. All rights reserved.
-//------------------------------------------------------------
-
-package azure.data.cosmos.serialization.hybridrow.layouts;
-
-import azure.data.cosmos.serialization.hybridrow.Result;
-import azure.data.cosmos.serialization.hybridrow.RowBuffer;
-import azure.data.cosmos.serialization.hybridrow.RowCursor;
-
-import static com.google.common.base.Preconditions.checkArgument;
-
-public final class LayoutInt32 extends LayoutType {
- public LayoutInt32() {
- super(azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.Int32, (Integer.SIZE / Byte.SIZE));
- }
-
- @Override
- public boolean getIsFixed() {
- return true;
- }
-
- @Override
- public String getName() {
- return "int32";
- }
-
- @Override
- public Result ReadFixed(tangible.RefObject b, tangible.RefObject scope, LayoutColumn col,
- tangible.OutObject value) {
- checkArgument(scope.argValue.scopeType instanceof LayoutUDT);
- if (!b.argValue.ReadBit(scope.argValue.start, col.getNullBit().clone())) {
- value.argValue = 0;
- return Result.NotFound;
- }
-
- value.argValue = b.argValue.ReadInt32(scope.argValue.start + col.getOffset());
- return Result.Success;
- }
-
- @Override
- public Result ReadSparse(tangible.RefObject b, tangible.RefObject edit,
- tangible.OutObject value) {
- Result result = LayoutType.PrepareSparseRead(b, edit, this.LayoutCode);
- if (result != Result.Success) {
- value.argValue = 0;
- return result;
- }
-
- value.argValue = b.argValue.ReadSparseInt32(edit);
- return Result.Success;
- }
-
- @Override
- public Result WriteFixed(tangible.RefObject b, tangible.RefObject scope, LayoutColumn col,
- int value) {
- checkArgument(scope.argValue.scopeType instanceof LayoutUDT);
- if (scope.argValue.immutable) {
- return Result.InsufficientPermissions;
- }
-
- b.argValue.WriteInt32(scope.argValue.start + col.getOffset(), value);
- b.argValue.SetBit(scope.argValue.start, col.getNullBit().clone());
- return Result.Success;
- }
-
- //C# TO JAVA CONVERTER NOTE: Java does not support optional parameters. Overloaded method(s) are created above:
- //ORIGINAL LINE: public override Result WriteSparse(ref RowBuffer b, ref RowCursor edit, int value, UpdateOptions
- // options = UpdateOptions.Upsert)
- @Override
- public Result WriteSparse(tangible.RefObject b, tangible.RefObject edit, int value,
- UpdateOptions options) {
- Result result = LayoutType.PrepareSparseWrite(b, edit, this.getTypeArg().clone(), options);
- if (result != Result.Success) {
- return result;
- }
-
- b.argValue.WriteSparseInt32(edit, value, options);
- return Result.Success;
- }
-
- @Override
- public Result WriteSparse(tangible.RefObject b, tangible.RefObject edit, int value) {
- return WriteSparse(b, edit, value, UpdateOptions.Upsert);
- }
-}
\ No newline at end of file
diff --git a/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutInt64.java b/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutInt64.java
deleted file mode 100644
index ad37b2e..0000000
--- a/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutInt64.java
+++ /dev/null
@@ -1,86 +0,0 @@
-//------------------------------------------------------------
-// Copyright (c) Microsoft Corporation. All rights reserved.
-//------------------------------------------------------------
-
-package azure.data.cosmos.serialization.hybridrow.layouts;
-
-import azure.data.cosmos.serialization.hybridrow.Result;
-import azure.data.cosmos.serialization.hybridrow.RowBuffer;
-import azure.data.cosmos.serialization.hybridrow.RowCursor;
-
-import static com.google.common.base.Preconditions.checkArgument;
-
-public final class LayoutInt64 extends LayoutType {
- public LayoutInt64() {
- super(azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.Int64, (Long.SIZE / Byte.SIZE));
- }
-
- @Override
- public boolean getIsFixed() {
- return true;
- }
-
- @Override
- public String getName() {
- return "int64";
- }
-
- @Override
- public Result ReadFixed(tangible.RefObject b, tangible.RefObject scope, LayoutColumn col,
- tangible.OutObject value) {
- checkArgument(scope.argValue.scopeType instanceof LayoutUDT);
- if (!b.argValue.ReadBit(scope.argValue.start, col.getNullBit().clone())) {
- value.argValue = 0;
- return Result.NotFound;
- }
-
- value.argValue = b.argValue.ReadInt64(scope.argValue.start + col.getOffset());
- return Result.Success;
- }
-
- @Override
- public Result ReadSparse(tangible.RefObject b, tangible.RefObject edit,
- tangible.OutObject value) {
- Result result = LayoutType.PrepareSparseRead(b, edit, this.LayoutCode);
- if (result != Result.Success) {
- value.argValue = 0;
- return result;
- }
-
- value.argValue = b.argValue.ReadSparseInt64(edit);
- return Result.Success;
- }
-
- @Override
- public Result WriteFixed(tangible.RefObject b, tangible.RefObject scope, LayoutColumn col,
- long value) {
- checkArgument(scope.argValue.scopeType instanceof LayoutUDT);
- if (scope.argValue.immutable) {
- return Result.InsufficientPermissions;
- }
-
- b.argValue.WriteInt64(scope.argValue.start + col.getOffset(), value);
- b.argValue.SetBit(scope.argValue.start, col.getNullBit().clone());
- return Result.Success;
- }
-
- //C# TO JAVA CONVERTER NOTE: Java does not support optional parameters. Overloaded method(s) are created above:
- //ORIGINAL LINE: public override Result WriteSparse(ref RowBuffer b, ref RowCursor edit, long value,
- // UpdateOptions options = UpdateOptions.Upsert)
- @Override
- public Result WriteSparse(tangible.RefObject b, tangible.RefObject edit, long value,
- UpdateOptions options) {
- Result result = LayoutType.PrepareSparseWrite(b, edit, this.getTypeArg().clone(), options);
- if (result != Result.Success) {
- return result;
- }
-
- b.argValue.WriteSparseInt64(edit, value, options);
- return Result.Success;
- }
-
- @Override
- public Result WriteSparse(tangible.RefObject b, tangible.RefObject edit, long value) {
- return WriteSparse(b, edit, value, UpdateOptions.Upsert);
- }
-}
\ No newline at end of file
diff --git a/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutInt8.java b/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutInt8.java
deleted file mode 100644
index 8734212..0000000
--- a/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutInt8.java
+++ /dev/null
@@ -1,86 +0,0 @@
-//------------------------------------------------------------
-// Copyright (c) Microsoft Corporation. All rights reserved.
-//------------------------------------------------------------
-
-package azure.data.cosmos.serialization.hybridrow.layouts;
-
-import azure.data.cosmos.serialization.hybridrow.Result;
-import azure.data.cosmos.serialization.hybridrow.RowBuffer;
-import azure.data.cosmos.serialization.hybridrow.RowCursor;
-
-import static com.google.common.base.Preconditions.checkArgument;
-
-public final class LayoutInt8 extends LayoutType {
- public LayoutInt8() {
- super(azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.Int8, (Byte.SIZE / Byte.SIZE));
- }
-
- @Override
- public boolean getIsFixed() {
- return true;
- }
-
- @Override
- public String getName() {
- return "int8";
- }
-
- @Override
- public Result ReadFixed(tangible.RefObject b, tangible.RefObject scope, LayoutColumn col,
- tangible.OutObject value) {
- checkArgument(scope.argValue.scopeType instanceof LayoutUDT);
- if (!b.argValue.ReadBit(scope.argValue.start, col.getNullBit().clone())) {
- value.argValue = 0;
- return Result.NotFound;
- }
-
- value.argValue = b.argValue.ReadInt8(scope.argValue.start + col.getOffset());
- return Result.Success;
- }
-
- @Override
- public Result ReadSparse(tangible.RefObject b, tangible.RefObject edit,
- tangible.OutObject value) {
- Result result = LayoutType.PrepareSparseRead(b, edit, this.LayoutCode);
- if (result != Result.Success) {
- value.argValue = 0;
- return result;
- }
-
- value.argValue = b.argValue.ReadSparseInt8(edit);
- return Result.Success;
- }
-
- @Override
- public Result WriteFixed(tangible.RefObject b, tangible.RefObject scope, LayoutColumn col,
- byte value) {
- checkArgument(scope.argValue.scopeType instanceof LayoutUDT);
- if (scope.argValue.immutable) {
- return Result.InsufficientPermissions;
- }
-
- b.argValue.WriteInt8(scope.argValue.start + col.getOffset(), value);
- b.argValue.SetBit(scope.argValue.start, col.getNullBit().clone());
- return Result.Success;
- }
-
- //C# TO JAVA CONVERTER NOTE: Java does not support optional parameters. Overloaded method(s) are created above:
- //ORIGINAL LINE: public override Result WriteSparse(ref RowBuffer b, ref RowCursor edit, sbyte value,
- // UpdateOptions options = UpdateOptions.Upsert)
- @Override
- public Result WriteSparse(tangible.RefObject b, tangible.RefObject edit, byte value,
- UpdateOptions options) {
- Result result = LayoutType.PrepareSparseWrite(b, edit, this.getTypeArg().clone(), options);
- if (result != Result.Success) {
- return result;
- }
-
- b.argValue.WriteSparseInt8(edit, value, options);
- return Result.Success;
- }
-
- @Override
- public Result WriteSparse(tangible.RefObject b, tangible.RefObject edit, byte value) {
- return WriteSparse(b, edit, value, UpdateOptions.Upsert);
- }
-}
\ No newline at end of file
diff --git a/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutMongoDbObjectId.java b/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutMongoDbObjectId.java
deleted file mode 100644
index 6163e84..0000000
--- a/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutMongoDbObjectId.java
+++ /dev/null
@@ -1,88 +0,0 @@
-//------------------------------------------------------------
-// Copyright (c) Microsoft Corporation. All rights reserved.
-//------------------------------------------------------------
-
-package azure.data.cosmos.serialization.hybridrow.layouts;
-
-import azure.data.cosmos.serialization.hybridrow.Result;
-import azure.data.cosmos.serialization.hybridrow.RowBuffer;
-import azure.data.cosmos.serialization.hybridrow.RowCursor;
-
-import static com.google.common.base.Preconditions.checkArgument;
-
-public final class LayoutMongoDbObjectId extends LayoutType {
- public LayoutMongoDbObjectId() {
- super(azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.MongoDbObjectId, Microsoft.Azure.Cosmos.Serialization.HybridRow.MongoDbObjectId.Size);
- }
-
- @Override
- public boolean getIsFixed() {
- return true;
- }
-
- // ReSharper disable once StringLiteralTypo
- @Override
- public String getName() {
- return "mongodbobjectid";
- }
-
- @Override
- public Result ReadFixed(tangible.RefObject b, tangible.RefObject scope, LayoutColumn col,
- tangible.OutObject value) {
- checkArgument(scope.argValue.scopeType instanceof LayoutUDT);
- if (!b.argValue.ReadBit(scope.argValue.start, col.getNullBit().clone())) {
- value.argValue = null;
- return Result.NotFound;
- }
-
- value.argValue = b.argValue.ReadMongoDbObjectId(scope.argValue.start + col.getOffset()).clone();
- return Result.Success;
- }
-
- @Override
- public Result ReadSparse(tangible.RefObject b, tangible.RefObject edit,
- tangible.OutObject value) {
- Result result = LayoutType.PrepareSparseRead(b, edit, this.LayoutCode);
- if (result != Result.Success) {
- value.argValue = null;
- return result;
- }
-
- value.argValue = b.argValue.ReadSparseMongoDbObjectId(edit).clone();
- return Result.Success;
- }
-
- @Override
- public Result WriteFixed(tangible.RefObject b, tangible.RefObject scope, LayoutColumn col,
- MongoDbObjectId value) {
- checkArgument(scope.argValue.scopeType instanceof LayoutUDT);
- if (scope.argValue.immutable) {
- return Result.InsufficientPermissions;
- }
-
- b.argValue.WriteMongoDbObjectId(scope.argValue.start + col.getOffset(), value.clone());
- b.argValue.SetBit(scope.argValue.start, col.getNullBit().clone());
- return Result.Success;
- }
-
- //C# TO JAVA CONVERTER NOTE: Java does not support optional parameters. Overloaded method(s) are created above:
- //ORIGINAL LINE: public override Result WriteSparse(ref RowBuffer b, ref RowCursor edit, MongoDbObjectId value,
- // UpdateOptions options = UpdateOptions.Upsert)
- @Override
- public Result WriteSparse(tangible.RefObject b, tangible.RefObject edit,
- MongoDbObjectId value, UpdateOptions options) {
- Result result = LayoutType.PrepareSparseWrite(b, edit, this.getTypeArg().clone(), options);
- if (result != Result.Success) {
- return result;
- }
-
- b.argValue.WriteSparseMongoDbObjectId(edit, value.clone(), options);
- return Result.Success;
- }
-
- @Override
- public Result WriteSparse(tangible.RefObject b, tangible.RefObject edit,
- MongoDbObjectId value) {
- return WriteSparse(b, edit, value, UpdateOptions.Upsert);
- }
-}
\ No newline at end of file
diff --git a/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutNull.java b/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutNull.java
deleted file mode 100644
index 7c8d5c4..0000000
--- a/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutNull.java
+++ /dev/null
@@ -1,90 +0,0 @@
-//------------------------------------------------------------
-// Copyright (c) Microsoft Corporation. All rights reserved.
-//------------------------------------------------------------
-
-package azure.data.cosmos.serialization.hybridrow.layouts;
-
-import azure.data.cosmos.serialization.hybridrow.NullValue;
-import azure.data.cosmos.serialization.hybridrow.Result;
-import azure.data.cosmos.serialization.hybridrow.RowBuffer;
-import azure.data.cosmos.serialization.hybridrow.RowCursor;
-
-import static com.google.common.base.Preconditions.checkArgument;
-
-public final class LayoutNull extends LayoutType {
- public LayoutNull() {
- super(azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.Null, 0);
- }
-
- @Override
- public boolean getIsFixed() {
- return true;
- }
-
- @Override
- public boolean getIsNull() {
- return true;
- }
-
- @Override
- public String getName() {
- return "null";
- }
-
- @Override
- public Result ReadFixed(tangible.RefObject b, tangible.RefObject scope, LayoutColumn col,
- tangible.OutObject value) {
- checkArgument(scope.argValue.scopeType instanceof LayoutUDT);
- value.argValue = NullValue.Default;
- if (!b.argValue.ReadBit(scope.argValue.start, col.getNullBit().clone())) {
- return Result.NotFound;
- }
-
- return Result.Success;
- }
-
- @Override
- public Result ReadSparse(tangible.RefObject b, tangible.RefObject edit,
- tangible.OutObject value) {
- Result result = LayoutType.PrepareSparseRead(b, edit, this.LayoutCode);
- if (result != Result.Success) {
- value.argValue = null;
- return result;
- }
-
- value.argValue = b.argValue.ReadSparseNull(edit).clone();
- return Result.Success;
- }
-
- @Override
- public Result WriteFixed(tangible.RefObject b, tangible.RefObject scope, LayoutColumn col,
- NullValue value) {
- checkArgument(scope.argValue.scopeType instanceof LayoutUDT);
- if (scope.argValue.immutable) {
- return Result.InsufficientPermissions;
- }
-
- b.argValue.SetBit(scope.argValue.start, col.getNullBit().clone());
- return Result.Success;
- }
-
- //C# TO JAVA CONVERTER NOTE: Java does not support optional parameters. Overloaded method(s) are created above:
- //ORIGINAL LINE: public override Result WriteSparse(ref RowBuffer b, ref RowCursor edit, NullValue value,
- // UpdateOptions options = UpdateOptions.Upsert)
- @Override
- public Result WriteSparse(tangible.RefObject b, tangible.RefObject edit, NullValue value,
- UpdateOptions options) {
- Result result = LayoutType.PrepareSparseWrite(b, edit, this.getTypeArg().clone(), options);
- if (result != Result.Success) {
- return result;
- }
-
- b.argValue.WriteSparseNull(edit, value.clone(), options);
- return Result.Success;
- }
-
- @Override
- public Result WriteSparse(tangible.RefObject b, tangible.RefObject edit, NullValue value) {
- return WriteSparse(b, edit, value, UpdateOptions.Upsert);
- }
-}
\ No newline at end of file
diff --git a/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutNullable.java b/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutNullable.java
deleted file mode 100644
index 4b7e14b..0000000
--- a/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutNullable.java
+++ /dev/null
@@ -1,106 +0,0 @@
-//------------------------------------------------------------
-// Copyright (c) Microsoft Corporation. All rights reserved.
-//------------------------------------------------------------
-
-package azure.data.cosmos.serialization.hybridrow.layouts;
-
-import azure.data.cosmos.serialization.hybridrow.Result;
-import azure.data.cosmos.serialization.hybridrow.RowBuffer;
-import azure.data.cosmos.serialization.hybridrow.RowCursor;
-
-import static azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.ImmutableNullableScope;
-import static azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.NullableScope;
-import static com.google.common.base.Preconditions.checkArgument;
-import static com.google.common.base.Preconditions.checkState;
-
-public final class LayoutNullable extends LayoutIndexedScope {
- public LayoutNullable(boolean immutable) {
- super(immutable ? ImmutableNullableScope : NullableScope, immutable, true, true, false, true);
- }
-
- @Override
- public String getName() {
- return this.Immutable ? "im_nullable" : "nullable";
- }
-
- @Override
- public int CountTypeArgument(TypeArgumentList value) {
- checkState(value.getCount() == 1);
- return (azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.SIZE / Byte.SIZE) + value.get(0).getType().CountTypeArgument(value.get(0).getTypeArgs().clone());
- }
-
- @Override
- public boolean HasImplicitTypeCode(tangible.RefObject edit) {
- checkState(edit.argValue.index >= 0);
- checkState(edit.argValue.scopeTypeArgs.getCount() == 1);
- checkState(edit.argValue.index == 1);
- return !LayoutCodeTraits.AlwaysRequiresTypeCode(edit.argValue.scopeTypeArgs.get(0).getType().LayoutCode);
- }
-
- public static Result HasValue(tangible.RefObject b, tangible.RefObject scope) {
- checkArgument(scope.argValue.scopeType instanceof LayoutNullable);
- checkState(scope.argValue.index == 1 || scope.argValue.index == 2, "Nullable scopes always point at the value");
- checkState(scope.argValue.scopeTypeArgs.getCount() == 1);
- boolean hasValue = b.argValue.ReadInt8(scope.argValue.start) != 0;
- return hasValue ? Result.Success : Result.NotFound;
- }
-
- @Override
- public TypeArgumentList ReadTypeArgumentList(tangible.RefObject row, int offset,
- tangible.OutObject lenInBytes) {
- return new TypeArgumentList(new azure.data.cosmos.serialization.hybridrow.layouts.TypeArgument[] { LayoutType.ReadTypeArgument(row, offset, lenInBytes) });
- }
-
- @Override
- public void SetImplicitTypeCode(tangible.RefObject edit) {
- checkState(edit.argValue.index == 1);
- edit.argValue.cellType = edit.argValue.scopeTypeArgs.get(0).getType();
- edit.argValue.cellTypeArgs = edit.argValue.scopeTypeArgs.get(0).getTypeArgs().clone();
- }
-
- public Result WriteScope(tangible.RefObject b, tangible.RefObject edit,
- TypeArgumentList typeArgs, boolean hasValue, tangible.OutObject value) {
- return WriteScope(b, edit, typeArgs, hasValue, value, UpdateOptions.Upsert);
- }
-
- //C# TO JAVA CONVERTER NOTE: Java does not support optional parameters. Overloaded method(s) are created above:
- //ORIGINAL LINE: public Result WriteScope(ref RowBuffer b, ref RowCursor edit, TypeArgumentList typeArgs, bool
- // hasValue, out RowCursor value, UpdateOptions options = UpdateOptions.Upsert)
- public Result WriteScope(tangible.RefObject b, tangible.RefObject edit,
- TypeArgumentList typeArgs, boolean hasValue, tangible.OutObject value,
- UpdateOptions options) {
- Result result = LayoutType.PrepareSparseWrite(b, edit, new TypeArgument(this, typeArgs.clone()), options);
- if (result != Result.Success) {
- value.argValue = null;
- return result;
- }
-
- b.argValue.WriteNullable(edit, this, typeArgs.clone(), options, hasValue, value.clone());
- return Result.Success;
- }
-
- @Override
- public Result WriteScope(tangible.RefObject b, tangible.RefObject edit,
- TypeArgumentList typeArgs, tangible.OutObject value) {
- return WriteScope(b, edit, typeArgs, value, UpdateOptions.Upsert);
- }
-
- //C# TO JAVA CONVERTER NOTE: Java does not support optional parameters. Overloaded method(s) are created above:
- //ORIGINAL LINE: public override Result WriteScope(ref RowBuffer b, ref RowCursor edit, TypeArgumentList
- // typeArgs, out RowCursor value, UpdateOptions options = UpdateOptions.Upsert)
- @Override
- public Result WriteScope(tangible.RefObject b, tangible.RefObject edit,
- TypeArgumentList typeArgs, tangible.OutObject value, UpdateOptions options) {
- return this.WriteScope(b, edit, typeArgs.clone(), true, value, options);
- }
-
- @Override
- public int WriteTypeArgument(tangible.RefObject row, int offset, TypeArgumentList value) {
- checkState(value.getCount() == 1);
- row.argValue.WriteSparseTypeCode(offset, this.LayoutCode);
- int lenInBytes = (azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.SIZE / Byte.SIZE);
- lenInBytes += value.get(0).getType().WriteTypeArgument(row, offset + lenInBytes,
- value.get(0).getTypeArgs().clone());
- return lenInBytes;
- }
-}
\ No newline at end of file
diff --git a/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutTagged.java b/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutTagged.java
deleted file mode 100644
index eaa6175..0000000
--- a/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutTagged.java
+++ /dev/null
@@ -1,83 +0,0 @@
-//------------------------------------------------------------
-// Copyright (c) Microsoft Corporation. All rights reserved.
-//------------------------------------------------------------
-
-package azure.data.cosmos.serialization.hybridrow.layouts;
-
-import azure.data.cosmos.serialization.hybridrow.Result;
-import azure.data.cosmos.serialization.hybridrow.RowBuffer;
-import azure.data.cosmos.serialization.hybridrow.RowCursor;
-
-import static azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.ImmutableTaggedScope;
-import static azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.TaggedScope;
-
-public final class LayoutTagged extends LayoutIndexedScope {
- public LayoutTagged(boolean immutable) {
- super(immutable ? ImmutableTaggedScope : TaggedScope, immutable, true, true, false, true);
- }
-
- @Override
- public String getName() {
- return this.Immutable ? "im_tagged_t" : "tagged_t";
- }
-
- @Override
- public int CountTypeArgument(TypeArgumentList value) {
- checkState(value.getCount() == 2);
- return (azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.SIZE / Byte.SIZE) + value.get(1).getType().CountTypeArgument(value.get(1).getTypeArgs().clone());
- }
-
- @Override
- public boolean HasImplicitTypeCode(tangible.RefObject edit) {
- Contract.Assert(edit.argValue.index >= 0);
- Contract.Assert(edit.argValue.scopeTypeArgs.getCount() > edit.argValue.index);
- return !LayoutCodeTraits.AlwaysRequiresTypeCode(edit.argValue.scopeTypeArgs.get(edit.argValue.index).getType().LayoutCode);
- }
-
- @Override
- public TypeArgumentList ReadTypeArgumentList(tangible.RefObject row, int offset,
- tangible.OutObject lenInBytes) {
- TypeArgument[] retval = new TypeArgument[2];
- retval[0] = new TypeArgument(LayoutType.UInt8, TypeArgumentList.Empty);
- retval[1] = LayoutType.ReadTypeArgument(row, offset, lenInBytes);
- return new TypeArgumentList(retval);
- }
-
- @Override
- public void SetImplicitTypeCode(tangible.RefObject edit) {
- edit.argValue.cellType = edit.argValue.scopeTypeArgs.get(edit.argValue.index).getType();
- edit.argValue.cellTypeArgs = edit.argValue.scopeTypeArgs.get(edit.argValue.index).getTypeArgs().clone();
- }
-
- @Override
- public Result WriteScope(tangible.RefObject b, tangible.RefObject edit,
- TypeArgumentList typeArgs, tangible.OutObject value) {
- return WriteScope(b, edit, typeArgs, value, UpdateOptions.Upsert);
- }
-
- //C# TO JAVA CONVERTER NOTE: Java does not support optional parameters. Overloaded method(s) are created above:
- //ORIGINAL LINE: public override Result WriteScope(ref RowBuffer b, ref RowCursor edit, TypeArgumentList
- // typeArgs, out RowCursor value, UpdateOptions options = UpdateOptions.Upsert)
- @Override
- public Result WriteScope(tangible.RefObject b, tangible.RefObject edit,
- TypeArgumentList typeArgs, tangible.OutObject value, UpdateOptions options) {
- Result result = LayoutType.PrepareSparseWrite(b, edit, new TypeArgument(this, typeArgs.clone()), options);
- if (result != Result.Success) {
- value.argValue = null;
- return result;
- }
-
- b.argValue.WriteTypedTuple(edit, this, typeArgs.clone(), options, value.clone());
- return Result.Success;
- }
-
- @Override
- public int WriteTypeArgument(tangible.RefObject row, int offset, TypeArgumentList value) {
- Contract.Assert(value.getCount() == 2);
- row.argValue.WriteSparseTypeCode(offset, this.LayoutCode);
- int lenInBytes = (azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.SIZE / Byte.SIZE);
- lenInBytes += value.get(1).getType().WriteTypeArgument(row, offset + lenInBytes,
- value.get(1).getTypeArgs().clone());
- return lenInBytes;
- }
-}
\ No newline at end of file
diff --git a/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutTagged2.java b/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutTagged2.java
deleted file mode 100644
index cd07dee..0000000
--- a/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutTagged2.java
+++ /dev/null
@@ -1,98 +0,0 @@
-//------------------------------------------------------------
-// Copyright (c) Microsoft Corporation. All rights reserved.
-//------------------------------------------------------------
-
-package azure.data.cosmos.serialization.hybridrow.layouts;
-
-import azure.data.cosmos.serialization.hybridrow.Result;
-import azure.data.cosmos.serialization.hybridrow.RowBuffer;
-import azure.data.cosmos.serialization.hybridrow.RowCursor;
-
-public final class LayoutTagged2 extends LayoutIndexedScope {
- public LayoutTagged2(boolean immutable) {
- super(immutable ? azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.ImmutableTagged2Scope : azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.Tagged2Scope, immutable, isSizedScope:
- true, isFixedArity:true, isUniqueScope:false, isTypedScope:true)
- }
-
- @Override
- public String getName() {
- return this.Immutable ? "im_tagged2_t" : "tagged2_t";
- }
-
- @Override
- public int CountTypeArgument(TypeArgumentList value) {
- checkState(value.getCount() == 3);
- int lenInBytes = (azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.SIZE / Byte.SIZE);
- for (int i = 1; i < value.getCount(); i++) {
- TypeArgument arg = value.get(i).clone();
- lenInBytes += arg.getType().CountTypeArgument(arg.getTypeArgs().clone());
- }
-
- return lenInBytes;
- }
-
- @Override
- public boolean HasImplicitTypeCode(tangible.RefObject edit) {
- checkState(edit.argValue.index >= 0);
- checkState(edit.argValue.scopeTypeArgs.getCount() > edit.argValue.index);
- return !LayoutCodeTraits.AlwaysRequiresTypeCode(edit.argValue.scopeTypeArgs.get(edit.argValue.index).getType().LayoutCode);
- }
-
- @Override
- public TypeArgumentList ReadTypeArgumentList(tangible.RefObject row, int offset,
- tangible.OutObject lenInBytes) {
- lenInBytes.argValue = 0;
- TypeArgument[] retval = new TypeArgument[3];
- retval[0] = new TypeArgument(LayoutType.UInt8, TypeArgumentList.Empty);
- for (int i = 1; i < 3; i++) {
- int itemLenInBytes;
- tangible.OutObject tempOut_itemLenInBytes = new tangible.OutObject();
- retval[i] = LayoutType.ReadTypeArgument(row, offset + lenInBytes.argValue, tempOut_itemLenInBytes);
- itemLenInBytes = tempOut_itemLenInBytes.argValue;
- lenInBytes.argValue += itemLenInBytes;
- }
-
- return new TypeArgumentList(retval);
- }
-
- @Override
- public void SetImplicitTypeCode(tangible.RefObject edit) {
- edit.argValue.cellType = edit.argValue.scopeTypeArgs.get(edit.argValue.index).getType();
- edit.argValue.cellTypeArgs = edit.argValue.scopeTypeArgs.get(edit.argValue.index).getTypeArgs().clone();
- }
-
- @Override
- public Result WriteScope(tangible.RefObject b, tangible.RefObject edit,
- TypeArgumentList typeArgs, tangible.OutObject value) {
- return WriteScope(b, edit, typeArgs, value, UpdateOptions.Upsert);
- }
-
- //C# TO JAVA CONVERTER NOTE: Java does not support optional parameters. Overloaded method(s) are created above:
- //ORIGINAL LINE: public override Result WriteScope(ref RowBuffer b, ref RowCursor edit, TypeArgumentList
- // typeArgs, out RowCursor value, UpdateOptions options = UpdateOptions.Upsert)
- @Override
- public Result WriteScope(tangible.RefObject b, tangible.RefObject edit,
- TypeArgumentList typeArgs, tangible.OutObject value, UpdateOptions options) {
- Result result = LayoutType.PrepareSparseWrite(b, edit, new TypeArgument(this, typeArgs.clone()), options);
- if (result != Result.Success) {
- value.argValue = null;
- return result;
- }
-
- b.argValue.WriteTypedTuple(edit, this, typeArgs.clone(), options, value.clone());
- return Result.Success;
- }
-
- @Override
- public int WriteTypeArgument(tangible.RefObject row, int offset, TypeArgumentList value) {
- checkState(value.getCount() == 3);
- row.argValue.WriteSparseTypeCode(offset, this.LayoutCode);
- int lenInBytes = (azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.SIZE / Byte.SIZE);
- for (int i = 1; i < value.getCount(); i++) {
- TypeArgument arg = value.get(i).clone();
- lenInBytes += arg.getType().WriteTypeArgument(row, offset + lenInBytes, arg.getTypeArgs().clone());
- }
-
- return lenInBytes;
- }
-}
\ No newline at end of file
diff --git a/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutTuple.java b/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutTuple.java
deleted file mode 100644
index 46e5070..0000000
--- a/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutTuple.java
+++ /dev/null
@@ -1,86 +0,0 @@
-//------------------------------------------------------------
-// Copyright (c) Microsoft Corporation. All rights reserved.
-//------------------------------------------------------------
-
-package azure.data.cosmos.serialization.hybridrow.layouts;
-
-import azure.data.cosmos.serialization.hybridrow.Result;
-import azure.data.cosmos.serialization.hybridrow.RowBuffer;
-import azure.data.cosmos.serialization.hybridrow.RowCursor;
-
-public final class LayoutTuple extends LayoutIndexedScope {
- public LayoutTuple(boolean immutable) {
- super(immutable ? azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.ImmutableTupleScope : azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.TupleScope, immutable, isSizedScope:
- false, isFixedArity:true, isUniqueScope:false, isTypedScope:false)
- }
-
- @Override
- public String getName() {
- return this.Immutable ? "im_tuple" : "tuple";
- }
-
- @Override
- public int CountTypeArgument(TypeArgumentList value) {
- int lenInBytes = (azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.SIZE / Byte.SIZE);
- //C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
- //ORIGINAL LINE: lenInBytes += RowBuffer.Count7BitEncodedUInt((ulong)value.Count);
- lenInBytes += RowBuffer.Count7BitEncodedUInt(value.getCount());
- for (TypeArgument arg : value) {
- lenInBytes += arg.getType().CountTypeArgument(arg.getTypeArgs().clone());
- }
-
- return lenInBytes;
- }
-
- @Override
- public TypeArgumentList ReadTypeArgumentList(tangible.RefObject row, int offset,
- tangible.OutObject lenInBytes) {
- int numTypeArgs = row.argValue.intValue().Read7BitEncodedUInt(offset, lenInBytes);
- TypeArgument[] retval = new TypeArgument[numTypeArgs];
- for (int i = 0; i < numTypeArgs; i++) {
- int itemLenInBytes;
- tangible.OutObject tempOut_itemLenInBytes = new tangible.OutObject();
- retval[i] = LayoutType.ReadTypeArgument(row, offset + lenInBytes.argValue, tempOut_itemLenInBytes);
- itemLenInBytes = tempOut_itemLenInBytes.argValue;
- lenInBytes.argValue += itemLenInBytes;
- }
-
- return new TypeArgumentList(retval);
- }
-
- @Override
- public Result WriteScope(tangible.RefObject b, tangible.RefObject edit,
- TypeArgumentList typeArgs, tangible.OutObject value) {
- return WriteScope(b, edit, typeArgs, value, UpdateOptions.Upsert);
- }
-
- //C# TO JAVA CONVERTER NOTE: Java does not support optional parameters. Overloaded method(s) are created above:
- //ORIGINAL LINE: public override Result WriteScope(ref RowBuffer b, ref RowCursor edit, TypeArgumentList
- // typeArgs, out RowCursor value, UpdateOptions options = UpdateOptions.Upsert)
- @Override
- public Result WriteScope(tangible.RefObject b, tangible.RefObject edit,
- TypeArgumentList typeArgs, tangible.OutObject value, UpdateOptions options) {
- Result result = LayoutType.PrepareSparseWrite(b, edit, new TypeArgument(this, typeArgs.clone()), options);
- if (result != Result.Success) {
- value.argValue = null;
- return result;
- }
-
- b.argValue.WriteSparseTuple(edit, this, typeArgs.clone(), options, value.clone());
- return Result.Success;
- }
-
- @Override
- public int WriteTypeArgument(tangible.RefObject row, int offset, TypeArgumentList value) {
- row.argValue.WriteSparseTypeCode(offset, this.LayoutCode);
- int lenInBytes = (azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.SIZE / Byte.SIZE);
- //C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
- //ORIGINAL LINE: lenInBytes += row.Write7BitEncodedUInt(offset + lenInBytes, (ulong)value.Count);
- lenInBytes += row.argValue.Write7BitEncodedUInt(offset + lenInBytes, value.getCount());
- for (TypeArgument arg : value) {
- lenInBytes += arg.getType().WriteTypeArgument(row, offset + lenInBytes, arg.getTypeArgs().clone());
- }
-
- return lenInBytes;
- }
-}
\ No newline at end of file
diff --git a/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutTypedArray.java b/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutTypedArray.java
deleted file mode 100644
index fb6a336..0000000
--- a/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutTypedArray.java
+++ /dev/null
@@ -1,81 +0,0 @@
-//------------------------------------------------------------
-// Copyright (c) Microsoft Corporation. All rights reserved.
-//------------------------------------------------------------
-
-package azure.data.cosmos.serialization.hybridrow.layouts;
-
-import azure.data.cosmos.serialization.hybridrow.Result;
-import azure.data.cosmos.serialization.hybridrow.RowBuffer;
-import azure.data.cosmos.serialization.hybridrow.RowCursor;
-
-import static azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.ImmutableTypedArrayScope;
-import static azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.SIZE;
-import static azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.TypedArrayScope;
-
-public final class LayoutTypedArray extends LayoutIndexedScope {
- public LayoutTypedArray(boolean immutable) {
- super(immutable ? ImmutableTypedArrayScope : TypedArrayScope, immutable, true, false, false, true);
- }
-
- @Override
- public String getName() {
- return this.Immutable ? "im_array_t" : "array_t";
- }
-
- @Override
- public int CountTypeArgument(TypeArgumentList value) {
- checkState(value.getCount() == 1);
- return (SIZE / Byte.SIZE) + value.get(0).getType().CountTypeArgument(value.get(0).getTypeArgs().clone());
- }
-
- @Override
- public boolean HasImplicitTypeCode(tangible.RefObject edit) {
- checkState(edit.argValue.index >= 0);
- checkState(edit.argValue.scopeTypeArgs.getCount() == 1);
- return !LayoutCodeTraits.AlwaysRequiresTypeCode(edit.argValue.scopeTypeArgs.get(0).getType().LayoutCode);
- }
-
- @Override
- public TypeArgumentList ReadTypeArgumentList(tangible.RefObject row, int offset,
- tangible.OutObject lenInBytes) {
- return new TypeArgumentList(new azure.data.cosmos.serialization.hybridrow.layouts.TypeArgument[] { LayoutType.ReadTypeArgument(row, offset, lenInBytes) });
- }
-
- @Override
- public void SetImplicitTypeCode(tangible.RefObject edit) {
- edit.argValue.cellType = edit.argValue.scopeTypeArgs.get(0).getType();
- edit.argValue.cellTypeArgs = edit.argValue.scopeTypeArgs.get(0).getTypeArgs().clone();
- }
-
- @Override
- public Result WriteScope(tangible.RefObject b, tangible.RefObject edit,
- TypeArgumentList typeArgs, tangible.OutObject value) {
- return WriteScope(b, edit, typeArgs, value, UpdateOptions.Upsert);
- }
-
- //C# TO JAVA CONVERTER NOTE: Java does not support optional parameters. Overloaded method(s) are created above:
- //ORIGINAL LINE: public override Result WriteScope(ref RowBuffer b, ref RowCursor edit, TypeArgumentList
- // typeArgs, out RowCursor value, UpdateOptions options = UpdateOptions.Upsert)
- @Override
- public Result WriteScope(tangible.RefObject b, tangible.RefObject edit,
- TypeArgumentList typeArgs, tangible.OutObject value, UpdateOptions options) {
- Result result = LayoutType.PrepareSparseWrite(b, edit, new TypeArgument(this, typeArgs.clone()), options);
- if (result != Result.Success) {
- value.argValue = null;
- return result;
- }
-
- b.argValue.WriteTypedArray(edit, this, typeArgs.clone(), options, value.clone());
- return Result.Success;
- }
-
- @Override
- public int WriteTypeArgument(tangible.RefObject row, int offset, TypeArgumentList value) {
- checkState(value.getCount() == 1);
- row.argValue.WriteSparseTypeCode(offset, this.LayoutCode);
- int lenInBytes = (SIZE / Byte.SIZE);
- lenInBytes += value.get(0).getType().WriteTypeArgument(row, offset + lenInBytes,
- value.get(0).getTypeArgs().clone());
- return lenInBytes;
- }
-}
\ No newline at end of file
diff --git a/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutTypedMap.java b/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutTypedMap.java
deleted file mode 100644
index cc78a97..0000000
--- a/jre/src/main/java/azure/data/cosmos/serialization/hybridrow/layouts/LayoutTypedMap.java
+++ /dev/null
@@ -1,100 +0,0 @@
-//------------------------------------------------------------
-// Copyright (c) Microsoft Corporation. All rights reserved.
-//------------------------------------------------------------
-
-package azure.data.cosmos.serialization.hybridrow.layouts;
-
-import azure.data.cosmos.serialization.hybridrow.Result;
-import azure.data.cosmos.serialization.hybridrow.RowBuffer;
-import azure.data.cosmos.serialization.hybridrow.RowCursor;
-
-public final class LayoutTypedMap extends LayoutUniqueScope {
- public LayoutTypedMap(boolean immutable) {
- super(immutable ? azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.ImmutableTypedMapScope : azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.TypedMapScope, immutable, isSizedScope:
- true, isTypedScope:true)
- }
-
- @Override
- public String getName() {
- return this.Immutable ? "im_map_t" : "map_t";
- }
-
- @Override
- public int CountTypeArgument(TypeArgumentList value) {
- checkState(value.getCount() == 2);
- int lenInBytes = (azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.SIZE / Byte.SIZE);
- for (TypeArgument arg : value) {
- lenInBytes += arg.getType().CountTypeArgument(arg.getTypeArgs().clone());
- }
-
- return lenInBytes;
- }
-
- @Override
- public TypeArgument FieldType(tangible.RefObject scope) {
- return new TypeArgument(scope.argValue.scopeType.Immutable ? LayoutType.ImmutableTypedTuple :
- LayoutType.TypedTuple, scope.argValue.scopeTypeArgs.clone());
- }
-
- @Override
- public boolean HasImplicitTypeCode(tangible.RefObject edit) {
- return true;
- }
-
- @Override
- public TypeArgumentList ReadTypeArgumentList(tangible.RefObject row, int offset,
- tangible.OutObject lenInBytes) {
- lenInBytes.argValue = 0;
- TypeArgument[] retval = new TypeArgument[2];
- for (int i = 0; i < 2; i++) {
- int itemLenInBytes;
- tangible.OutObject tempOut_itemLenInBytes = new tangible.OutObject();
- retval[i] = LayoutType.ReadTypeArgument(row, offset + lenInBytes.argValue, tempOut_itemLenInBytes);
- itemLenInBytes = tempOut_itemLenInBytes.argValue;
- lenInBytes.argValue += itemLenInBytes;
- }
-
- return new TypeArgumentList(retval);
- }
-
- @Override
- public void SetImplicitTypeCode(tangible.RefObject edit) {
- edit.argValue.cellType = edit.argValue.scopeType.Immutable ? LayoutType.ImmutableTypedTuple :
- LayoutType.TypedTuple;
- edit.argValue.cellTypeArgs = edit.argValue.scopeTypeArgs.clone();
- }
-
- @Override
- public Result WriteScope(tangible.RefObject b, tangible.RefObject edit,
- TypeArgumentList typeArgs, tangible.OutObject value) {
- return WriteScope(b, edit, typeArgs, value, UpdateOptions.Upsert);
- }
-
- //C# TO JAVA CONVERTER NOTE: Java does not support optional parameters. Overloaded method(s) are created above:
- //ORIGINAL LINE: public override Result WriteScope(ref RowBuffer b, ref RowCursor edit, TypeArgumentList
- // typeArgs, out RowCursor value, UpdateOptions options = UpdateOptions.Upsert)
- @Override
- public Result WriteScope(tangible.RefObject b, tangible.RefObject