Progressed on dotnet port to java

This commit is contained in:
David Noble
2019-09-07 00:57:17 -07:00
parent be7544d966
commit 93380aee9e
29 changed files with 1030 additions and 1191 deletions

View File

@@ -22,9 +22,6 @@ public final class UtfAnyString implements CharSequence, Comparable<UtfAnyString
private CharSequence buffer;
public UtfAnyString() {
}
public UtfAnyString(final String string) {
this.buffer = string;
}
@@ -80,10 +77,6 @@ public final class UtfAnyString implements CharSequence, Comparable<UtfAnyString
return this.buffer.charAt(index);
}
public UtfAnyString clone() {
return new UtfAnyString(this.buffer);
}
public int compareTo(@Nonnull final String other) {
checkNotNull(other);
@@ -216,7 +209,7 @@ public final class UtfAnyString implements CharSequence, Comparable<UtfAnyString
if (this.buffer instanceof String) {
final int ignored = ((String) buffer).codePoints().reduce(0, (index, codePoint) -> {
final int ignored = ((String) this.buffer).codePoints().reduce(0, (index, codePoint) -> {
if (index % 2 == 0) {
hash[0] = ((hash[0] << 5) + hash[0]) ^ codePoint;
} else {
@@ -247,126 +240,6 @@ public final class UtfAnyString implements CharSequence, Comparable<UtfAnyString
return this.buffer.length();
}
public static boolean opEquals(UtfAnyString left, UtfAnyString right) {
return left.equals(right.clone());
}
public static boolean opEquals(UtfAnyString left, String right) {
return left.equals(right);
}
public static boolean opEquals(String left, UtfAnyString right) {
return right.equals(left);
}
public static boolean opEquals(UtfAnyString left, Utf8String right) {
return left.equals(right);
}
public static boolean opEquals(Utf8String left, UtfAnyString right) {
return right.equals(left);
}
public static boolean opGreaterThan(UtfAnyString left, UtfAnyString right) {
return left.compareTo(right.clone()) > 0;
}
public static boolean opGreaterThan(UtfAnyString left, String right) {
return left.compareTo(right) > 0;
}
public static boolean opGreaterThan(String left, UtfAnyString right) {
return right.compareTo(left) <= 0;
}
public static boolean opGreaterThan(UtfAnyString left, Utf8String right) {
return left.compareTo(right) > 0;
}
public static boolean opGreaterThan(Utf8String left, UtfAnyString right) {
return right.compareTo(left) <= 0;
}
public static boolean opGreaterThanOrEquals(UtfAnyString left, UtfAnyString right) {
return left.compareTo(right.clone()) >= 0;
}
public static boolean opGreaterThanOrEquals(UtfAnyString left, String right) {
return left.compareTo(right) >= 0;
}
public static boolean opGreaterThanOrEquals(String left, UtfAnyString right) {
return right.compareTo(left) < 0;
}
public static boolean opGreaterThanOrEquals(UtfAnyString left, Utf8String right) {
return left.compareTo(right) >= 0;
}
public static boolean opGreaterThanOrEquals(Utf8String left, UtfAnyString right) {
return right.compareTo(left) < 0;
}
public static boolean opLessThan(UtfAnyString left, UtfAnyString right) {
return left.compareTo(right.clone()) < 0;
}
public static boolean opLessThan(UtfAnyString left, String right) {
return left.compareTo(right) < 0;
}
public static boolean opLessThan(String left, UtfAnyString right) {
return right.compareTo(left) >= 0;
}
public static boolean opLessThan(UtfAnyString left, Utf8String right) {
return left.compareTo(right) < 0;
}
public static boolean opLessThan(Utf8String left, UtfAnyString right) {
return right.compareTo(left) >= 0;
}
public static boolean opLessThanOrEquals(UtfAnyString left, UtfAnyString right) {
return left.compareTo(right.clone()) <= 0;
}
public static boolean opLessThanOrEquals(UtfAnyString left, String right) {
return left.compareTo(right) <= 0;
}
public static boolean opLessThanOrEquals(String left, UtfAnyString right) {
return right.compareTo(left) > 0;
}
public static boolean opLessThanOrEquals(UtfAnyString left, Utf8String right) {
return left.compareTo(right) <= 0;
}
public static boolean opLessThanOrEquals(Utf8String left, UtfAnyString right) {
return right.compareTo(left) > 0;
}
public static boolean opNotEquals(UtfAnyString left, UtfAnyString right) {
return !left.equals(right.clone());
}
public static boolean opNotEquals(UtfAnyString left, String right) {
return !left.equals(right);
}
public static boolean opNotEquals(String left, UtfAnyString right) {
return !right.equals(left);
}
public static boolean opNotEquals(UtfAnyString left, Utf8String right) {
return !left.equals(right);
}
public static boolean opNotEquals(Utf8String left, UtfAnyString right) {
return !right.equals(left);
}
/**
* Returns a {@code CharSequence} that is a subsequence of this sequence
* <p>

View File

@@ -2900,7 +2900,7 @@ public final class RowBuffer {
private ByteBuf readVariableBinary() {
long length = this.read7BitEncodedUInt();
checkState(length <= Integer.MAX_VALUE, "expected length <= %s, not %s", Integer.MAX_VALUE, length);
return this.buffer.readSlice((int)length);
return this.buffer.readSlice((int)length).asReadOnly();
}
private void shift(int destination, int source, int length) {

View File

@@ -48,7 +48,7 @@ public final class RowCursor implements Cloneable {
}
}
public static RowCursor Create(RowBuffer row) {
public static RowCursor create(RowBuffer row) {
final SchemaId schemaId = row.readSchemaId(1);
final Layout layout = row.resolver().resolve(schemaId);
@@ -63,7 +63,7 @@ public final class RowCursor implements Cloneable {
.valueOffset(sparseSegmentOffset);
}
public static RowCursor CreateForAppend(RowBuffer row) {
public static RowCursor createForAppend(RowBuffer row) {
final SchemaId schemaId = row.readSchemaId(1);
final Layout layout = row.resolver().resolve(schemaId);

View File

@@ -161,7 +161,7 @@ public final class RowWriter {
*/
public static <TContext> Result WriteBuffer(Reference<RowBuffer> row, TContext context,
WriterFunc<TContext> func) {
RowCursor scope = RowCursor.Create(row);
RowCursor scope = RowCursor.create(row);
Reference<RowCursor> tempReference_scope =
new Reference<RowCursor>(scope);
RowWriter writer = new RowWriter(row, tempReference_scope);

View File

@@ -53,9 +53,9 @@ public final class RowReaderJsonExtensions {
private static Result ToJson(Reference<RowReader> reader, ReaderStringContext ctx) {
int index = 0;
while (reader.get().Read()) {
String path = !reader.get().getPath().IsNull ? String.format("%1$s%2$s%3$s:", ctx.Settings.QuoteChar,
reader.get().getPath(), ctx.Settings.QuoteChar) : null;
while (reader.get().read()) {
String path = !reader.get().path().IsNull ? String.format("%1$s%2$s%3$s:", ctx.Settings.QuoteChar,
reader.get().path(), ctx.Settings.QuoteChar) : null;
if (index != 0) {
ctx.Builder.append(',');
}
@@ -71,12 +71,12 @@ public final class RowReaderJsonExtensions {
Result r;
char scopeBracket = '\0';
char scopeCloseBracket = '\0';
switch (reader.get().getType().LayoutCode) {
switch (reader.get().type().LayoutCode) {
case Null: {
NullValue _;
Out<NullValue> tempOut__ =
new Out<NullValue>();
r = reader.get().ReadNull(tempOut__);
r = reader.get().readNull(tempOut__);
_ = tempOut__.get();
if (r != Result.SUCCESS) {
return r;
@@ -89,7 +89,7 @@ public final class RowReaderJsonExtensions {
case Boolean: {
boolean value;
Out<Boolean> tempOut_value = new Out<Boolean>();
r = reader.get().ReadBool(tempOut_value);
r = reader.get().readBoolean(tempOut_value);
value = tempOut_value.get();
if (r != Result.SUCCESS) {
return r;
@@ -102,7 +102,7 @@ public final class RowReaderJsonExtensions {
case Int8: {
byte value;
Out<Byte> tempOut_value2 = new Out<Byte>();
r = reader.get().ReadInt8(tempOut_value2);
r = reader.get().readInt8(tempOut_value2);
value = tempOut_value2.get();
if (r != Result.SUCCESS) {
return r;
@@ -115,7 +115,7 @@ public final class RowReaderJsonExtensions {
case Int16: {
short value;
Out<Short> tempOut_value3 = new Out<Short>();
r = reader.get().ReadInt16(tempOut_value3);
r = reader.get().readInt16(tempOut_value3);
value = tempOut_value3.get();
if (r != Result.SUCCESS) {
return r;
@@ -128,7 +128,7 @@ public final class RowReaderJsonExtensions {
case Int32: {
int value;
Out<Integer> tempOut_value4 = new Out<Integer>();
r = reader.get().ReadInt32(tempOut_value4);
r = reader.get().readInt32(tempOut_value4);
value = tempOut_value4.get();
if (r != Result.SUCCESS) {
return r;
@@ -141,7 +141,7 @@ public final class RowReaderJsonExtensions {
case Int64: {
long value;
Out<Long> tempOut_value5 = new Out<Long>();
r = reader.get().ReadInt64(tempOut_value5);
r = reader.get().readInt64(tempOut_value5);
value = tempOut_value5.get();
if (r != Result.SUCCESS) {
return r;
@@ -156,7 +156,7 @@ public final class RowReaderJsonExtensions {
Out<Byte> tempOut_value6 = new Out<Byte>();
//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
//ORIGINAL LINE: r = reader.ReadUInt8(out byte value);
r = reader.get().ReadUInt8(tempOut_value6);
r = reader.get().readUInt8(tempOut_value6);
value = tempOut_value6.get();
if (r != Result.SUCCESS) {
return r;
@@ -171,7 +171,7 @@ public final class RowReaderJsonExtensions {
Out<Short> tempOut_value7 = new Out<Short>();
//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
//ORIGINAL LINE: r = reader.ReadUInt16(out ushort value);
r = reader.get().ReadUInt16(tempOut_value7);
r = reader.get().readUInt16(tempOut_value7);
value = tempOut_value7.get();
if (r != Result.SUCCESS) {
return r;
@@ -186,7 +186,7 @@ public final class RowReaderJsonExtensions {
Out<Integer> tempOut_value8 = new Out<Integer>();
//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
//ORIGINAL LINE: r = reader.ReadUInt32(out uint value);
r = reader.get().ReadUInt32(tempOut_value8);
r = reader.get().readUInt32(tempOut_value8);
value = tempOut_value8.get();
if (r != Result.SUCCESS) {
return r;
@@ -201,7 +201,7 @@ public final class RowReaderJsonExtensions {
Out<Long> tempOut_value9 = new Out<Long>();
//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
//ORIGINAL LINE: r = reader.ReadUInt64(out ulong value);
r = reader.get().ReadUInt64(tempOut_value9);
r = reader.get().readUInt64(tempOut_value9);
value = tempOut_value9.get();
if (r != Result.SUCCESS) {
return r;
@@ -242,7 +242,7 @@ public final class RowReaderJsonExtensions {
case Float32: {
float value;
Out<Float> tempOut_value12 = new Out<Float>();
r = reader.get().ReadFloat32(tempOut_value12);
r = reader.get().readFloat32(tempOut_value12);
value = tempOut_value12.get();
if (r != Result.SUCCESS) {
return r;
@@ -255,7 +255,7 @@ public final class RowReaderJsonExtensions {
case Float64: {
double value;
Out<Double> tempOut_value13 = new Out<Double>();
r = reader.get().ReadFloat64(tempOut_value13);
r = reader.get().readFloat64(tempOut_value13);
value = tempOut_value13.get();
if (r != Result.SUCCESS) {
return r;
@@ -269,7 +269,7 @@ public final class RowReaderJsonExtensions {
Float128 _;
Out<Float128> tempOut__2 =
new Out<Float128>();
r = reader.get().ReadFloat128(tempOut__2);
r = reader.get().readFloat128(tempOut__2);
_ = tempOut__2.get();
if (r != Result.SUCCESS) {
return r;
@@ -283,7 +283,7 @@ public final class RowReaderJsonExtensions {
case Decimal: {
java.math.BigDecimal value;
Out<BigDecimal> tempOut_value14 = new Out<BigDecimal>();
r = reader.get().ReadDecimal(tempOut_value14);
r = reader.get().readDecimal(tempOut_value14);
value = tempOut_value14.get();
if (r != Result.SUCCESS) {
return r;
@@ -296,7 +296,7 @@ public final class RowReaderJsonExtensions {
case DateTime: {
java.time.LocalDateTime value;
Out<LocalDateTime> tempOut_value15 = new Out<LocalDateTime>();
r = reader.get().ReadDateTime(tempOut_value15);
r = reader.get().readDateTime(tempOut_value15);
value = tempOut_value15.get();
if (r != Result.SUCCESS) {
return r;
@@ -312,7 +312,7 @@ public final class RowReaderJsonExtensions {
UnixDateTime value;
Out<UnixDateTime> tempOut_value16 =
new Out<UnixDateTime>();
r = reader.get().ReadUnixDateTime(tempOut_value16);
r = reader.get().readUnixDateTime(tempOut_value16);
value = tempOut_value16.get();
if (r != Result.SUCCESS) {
return r;
@@ -325,7 +325,7 @@ public final class RowReaderJsonExtensions {
case Guid: {
java.util.UUID value;
Out<UUID> tempOut_value17 = new Out<UUID>();
r = reader.get().ReadGuid(tempOut_value17);
r = reader.get().readGuid(tempOut_value17);
value = tempOut_value17.get();
if (r != Result.SUCCESS) {
return r;
@@ -389,7 +389,7 @@ public final class RowReaderJsonExtensions {
case NullableScope:
case ImmutableNullableScope: {
if (!reader.get().getHasValue()) {
if (!reader.get().hasValue()) {
ctx.Builder.append("null");
break;
}
@@ -443,7 +443,7 @@ public final class RowReaderJsonExtensions {
}
default: {
throw new IllegalStateException(lenientFormat("Unknown type will be ignored: %s", reader.get().getType().LayoutCode));
throw new IllegalStateException(lenientFormat("Unknown type will be ignored: %s", reader.get().type().LayoutCode));
break;
}
}

View File

@@ -80,9 +80,9 @@ public final class Layout {
this.pathMap.put(column.fullPath(), column);
this.pathStringMap.put(column.fullPath().toString(), column);
if (column.storage() == StorageKind.Fixed) {
if (column.storage() == StorageKind.FIXED) {
numFixed++;
} else if (column.storage() == StorageKind.Variable) {
} else if (column.storage() == StorageKind.VARIABLE) {
numVariable++;
}

View File

@@ -45,16 +45,16 @@ public final class LayoutBuilder {
if (type.isNull()) {
checkArgument(nullable);
LayoutBit nullBit = this.bitAllocator.Allocate();
column = new LayoutColumn(path, type, TypeArgumentList.EMPTY, StorageKind.Fixed, this.parent(),
column = new LayoutColumn(path, type, TypeArgumentList.EMPTY, StorageKind.FIXED, this.parent(),
this.fixedCount, 0, nullBit, LayoutBit.INVALID, 0);
} else if (type.isBoolean()) {
LayoutBit nullBit = nullable ? this.bitAllocator.Allocate() : LayoutBit.INVALID;
LayoutBit boolbit = this.bitAllocator.Allocate();
column = new LayoutColumn(path, type, TypeArgumentList.EMPTY, StorageKind.Fixed, this.parent(),
column = new LayoutColumn(path, type, TypeArgumentList.EMPTY, StorageKind.FIXED, this.parent(),
this.fixedCount, 0, nullBit, boolbit, 0);
} else {
LayoutBit nullBit = nullable ? this.bitAllocator.Allocate() : LayoutBit.INVALID;
column = new LayoutColumn(path, type, TypeArgumentList.EMPTY, StorageKind.Fixed, this.parent(),
column = new LayoutColumn(path, type, TypeArgumentList.EMPTY, StorageKind.FIXED, this.parent(),
this.fixedCount, this.fixedSize, nullBit, LayoutBit.INVALID, length);
this.fixedSize += type.isFixed() ? type.size() : length;
@@ -66,7 +66,7 @@ public final class LayoutBuilder {
public void addObjectScope(String path, LayoutType type) {
LayoutColumn column = new LayoutColumn(path, type, TypeArgumentList.EMPTY, StorageKind.Sparse, this.parent(),
LayoutColumn column = new LayoutColumn(path, type, TypeArgumentList.EMPTY, StorageKind.SPARSE, this.parent(),
this.sparseCount, -1, LayoutBit.INVALID, LayoutBit.INVALID, 0);
this.sparseCount++;
@@ -76,7 +76,7 @@ public final class LayoutBuilder {
public void addSparseColumn(String path, LayoutType type) {
LayoutColumn column = new LayoutColumn(path, type, TypeArgumentList.EMPTY, StorageKind.Sparse, this.parent(),
LayoutColumn column = new LayoutColumn(path, type, TypeArgumentList.EMPTY, StorageKind.SPARSE, this.parent(),
this.sparseCount, -1, LayoutBit.INVALID, LayoutBit.INVALID, 0);
this.sparseCount++;
@@ -85,7 +85,7 @@ public final class LayoutBuilder {
public void addTypedScope(String path, LayoutType type, TypeArgumentList typeArgs) {
LayoutColumn col = new LayoutColumn(path, type, typeArgs, StorageKind.Sparse, this.parent(), this.sparseCount,
LayoutColumn col = new LayoutColumn(path, type, typeArgs, StorageKind.SPARSE, this.parent(), this.sparseCount,
-1, LayoutBit.INVALID, LayoutBit.INVALID, 0);
this.sparseCount++;
@@ -97,7 +97,7 @@ public final class LayoutBuilder {
checkArgument(length >= 0);
checkArgument(type.allowVariable());
LayoutColumn column = new LayoutColumn(path, type, TypeArgumentList.EMPTY, StorageKind.Variable, this.parent(),
LayoutColumn column = new LayoutColumn(path, type, TypeArgumentList.EMPTY, StorageKind.VARIABLE, this.parent(),
this.varCount, this.varCount, this.bitAllocator.Allocate(), LayoutBit.INVALID, length);
this.varCount++;

View File

@@ -101,9 +101,9 @@ public final class LayoutColumn {
}
/**
* If {@link #storage} equals {@link StorageKind#Fixed} then the byte offset to the field location.
* If {@link #storage} equals {@link StorageKind#FIXED} then the byte offset to the field location.
* <p>
* If {@link #storage} equals {@link StorageKind#Variable} then the zero-based index of the field from the
* If {@link #storage} equals {@link StorageKind#VARIABLE} then the zero-based index of the field from the
* beginning of the variable length segment.
* <p>
* For all other values of {@link #storage}, {@link #offset} is ignored.

View File

@@ -98,7 +98,7 @@ public final class LayoutCompiler {
(PrimitivePropertyType)tempVar : null;
if (pp != null) {
switch (pp.storage()) {
case Fixed:
case FIXED:
if (LayoutCodeTraits.ClearImmutableBit(scope) != LayoutCode.SCHEMA) {
throw new LayoutCompilationException("Cannot have fixed storage within a sparse " +
"scope.");
@@ -111,7 +111,7 @@ public final class LayoutCompiler {
builder.addFixedColumn(p.path(), type, pp.nullable(), pp.length());
break;
case Variable:
case VARIABLE:
if (LayoutCodeTraits.ClearImmutableBit(scope) != LayoutCode.SCHEMA) {
throw new LayoutCompilationException("Cannot have variable storage within a " +
"sparse scope.");
@@ -124,7 +124,7 @@ public final class LayoutCompiler {
builder.addVariableColumn(p.path(), type, pp.length());
break;
case Sparse:
case SPARSE:
if (!pp.nullable()) {
throw new LayoutCompilationException("Non-nullable sparse columns are not " +
"supported.");

View File

@@ -28,14 +28,14 @@ public final class SegmentSerializer {
public static Result Read(Reference<RowReader> reader, Out<Segment> obj) {
obj.setAndGet(null);
while (reader.get().Read()) {
while (reader.get().read()) {
Result r;
// TODO: use Path tokens here.
switch (reader.get().getPath().toString()) {
switch (reader.get().path().toString()) {
case "length":
Out<Integer> tempOut_Length = new Out<Integer>();
r = reader.get().ReadInt32(tempOut_Length);
r = reader.get().readInt32(tempOut_Length);
obj.get().argValue.Length = tempOut_Length.get();
if (r != Result.SUCCESS) {
return r;
@@ -43,7 +43,7 @@ public final class SegmentSerializer {
// If the RowBuffer isn't big enough to contain the rest of the header, then just
// return the length.
if (reader.get().getLength() < obj.get().Length) {
if (reader.get().length() < obj.get().Length) {
return Result.SUCCESS;
}

View File

@@ -57,8 +57,8 @@ HashMap<SchemaId, Schema> ids
pp:
ValidateAssert.IsTrue(pp.Length >= 0, "Length MUST be positive");
if (parent != null) {
ValidateAssert.AreEqual(pp.Storage, StorageKind.Sparse, String.format("Nested fields MUST have " +
"storage %1$s", StorageKind.Sparse));
ValidateAssert.AreEqual(pp.Storage, StorageKind.SPARSE, String.format("Nested fields MUST have " +
"storage %1$s", StorageKind.SPARSE));
}
break;

View File

@@ -7,6 +7,13 @@ package com.azure.data.cosmos.serialization.hybridrow.schemas;
* Describes the storage placement for primitive properties.
*/
public enum StorageKind {
/**
* The property does not define a column
* <p>
* This is indicative of an error in the the column specification.
*/
NONE(-1),
/**
* The property defines a sparse column
* <p>
@@ -14,14 +21,14 @@ public enum StorageKind {
* linked list at the end of the row. Access time for sparse columns is proportional to the number of sparse columns
* in the row.
*/
Sparse(0),
SPARSE(0),
/**
* The property is a fixed-length, space-reserved column
* <p>
* The column will consume 1 null-bit, and its byte-width regardless of whether the value is present in the row.
*/
Fixed(1),
FIXED(1),
/**
* The property is a variable-length column.
@@ -32,7 +39,7 @@ public enum StorageKind {
* When a <em>long</em> value is marked variable then a null-bit is reserved and the value is optionally encoded as
* variable if small enough to fit, otherwise the null-bit is set and the value is encoded as sparse.
*/
Variable(2);
VARIABLE(2);
public static final int SIZE = java.lang.Integer.SIZE;
private static java.util.HashMap<Integer, StorageKind> mappings;

View File

@@ -81,7 +81,7 @@ public final class CodeGenRowGenerator {
this.row = new RowBuffer(buffer.AsSpan(), HybridRowVersion.V1, this.row.resolver());
Reference<RowBuffer> tempReference_row =
new Reference<RowBuffer>(this.row);
RowCursor root = RowCursor.Create(tempReference_row);
RowCursor root = RowCursor.create(tempReference_row);
this.row = tempReference_row.get();
Reference<RowBuffer> tempReference_row2 =
new Reference<RowBuffer>(this.row);
@@ -107,7 +107,7 @@ public final class CodeGenRowGenerator {
public Result WriteBuffer(HashMap<Utf8String, Object> tableValue) {
Reference<RowBuffer> tempReference_row =
new Reference<RowBuffer>(this.row);
RowCursor root = RowCursor.Create(tempReference_row);
RowCursor root = RowCursor.create(tempReference_row);
this.row = tempReference_row.get();
Reference<RowBuffer> tempReference_row2 =
new Reference<RowBuffer>(this.row);

View File

@@ -68,7 +68,7 @@ public final class CustomerExampleUnitTests {
Reference<RowBuffer> tempReference_row =
new Reference<RowBuffer>(row);
RowCursor rc1 = RowCursor.Create(tempReference_row);
RowCursor rc1 = RowCursor.create(tempReference_row);
row = tempReference_row.get();
Reference<RowBuffer> tempReference_row2 =
new Reference<RowBuffer>(row);
@@ -79,7 +79,7 @@ public final class CustomerExampleUnitTests {
row = tempReference_row2.get();
Reference<RowBuffer> tempReference_row3 =
new Reference<RowBuffer>(row);
RowCursor rc2 = RowCursor.Create(tempReference_row3);
RowCursor rc2 = RowCursor.create(tempReference_row3);
row = tempReference_row3.get();
Reference<RowBuffer> tempReference_row4 =
new Reference<RowBuffer>(row);
@@ -93,7 +93,7 @@ public final class CustomerExampleUnitTests {
// Append an item to an existing list.
Reference<RowBuffer> tempReference_row5 =
new Reference<RowBuffer>(row);
RowCursor rc3 = RowCursor.Create(tempReference_row5);
RowCursor rc3 = RowCursor.create(tempReference_row5);
row = tempReference_row5.get();
Reference<RowBuffer> tempReference_row6 =
new Reference<RowBuffer>(row);
@@ -106,7 +106,7 @@ public final class CustomerExampleUnitTests {
g1.Emails.add("vice_president@whitehouse.gov");
Reference<RowBuffer> tempReference_row7 =
new Reference<RowBuffer>(row);
RowCursor rc4 = RowCursor.Create(tempReference_row7);
RowCursor rc4 = RowCursor.create(tempReference_row7);
row = tempReference_row7.get();
Reference<RowBuffer> tempReference_row8 =
new Reference<RowBuffer>(row);
@@ -120,7 +120,7 @@ public final class CustomerExampleUnitTests {
// Prepend an item to an existing list.
Reference<RowBuffer> tempReference_row9 =
new Reference<RowBuffer>(row);
RowCursor rc5 = RowCursor.Create(tempReference_row9);
RowCursor rc5 = RowCursor.create(tempReference_row9);
row = tempReference_row9.get();
Reference<RowBuffer> tempReference_row10 =
new Reference<RowBuffer>(row);
@@ -135,7 +135,7 @@ public final class CustomerExampleUnitTests {
}
Reference<RowBuffer> tempReference_row11 =
new Reference<RowBuffer>(row);
RowCursor rc6 = RowCursor.Create(tempReference_row11);
RowCursor rc6 = RowCursor.create(tempReference_row11);
row = tempReference_row11.get();
Reference<RowBuffer> tempReference_row12 =
new Reference<RowBuffer>(row);
@@ -149,7 +149,7 @@ public final class CustomerExampleUnitTests {
// InsertAt an item to an existing list.
Reference<RowBuffer> tempReference_row13 =
new Reference<RowBuffer>(row);
RowCursor rc7 = RowCursor.Create(tempReference_row13);
RowCursor rc7 = RowCursor.create(tempReference_row13);
row = tempReference_row13.get();
Reference<RowBuffer> tempReference_row14 =
new Reference<RowBuffer>(row);
@@ -166,7 +166,7 @@ public final class CustomerExampleUnitTests {
Reference<RowBuffer> tempReference_row15 =
new Reference<RowBuffer>(row);
RowCursor rc8 = RowCursor.Create(tempReference_row15);
RowCursor rc8 = RowCursor.create(tempReference_row15);
row = tempReference_row15.get();
Reference<RowBuffer> tempReference_row16 =
new Reference<RowBuffer>(row);
@@ -187,7 +187,7 @@ public final class CustomerExampleUnitTests {
Hotel h1 = this.hotelExample;
Reference<RowBuffer> tempReference_row =
new Reference<RowBuffer>(row);
RowCursor root = RowCursor.Create(tempReference_row);
RowCursor root = RowCursor.create(tempReference_row);
row = tempReference_row.get();
Reference<RowBuffer> tempReference_row2 =
new Reference<RowBuffer>(row);
@@ -199,7 +199,7 @@ public final class CustomerExampleUnitTests {
Reference<RowBuffer> tempReference_row3 =
new Reference<RowBuffer>(row);
root = RowCursor.Create(tempReference_row3);
root = RowCursor.create(tempReference_row3);
row = tempReference_row3.get();
Reference<RowBuffer> tempReference_row4 =
new Reference<RowBuffer>(row);
@@ -221,7 +221,7 @@ public final class CustomerExampleUnitTests {
Hotel h1 = this.hotelExample;
Reference<RowBuffer> tempReference_row =
new Reference<RowBuffer>(row);
RowCursor root = RowCursor.Create(tempReference_row);
RowCursor root = RowCursor.create(tempReference_row);
row = tempReference_row.get();
Reference<RowBuffer> tempReference_row2 =
new Reference<RowBuffer>(row);
@@ -233,7 +233,7 @@ public final class CustomerExampleUnitTests {
Reference<RowBuffer> tempReference_row3 =
new Reference<RowBuffer>(row);
root = RowCursor.Create(tempReference_row3);
root = RowCursor.create(tempReference_row3);
row = tempReference_row3.get();
Address tempVar = new Address();
tempVar.setStreet("300B Brownie Way");

View File

@@ -59,7 +59,7 @@ public final class NullableUnitTests {
RowCursor _;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
this.WriteNullables(tempReference_row, RowCursor.Create(tempReference_row2, out _), t1);
this.WriteNullables(tempReference_row, RowCursor.create(tempReference_row2, out _), t1);
row = tempReference_row2.get();
row = tempReference_row.get();
Reference<RowBuffer> tempReference_row3 =
@@ -69,7 +69,7 @@ public final class NullableUnitTests {
RowCursor _;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
Nullables t2 = this.ReadNullables(tempReference_row3, RowCursor.Create(tempReference_row4, out _));
Nullables t2 = this.ReadNullables(tempReference_row3, RowCursor.create(tempReference_row4, out _));
row = tempReference_row4.get();
row = tempReference_row3.get();
assert t1 == t2;
@@ -516,7 +516,7 @@ public final class NullableUnitTests {
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword -
// these cannot be converted using the 'Out' helper class unless the method is within the code
// being modified:
RowCursor.CreateForAppend(row, out temp).Find(row, "");
RowCursor.createForAppend(row, out temp).Find(row, "");
Reference<RowCursor> tempReference_temp =
new Reference<RowCursor>(temp);
RowCursor _;
@@ -632,7 +632,7 @@ public final class NullableUnitTests {
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword -
// these cannot be converted using the 'Out' helper class unless the method is within the code
// being modified:
RowCursor.CreateForAppend(row, out temp).Find(row, "");
RowCursor.createForAppend(row, out temp).Find(row, "");
RowCursor tupleScope;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword -
// these cannot be converted using the 'Out' helper class unless the method is within the code

View File

@@ -122,7 +122,7 @@ public final class RowOperationDispatcher {
public void LayoutCodeSwitch(String path, LayoutType type, TypeArgumentList typeArgs, Object value) {
Reference<RowBuffer> tempReference_Row =
new Reference<RowBuffer>(this.Row);
RowCursor root = RowCursor.Create(tempReference_Row);
RowCursor root = RowCursor.create(tempReference_Row);
this.Row = tempReference_Row.get();
Reference<RowCursor> tempReference_root =
new Reference<RowCursor>(root);
@@ -164,7 +164,7 @@ public final class RowOperationDispatcher {
typeArgs = col.typeArgs().clone();
}
if ((path != null) && (col == null || col.storage() == StorageKind.Sparse)) {
if ((path != null) && (col == null || col.storage() == StorageKind.SPARSE)) {
Reference<RowBuffer> tempReference_Row =
new Reference<RowBuffer>(this.Row);
scope.get().Find(tempReference_Row, path);

View File

@@ -180,7 +180,7 @@ public final class RowReaderUnitTests {
Tuple.Create(3.0, new Point(5, 6)) })
RowReader reader = d.GetReader().clone();
assert reader.getLength() == d.Row.length();
assert reader.length() == d.Row.length();
Reference<RowReader> tempReference_reader =
new Reference<RowReader>(reader);
RowReaderUnitTests.PrintReader(tempReference_reader, 0);
@@ -235,14 +235,14 @@ public final class RowReaderUnitTests {
new Reference<RowBuffer>(row);
rowReader = new RowReader(tempReference_row5);
row = tempReference_row5.get();
assert rowReader.Read();
assert rowReader.getType().LayoutCode == LayoutCode.ObjectScope;
RowReader nestedScope = rowReader.ReadScope().clone();
assert rowReader.read();
assert rowReader.type().LayoutCode == LayoutCode.ObjectScope;
RowReader nestedScope = rowReader.readScope().clone();
Reference<RowReader> tempReference_nestedScope =
new Reference<RowReader>(nestedScope);
ResultAssert.IsSuccess(RowReaderUnitTests.ReadNestedDocumentDelegate(tempReference_nestedScope, 0));
nestedScope = tempReference_nestedScope.get();
assert rowReader.Read();
assert rowReader.read();
Reference<RowReader> tempReference_nestedScope2 =
new Reference<RowReader>(nestedScope);
Result result = rowReader.SkipScope(tempReference_nestedScope2);
@@ -251,8 +251,8 @@ public final class RowReaderUnitTests {
}
private static Result ReadNestedDocumentDelegate(Reference<RowReader> reader, int context) {
while (reader.get().Read()) {
switch (reader.get().getType().LayoutCode) {
while (reader.get().read()) {
switch (reader.get().type().LayoutCode) {
case TupleScope: {
ResultAssert.IsSuccess(reader.get().ReadScope(0, RowReaderUnitTests.ReadTuplePartial));
break;
@@ -269,10 +269,10 @@ public final class RowReaderUnitTests {
}
private static Result ReadNestedDocumentNonDelegate(Reference<RowReader> reader, int context) {
while (reader.get().Read()) {
switch (reader.get().getType().LayoutCode) {
while (reader.get().read()) {
switch (reader.get().type().LayoutCode) {
case TupleScope: {
RowReader nested = reader.get().ReadScope().clone();
RowReader nested = reader.get().readScope().clone();
Reference<RowReader> tempReference_nested =
new Reference<RowReader>(nested);
ResultAssert.IsSuccess(RowReaderUnitTests.ReadTuplePartial(tempReference_nested, 0));
@@ -281,7 +281,7 @@ public final class RowReaderUnitTests {
}
case ObjectScope: {
RowReader nested = reader.get().ReadScope().clone();
RowReader nested = reader.get().readScope().clone();
Reference<RowReader> tempReference_nested2 =
new Reference<RowReader>(nested);
ResultAssert.IsSuccess(RowReaderUnitTests.ReadNestedDocumentNonDelegate(tempReference_nested2, 0));
@@ -297,10 +297,10 @@ public final class RowReaderUnitTests {
private static Result ReadNestedDocumentNonDelegateWithSkipScope(Reference<RowReader> reader,
int context) {
while (reader.get().Read()) {
switch (reader.get().getType().LayoutCode) {
while (reader.get().read()) {
switch (reader.get().type().LayoutCode) {
case TupleScope: {
RowReader nested = reader.get().ReadScope().clone();
RowReader nested = reader.get().readScope().clone();
Reference<RowReader> tempReference_nested =
new Reference<RowReader>(nested);
ResultAssert.IsSuccess(RowReaderUnitTests.ReadTuplePartial(tempReference_nested, 0));
@@ -313,7 +313,7 @@ public final class RowReaderUnitTests {
}
case ObjectScope: {
RowReader nested = reader.get().ReadScope().clone();
RowReader nested = reader.get().readScope().clone();
Reference<RowReader> tempReference_nested3 =
new Reference<RowReader>(nested);
ResultAssert.IsSuccess(RowReaderUnitTests.ReadNestedDocumentNonDelegate(tempReference_nested3, 0));
@@ -332,8 +332,8 @@ public final class RowReaderUnitTests {
private static Result ReadTuplePartial(Reference<RowReader> reader, int unused) {
// Read only part of our tuple
assert reader.get().Read();
assert reader.get().Read();
assert reader.get().read();
assert reader.get().read();
return Result.SUCCESS;
}

View File

@@ -501,7 +501,7 @@ public final class RowWriterUnitTests {
Reference<RowBuffer> tempReference_row2 = new Reference<RowBuffer>(row);
RowReader reader = new RowReader(tempReference_row2);
row = tempReference_row2.get();
assert reader.getLength() == writerLength;
assert reader.length() == writerLength;
Reference<RowReader> tempReference_reader = new Reference<RowReader>(reader);
RowReaderUnitTests.PrintReader(tempReference_reader, 0);
reader = tempReference_reader.get();

View File

@@ -136,8 +136,8 @@ public class SchemaUnitTests {
Storage = _Storage;
}
}
Object[] expectedProps = new Object[] { AnonymousType("a", TypeKind.Int8, StorageKind.Fixed),
AnonymousType2("b", TypeKind.Utf8, StorageKind.Variable) };
Object[] expectedProps = new Object[] { AnonymousType("a", TypeKind.Int8, StorageKind.FIXED),
AnonymousType2("b", TypeKind.Utf8, StorageKind.VARIABLE) };
for (int i = 0; i < n1.getSchemas().get(0).getProperties().size(); i++) {
Property p = n1.getSchemas().get(0).getProperties().get(i);

View File

@@ -138,12 +138,12 @@ public final class SerializerUnitTest {
public static Result Read(Reference<RowReader> reader, Out<BatchOperation> operation) {
BatchOperation retval = new BatchOperation();
operation.setAndGet(null);
while (reader.get().Read()) {
while (reader.get().read()) {
Result r;
switch (reader.get().getPath()) {
switch (reader.get().path()) {
case "operationType":
Out<Integer> tempOut_OperationType = new Out<Integer>();
r = reader.get().ReadInt32(tempOut_OperationType);
r = reader.get().readInt32(tempOut_OperationType);
retval.OperationType = tempOut_OperationType.get();
if (r != Result.SUCCESS) {
return r;
@@ -166,7 +166,7 @@ public final class SerializerUnitTest {
break;
case "resourceType":
Out<Integer> tempOut_ResourceType = new Out<Integer>();
r = reader.get().ReadInt32(tempOut_ResourceType);
r = reader.get().readInt32(tempOut_ResourceType);
retval.ResourceType = tempOut_ResourceType.get();
if (r != Result.SUCCESS) {
return r;
@@ -244,11 +244,11 @@ public final class SerializerUnitTest {
Out<BatchRequestHeaders> header) {
BatchRequestHeaders retval = new BatchRequestHeaders();
header.setAndGet(null);
while (reader.get().Read()) {
switch (reader.get().getPath()) {
while (reader.get().read()) {
switch (reader.get().path()) {
case "sampleRequestHeader":
Out<Long> tempOut_SampleRequestHeader = new Out<Long>();
Result r = reader.get().ReadInt64(tempOut_SampleRequestHeader);
Result r = reader.get().readInt64(tempOut_SampleRequestHeader);
retval.SampleRequestHeader = tempOut_SampleRequestHeader.get();
if (r != Result.SUCCESS) {
return r;
@@ -273,8 +273,8 @@ public final class SerializerUnitTest {
public static final TypeArgument OperationsTypeArg = new TypeArgument(LayoutType.TypedArray, new TypeArgumentList(new TypeArgument[] { BatchOperationSerializer.TypeArg }));
public static Result Read(Reference<RowReader> reader, Out<BatchRequest> request) {
assert reader.get().Read();
checkState(reader.get().getPath().equals("operations"));
assert reader.get().read();
checkState(reader.get().path().equals("operations"));
java.util.ArrayList<BatchOperation> operations;
Out<ArrayList<TItem>> tempOut_operations = new Out<ArrayList<TItem>>();

View File

@@ -41,7 +41,7 @@ public final class TaggedUnitTests {
RowCursor _;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
this.WriteTaggedApi(tempReference_row, RowCursor.Create(tempReference_row2, out _), c1);
this.WriteTaggedApi(tempReference_row, RowCursor.create(tempReference_row2, out _), c1);
row = tempReference_row2.get();
row = tempReference_row.get();
Reference<RowBuffer> tempReference_row3 =
@@ -51,7 +51,7 @@ public final class TaggedUnitTests {
RowCursor _;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
TaggedApi c2 = this.ReadTaggedApi(tempReference_row3, RowCursor.Create(tempReference_row4, out _));
TaggedApi c2 = this.ReadTaggedApi(tempReference_row3, RowCursor.create(tempReference_row4, out _));
row = tempReference_row4.get();
row = tempReference_row3.get();
assert c1 == c2;

View File

@@ -49,7 +49,7 @@ public final class TupleUnitTests {
RowCursor _;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
this.WriteCounter(tempReference_row, RowCursor.Create(tempReference_row2, out _), c1);
this.WriteCounter(tempReference_row, RowCursor.create(tempReference_row2, out _), c1);
row = tempReference_row2.get();
row = tempReference_row.get();
Reference<RowBuffer> tempReference_row3 =
@@ -59,7 +59,7 @@ public final class TupleUnitTests {
RowCursor _;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
PerfCounter c2 = this.ReadCounter(tempReference_row3, RowCursor.Create(tempReference_row4, out _));
PerfCounter c2 = this.ReadCounter(tempReference_row3, RowCursor.create(tempReference_row4, out _));
row = tempReference_row4.get();
row = tempReference_row3.get();
assert c1 == c2;
@@ -79,7 +79,7 @@ public final class TupleUnitTests {
RowCursor _;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
this.WriteCounter(tempReference_row, RowCursor.Create(tempReference_row2, out _), c1);
this.WriteCounter(tempReference_row, RowCursor.create(tempReference_row2, out _), c1);
row = tempReference_row2.get();
row = tempReference_row.get();
Reference<RowBuffer> tempReference_row3 =
@@ -89,7 +89,7 @@ public final class TupleUnitTests {
RowCursor _;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
PerfCounter c2 = this.ReadCounter(tempReference_row3, RowCursor.Create(tempReference_row4, out _));
PerfCounter c2 = this.ReadCounter(tempReference_row3, RowCursor.create(tempReference_row4, out _));
row = tempReference_row4.get();
row = tempReference_row3.get();
assert c1 == c2;
@@ -112,7 +112,7 @@ public final class TupleUnitTests {
RowCursor _;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
this.WriteCounter(tempReference_row, RowCursor.Create(tempReference_row2, out _), c1);
this.WriteCounter(tempReference_row, RowCursor.create(tempReference_row2, out _), c1);
row = tempReference_row2.get();
row = tempReference_row.get();
Reference<RowBuffer> tempReference_row3 =
@@ -122,7 +122,7 @@ public final class TupleUnitTests {
RowCursor _;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
PerfCounter c2 = this.ReadCounter(tempReference_row3, RowCursor.Create(tempReference_row4, out _));
PerfCounter c2 = this.ReadCounter(tempReference_row3, RowCursor.create(tempReference_row4, out _));
row = tempReference_row4.get();
row = tempReference_row3.get();
assert c1 == c2;
@@ -152,7 +152,7 @@ public final class TupleUnitTests {
RowCursor history;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
RowCursor.Create(tempReference_row, out history).Find(tempReference_row2, historyToken);
RowCursor.create(tempReference_row, out history).Find(tempReference_row2, historyToken);
row = tempReference_row2.get();
row = tempReference_row.get();
int ctx = 1; // ignored
@@ -289,7 +289,7 @@ public final class TupleUnitTests {
RowCursor _;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
this.WriteCounter(tempReference_row, RowCursor.Create(tempReference_row2, out _), c1);
this.WriteCounter(tempReference_row, RowCursor.create(tempReference_row2, out _), c1);
row = tempReference_row2.get();
row = tempReference_row.get();
@@ -304,7 +304,7 @@ public final class TupleUnitTests {
RowCursor valueScope;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
RowCursor.Create(tempReference_row3, out valueScope).Find(tempReference_row4, c.Path);
RowCursor.create(tempReference_row3, out valueScope).Find(tempReference_row4, c.Path);
row = tempReference_row4.get();
row = tempReference_row3.get();
Reference<RowBuffer> tempReference_row5 =
@@ -323,7 +323,7 @@ public final class TupleUnitTests {
RowCursor valueScope2;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
RowCursor.Create(tempReference_row6, out valueScope2).Find(tempReference_row7, c.Path);
RowCursor.create(tempReference_row6, out valueScope2).Find(tempReference_row7, c.Path);
row = tempReference_row7.get();
row = tempReference_row6.get();
Reference<RowBuffer> tempReference_row8 =
@@ -388,7 +388,7 @@ public final class TupleUnitTests {
RowCursor _;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
this.WriteCounter(tempReference_row, RowCursor.Create(tempReference_row2, out _), c1);
this.WriteCounter(tempReference_row, RowCursor.create(tempReference_row2, out _), c1);
row = tempReference_row2.get();
row = tempReference_row.get();
@@ -403,7 +403,7 @@ public final class TupleUnitTests {
RowCursor valueScope;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
RowCursor.Create(tempReference_row3, out valueScope).Find(tempReference_row4, c.Path);
RowCursor.create(tempReference_row3, out valueScope).Find(tempReference_row4, c.Path);
row = tempReference_row4.get();
row = tempReference_row3.get();
Reference<RowBuffer> tempReference_row5 =
@@ -473,7 +473,7 @@ public final class TupleUnitTests {
RowCursor _;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
this.WriteCounter(tempReference_row, RowCursor.Create(tempReference_row2, out _), c1);
this.WriteCounter(tempReference_row, RowCursor.create(tempReference_row2, out _), c1);
row = tempReference_row2.get();
row = tempReference_row.get();
@@ -488,7 +488,7 @@ public final class TupleUnitTests {
RowCursor valueScope;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
RowCursor.Create(tempReference_row3, out valueScope).Find(tempReference_row4, c.Path);
RowCursor.create(tempReference_row3, out valueScope).Find(tempReference_row4, c.Path);
row = tempReference_row4.get();
row = tempReference_row3.get();
Reference<RowBuffer> tempReference_row5 =
@@ -552,7 +552,7 @@ public final class TupleUnitTests {
RowCursor _;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
this.WriteCounter(tempReference_row, RowCursor.Create(tempReference_row2, out _), c1);
this.WriteCounter(tempReference_row, RowCursor.create(tempReference_row2, out _), c1);
row = tempReference_row2.get();
row = tempReference_row.get();
@@ -568,7 +568,7 @@ public final class TupleUnitTests {
RowCursor valueScope;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
RowCursor.Create(tempReference_row3, out valueScope).Find(tempReference_row4, c.Path);
RowCursor.create(tempReference_row3, out valueScope).Find(tempReference_row4, c.Path);
row = tempReference_row4.get();
row = tempReference_row3.get();
Reference<RowBuffer> tempReference_row5 =

View File

@@ -61,7 +61,7 @@ public final class TypedArrayUnitTests {
RowCursor _;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
this.WriteTagged(tempReference_row, RowCursor.Create(tempReference_row2, out _), t1);
this.WriteTagged(tempReference_row, RowCursor.create(tempReference_row2, out _), t1);
row = tempReference_row2.get();
row = tempReference_row.get();
Reference<RowBuffer> tempReference_row3 =
@@ -71,7 +71,7 @@ public final class TypedArrayUnitTests {
RowCursor _;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
Tagged t2 = this.ReadTagged(tempReference_row3, RowCursor.Create(tempReference_row4, out _));
Tagged t2 = this.ReadTagged(tempReference_row3, RowCursor.create(tempReference_row4, out _));
row = tempReference_row4.get();
row = tempReference_row3.get();
assert t1 == t2;

View File

@@ -67,7 +67,7 @@ public final class TypedMapUnitTests {
RowCursor _;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
this.WriteMovie(tempReference_row, RowCursor.Create(tempReference_row2, out _), t1);
this.WriteMovie(tempReference_row, RowCursor.create(tempReference_row2, out _), t1);
row = tempReference_row2.get();
row = tempReference_row.get();
Reference<RowBuffer> tempReference_row3 =
@@ -77,7 +77,7 @@ public final class TypedMapUnitTests {
RowCursor _;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
Movie t2 = this.ReadMovie(tempReference_row3, RowCursor.Create(tempReference_row4, out _));
Movie t2 = this.ReadMovie(tempReference_row3, RowCursor.create(tempReference_row4, out _));
row = tempReference_row4.get();
row = tempReference_row3.get();
assert t1 == t2;
@@ -90,7 +90,7 @@ public final class TypedMapUnitTests {
row.initLayout(HybridRowVersion.V1, this.layout, this.resolver);
Reference<RowBuffer> tempReference_row =
new Reference<RowBuffer>(row);
RowCursor root = RowCursor.Create(tempReference_row);
RowCursor root = RowCursor.create(tempReference_row);
row = tempReference_row.get();
ArrayList<String> expected = new ArrayList<String>(Arrays.asList("Mark", "Harrison", "Carrie"));
@@ -186,7 +186,7 @@ public final class TypedMapUnitTests {
row.initLayout(HybridRowVersion.V1, this.layout, this.resolver);
Reference<RowBuffer> tempReference_row =
new Reference<RowBuffer>(row);
RowCursor root = RowCursor.Create(tempReference_row);
RowCursor root = RowCursor.create(tempReference_row);
row = tempReference_row.get();
Movie t1 = new Movie();
@@ -194,7 +194,7 @@ public final class TypedMapUnitTests {
Map.entry("Carrie", "Leia")));
Reference<RowBuffer> tempReference_row2 =
new Reference<RowBuffer>(row);
RowCursor rc1 = RowCursor.Create(tempReference_row2);
RowCursor rc1 = RowCursor.create(tempReference_row2);
row = tempReference_row2.get();
Reference<RowBuffer> tempReference_row3 =
new Reference<RowBuffer>(row);
@@ -286,7 +286,7 @@ public final class TypedMapUnitTests {
row.initLayout(HybridRowVersion.V1, this.layout, this.resolver);
Reference<RowBuffer> tempReference_row =
new Reference<RowBuffer>(row);
RowCursor root = RowCursor.Create(tempReference_row);
RowCursor root = RowCursor.create(tempReference_row);
row = tempReference_row.get();
Movie t1 = new Movie();
@@ -303,7 +303,7 @@ public final class TypedMapUnitTests {
Reference<RowBuffer> tempReference_row2 =
new Reference<RowBuffer>(row);
RowCursor rc1 = RowCursor.Create(tempReference_row2);
RowCursor rc1 = RowCursor.create(tempReference_row2);
row = tempReference_row2.get();
Reference<RowBuffer> tempReference_row3 =
new Reference<RowBuffer>(row);
@@ -477,7 +477,7 @@ public final class TypedMapUnitTests {
row.initLayout(HybridRowVersion.V1, this.layout, this.resolver);
Reference<RowBuffer> tempReference_row =
new Reference<RowBuffer>(row);
RowCursor root = RowCursor.Create(tempReference_row);
RowCursor root = RowCursor.create(tempReference_row);
row = tempReference_row.get();
// Write a map and then try to write directly into it.
@@ -679,7 +679,7 @@ public final class TypedMapUnitTests {
row.initLayout(HybridRowVersion.V1, this.layout, this.resolver);
Reference<RowBuffer> tempReference_row =
new Reference<RowBuffer>(row);
RowCursor root = RowCursor.Create(tempReference_row);
RowCursor root = RowCursor.create(tempReference_row);
row = tempReference_row.get();
ArrayList<String> expected = new ArrayList<String>(Arrays.asList("Mark", "Harrison", "Carrie"));

View File

@@ -65,7 +65,7 @@ public final class TypedSetUnitTests {
RowCursor _;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
this.WriteTodo(tempReference_row, RowCursor.Create(tempReference_row2, out _), t1);
this.WriteTodo(tempReference_row, RowCursor.create(tempReference_row2, out _), t1);
row = tempReference_row2.get();
row = tempReference_row.get();
Reference<RowBuffer> tempReference_row3 =
@@ -75,7 +75,7 @@ public final class TypedSetUnitTests {
RowCursor _;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
Todo t2 = this.ReadTodo(tempReference_row3, RowCursor.Create(tempReference_row4, out _));
Todo t2 = this.ReadTodo(tempReference_row3, RowCursor.create(tempReference_row4, out _));
row = tempReference_row4.get();
row = tempReference_row3.get();
assert t1 == t2;
@@ -103,14 +103,14 @@ public final class TypedSetUnitTests {
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these
// cannot be converted using the 'Out' helper class unless the method is within the code being
// modified:
this.WriteTodo(tempReference_row, RowCursor.Create(tempReference_row2, out _), t1);
this.WriteTodo(tempReference_row, RowCursor.create(tempReference_row2, out _), t1);
row = tempReference_row2.get();
row = tempReference_row.get();
// Attempt to update each item in turn and then update it with itself.
Reference<RowBuffer> tempReference_row3 =
new Reference<RowBuffer>(row);
RowCursor root = RowCursor.Create(tempReference_row3);
RowCursor root = RowCursor.create(tempReference_row3);
row = tempReference_row3.get();
LayoutColumn c;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these
@@ -195,14 +195,14 @@ public final class TypedSetUnitTests {
RowCursor _;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
this.WriteTodo(tempReference_row, RowCursor.Create(tempReference_row2, out _), t1);
this.WriteTodo(tempReference_row, RowCursor.create(tempReference_row2, out _), t1);
row = tempReference_row2.get();
row = tempReference_row.get();
// Attempt to find each item in turn.
Reference<RowBuffer> tempReference_row3 =
new Reference<RowBuffer>(row);
RowCursor root = RowCursor.Create(tempReference_row3);
RowCursor root = RowCursor.create(tempReference_row3);
row = tempReference_row3.get();
LayoutColumn c;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these
@@ -377,14 +377,14 @@ public final class TypedSetUnitTests {
RowCursor _;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
this.WriteTodo(tempReference_row, RowCursor.Create(tempReference_row2, out _), t1);
this.WriteTodo(tempReference_row, RowCursor.create(tempReference_row2, out _), t1);
row = tempReference_row2.get();
row = tempReference_row.get();
// Attempt to insert duplicate items in existing sets.
Reference<RowBuffer> tempReference_row3 =
new Reference<RowBuffer>(row);
RowCursor root = RowCursor.Create(tempReference_row3);
RowCursor root = RowCursor.create(tempReference_row3);
row = tempReference_row3.get();
LayoutColumn c;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these
@@ -710,7 +710,7 @@ public final class TypedSetUnitTests {
RowCursor setScope;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
RowCursor.Create(tempReference_row, out setScope).Find(tempReference_row2, c.Path);
RowCursor.create(tempReference_row, out setScope).Find(tempReference_row2, c.Path);
row = tempReference_row2.get();
row = tempReference_row.get();
Reference<RowBuffer> tempReference_row3 =
@@ -736,7 +736,7 @@ public final class TypedSetUnitTests {
RowCursor tempCursor;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
RowCursor.Create(tempReference_row5, out tempCursor).Find(tempReference_row6, Utf8String.Empty);
RowCursor.create(tempReference_row5, out tempCursor).Find(tempReference_row6, Utf8String.Empty);
row = tempReference_row6.get();
row = tempReference_row5.get();
Reference<RowBuffer> tempReference_row7 =
@@ -777,7 +777,7 @@ public final class TypedSetUnitTests {
new Reference<RowBuffer>(row);
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
RowCursor.Create(tempReference_row11, out setScope).Find(tempReference_row12, c.Path);
RowCursor.create(tempReference_row11, out setScope).Find(tempReference_row12, c.Path);
row = tempReference_row12.get();
row = tempReference_row11.get();
Reference<RowBuffer> tempReference_row13 =
@@ -799,7 +799,7 @@ public final class TypedSetUnitTests {
RowCursor tempCursor1;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
RowCursor.Create(tempReference_row14, out tempCursor1).Find(tempReference_row15, "prices.0");
RowCursor.create(tempReference_row14, out tempCursor1).Find(tempReference_row15, "prices.0");
row = tempReference_row15.get();
row = tempReference_row14.get();
Reference<RowBuffer> tempReference_row16 =
@@ -819,7 +819,7 @@ public final class TypedSetUnitTests {
RowCursor tempCursor2;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
RowCursor.Create(tempReference_row17, out tempCursor2).Find(tempReference_row18, "prices.0.0");
RowCursor.create(tempReference_row17, out tempCursor2).Find(tempReference_row18, "prices.0.0");
row = tempReference_row18.get();
row = tempReference_row17.get();
Reference<RowBuffer> tempReference_row19 =
@@ -910,7 +910,7 @@ public final class TypedSetUnitTests {
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these
// cannot be converted using the 'Out' helper class unless the method is within the code being
// modified:
RowCursor.Create(tempReference_row2, out root);
RowCursor.create(tempReference_row2, out root);
row = tempReference_row2.get();
Reference<RowBuffer> tempReference_row3 =
new Reference<RowBuffer>(row);
@@ -965,7 +965,7 @@ public final class TypedSetUnitTests {
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these
// cannot be converted using the 'Out' helper class unless the method is within the code being
// modified:
Todo t2 = this.ReadTodo(tempReference_row8, RowCursor.Create(tempReference_row9, out _));
Todo t2 = this.ReadTodo(tempReference_row8, RowCursor.create(tempReference_row9, out _));
row = tempReference_row9.get();
row = tempReference_row8.get();
assert t1 == t2;
@@ -994,14 +994,14 @@ public final class TypedSetUnitTests {
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these
// cannot be converted using the 'Out' helper class unless the method is within the code being
// modified:
this.WriteTodo(tempReference_row, RowCursor.Create(tempReference_row2, out _), t1);
this.WriteTodo(tempReference_row, RowCursor.create(tempReference_row2, out _), t1);
row = tempReference_row2.get();
row = tempReference_row.get();
// Attempt to find each item in turn and then delete it.
Reference<RowBuffer> tempReference_row3 =
new Reference<RowBuffer>(row);
RowCursor root = RowCursor.Create(tempReference_row3);
RowCursor root = RowCursor.create(tempReference_row3);
row = tempReference_row3.get();
LayoutColumn c;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these

View File

@@ -105,7 +105,7 @@ public final class WriteRowDispatcher implements IDispatcher {
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these
// cannot be converted using the 'Out' helper class unless the method is within the code being
// modified:
RowCursor.CreateForAppend(tempReference_Row2, out tempCursor);
RowCursor.createForAppend(tempReference_Row2, out tempCursor);
dispatcher.get().argValue.Row = tempReference_Row2.get();
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'ref' keyword - these
// cannot be converted using the 'Ref' helper class unless the method is within the code being
@@ -178,7 +178,7 @@ public final class WriteRowDispatcher implements IDispatcher {
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these
// cannot be converted using the 'Out' helper class unless the method is within the code being
// modified:
RowCursor.CreateForAppend(tempReference_Row2, out tempCursor);
RowCursor.createForAppend(tempReference_Row2, out tempCursor);
dispatcher.get().argValue.Row = tempReference_Row2.get();
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'ref' keyword - these
// cannot be converted using the 'Ref' helper class unless the method is within the code being

View File

@@ -12,9 +12,9 @@ import com.azure.data.cosmos.serialization.hybridrow.io.RowReader;
public final class AddressSerializer {
public static Result Read(Reference<RowReader> reader, Out<Address> obj) {
obj.setAndGet(new Address());
while (reader.get().Read()) {
while (reader.get().read()) {
Result r;
switch (reader.get().getPath()) {
switch (reader.get().path()) {
case "street":
Out<String> tempOut_Street = new Out<String>();
r = reader.get().ReadString(tempOut_Street);

View File

@@ -23,12 +23,12 @@ public final class PostalCodeSerializer {
public static Result Read(Reference<RowReader> reader, Out<PostalCode> obj) {
obj.setAndGet(new PostalCode());
while (reader.get().Read()) {
while (reader.get().read()) {
Result r;
switch (reader.get().getPath()) {
switch (reader.get().path()) {
case "zip":
Out<Integer> tempOut_Zip = new Out<Integer>();
r = reader.get().ReadInt32(tempOut_Zip);
r = reader.get().readInt32(tempOut_Zip);
obj.get().argValue.Zip = tempOut_Zip.get();
if (r != Result.SUCCESS) {
return r;
@@ -38,7 +38,7 @@ public final class PostalCodeSerializer {
case "plus4":
short value;
Out<Short> tempOut_value = new Out<Short>();
r = reader.get().ReadInt16(tempOut_value);
r = reader.get().readInt16(tempOut_value);
value = tempOut_value.get();
if (r != Result.SUCCESS) {
return r;