Progressed on port from dotnet to java

This commit is contained in:
David Noble
2019-08-30 23:06:32 -07:00
parent 8c24a961e9
commit ab82943fe0
53 changed files with 764 additions and 868 deletions

View File

@@ -36,6 +36,7 @@ Licensed under the MIT License.
<site.url/>
<test.groups>unit</test.groups>
<javadoc.opts/>
<fastutil.version>8.3.0</fastutil.version>
<guava.version>28.0-jre</guava.version>
<jackson.version>2.9.9</jackson.version>
<mockito.version>1.10.19</mockito.version>
@@ -79,6 +80,12 @@ Licensed under the MIT License.
<version>${netty.version}</version>
</dependency>
<dependency>
<groupId>it.unimi.dsi</groupId>
<artifactId>fastutil</artifactId>
<version>${fastutil.version}</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>

View File

@@ -1,36 +0,0 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.azure.data.cosmos.serialization.hybridrow;
public class DefaultSpanResizer<T> implements ISpanResizer<T> {
// TODO: C# TO JAVA CONVERTER: Java annotations will not correspond to .NET attributes:
//ORIGINAL LINE: [SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes",
// Justification = "Type is immutable.")] public static readonly DefaultSpanResizer<T> Default = new
// DefaultSpanResizer<T>();
public static final DefaultSpanResizer<T> Default = new DefaultSpanResizer<T>();
private DefaultSpanResizer() {
}
/**
* <inheritdoc />
*/
public final Span<T> Resize(int minimumLength) {
return Resize(minimumLength, null);
}
//C# TO JAVA CONVERTER NOTE: Java does not support optional parameters. Overloaded method(s) are created above:
//ORIGINAL LINE: public Span<T> Resize(int minimumLength, Span<T> buffer = default)
public final Span<T> Resize(int minimumLength, Span<T> buffer) {
//C# TO JAVA CONVERTER WARNING: Java does not allow direct instantiation of arrays of generic type parameters:
//ORIGINAL LINE: Span<T> next = new Memory<T>(new T[Math.Max(minimumLength, buffer.Length)]).Span;
Span<T> next = (new Memory<T>((T[])new Object[Math.max(minimumLength, buffer.Length)])).Span;
if (!buffer.IsEmpty && next.Slice(0, buffer.Length) != buffer) {
buffer.CopyTo(next);
}
return next;
}
}

View File

@@ -216,18 +216,18 @@ public final class RowBuffer {
* @param srcEdit The field to move into the set/map.
* @return The prepared edit context.
*/
public RowCursor PrepareSparseMove(Reference<RowCursor> scope, Reference<RowCursor> srcEdit) {
checkArgument(scope.get().scopeType().isUniqueScope());
public RowCursor prepareSparseMove(RowCursor scope, RowCursor srcEdit) {
checkArgument(scope.scopeType().isUniqueScope());
checkArgument(scope.get().index() == 0);
checkArgument(scope.index() == 0);
RowCursor dstEdit;
// 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:
scope.get().Clone(out dstEdit);
scope.Clone(out dstEdit);
dstEdit.metaOffset(scope.get().valueOffset());
dstEdit.metaOffset(scope.valueOffset());
int srcSize = this.sparseComputeSize(srcEdit);
int srcBytes = srcSize - (srcEdit.get().valueOffset() - srcEdit.get().metaOffset());
int srcBytes = srcSize - (srcEdit.valueOffset() - srcEdit.metaOffset());
while (dstEdit.index() < dstEdit.count()) {
Reference<RowCursor> tempReference_dstEdit =
new Reference<RowCursor>(dstEdit);
@@ -368,7 +368,7 @@ public final class RowBuffer {
return result;
}
public boolean ReadBit(int offset, LayoutBit bit) {
public boolean readBit(int offset, LayoutBit bit) {
if (bit.getIsInvalid()) {
return true;
@@ -377,7 +377,7 @@ public final class RowBuffer {
// TODO: C# TO JAVA CONVERTER: There is no Java equivalent to 'unchecked' in this context:
//ORIGINAL LINE: return (this.buffer[bit.GetOffset(offset)] & unchecked((byte)(1 << bit.GetBit()))) != 0;
//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
return (this.buffer[bit.GetOffset(offset)] & (byte)(1 << bit.GetBit())) != 0;
return (this.buffer[bit.offset(offset)] & (byte)(1 << bit.bit())) != 0;
}
public LocalDateTime ReadDateTime(int offset) {
@@ -557,7 +557,7 @@ public final class RowBuffer {
// TODO: C# TO JAVA CONVERTER: Java annotations will not correspond to .NET attributes:
//ORIGINAL LINE: [MethodImpl(MethodImplOptions.AggressiveInlining)] internal LayoutType ReadSparseTypeCode(int
// offset)
public LayoutType ReadSparseTypeCode(int offset) {
public LayoutType readSparseTypeCode(int offset) {
return LayoutType.FromCode(LayoutCode.forValue(this.ReadUInt8(offset)));
}
@@ -1002,7 +1002,7 @@ public final class RowBuffer {
spaceNeeded = tempOut_spaceNeeded.get();
metaBytes = tempOut_metaBytes.get();
this.WriteSparseMetadata(edit, scopeType, typeArgs.clone(), metaBytes);
this.WriteSparseTypeCode(edit.get().valueOffset(), LayoutCode.END_SCOPE);
this.writeSparseTypeCode(edit.get().valueOffset(), LayoutCode.END_SCOPE);
checkState(spaceNeeded == metaBytes + numBytes);
newScope.setAndGet(new RowCursor());
newScope.get().scopeType(scopeType);
@@ -1023,7 +1023,7 @@ public final class RowBuffer {
// TODO: C# TO JAVA CONVERTER: There is no Java equivalent to 'unchecked' in this context:
//ORIGINAL LINE: this.buffer[bit.GetOffset(offset)] |= unchecked((byte)(1 << bit.GetBit()));
//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
this.buffer[bit.GetOffset(offset)] |= (byte)(1 << bit.GetBit());
this.buffer[bit.offset(offset)] |= (byte)(1 << bit.bit());
}
public void WriteSparseString(Reference<RowCursor> edit, Utf8Span value, UpdateOptions options) {
@@ -1123,11 +1123,11 @@ public final class RowBuffer {
}
public void UnsetBit(int offset, LayoutBit bit) {
checkState(LayoutBit.opNotEquals(bit.clone(), LayoutBit.Invalid));
checkState(LayoutBit.opNotEquals(bit.clone(), LayoutBit.INVALID));
// TODO: C# TO JAVA CONVERTER: There is no Java equivalent to 'unchecked' in this context:
//ORIGINAL LINE: this.buffer[bit.GetOffset(offset)] &= unchecked((byte)~(1 << bit.GetBit()));
//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
this.buffer[bit.GetOffset(offset)] &= (byte)~(1 << bit.GetBit());
this.buffer[bit.offset(offset)] &= (byte)~(1 << bit.bit());
}
public void WriteVariableInt(int offset, long value, boolean exists, Out<Integer> shift) {
@@ -1567,7 +1567,7 @@ public final class RowBuffer {
spaceNeeded = tempOut_spaceNeeded.get();
metaBytes = tempOut_metaBytes.get();
this.WriteSparseMetadata(edit, scopeType, TypeArgumentList.EMPTY, metaBytes);
this.WriteSparseTypeCode(edit.get().valueOffset(), LayoutCode.END_SCOPE);
this.writeSparseTypeCode(edit.get().valueOffset(), LayoutCode.END_SCOPE);
checkState(spaceNeeded == metaBytes + numBytes);
newScope.setAndGet(new RowCursor());
newScope.get().scopeType(scopeType);
@@ -1601,11 +1601,11 @@ public final class RowBuffer {
this.WriteSparseMetadata(edit, scopeType, typeArgs.clone(), metaBytes);
int valueOffset = edit.get().valueOffset();
for (int i = 0; i < typeArgs.count(); i++) {
this.WriteSparseTypeCode(valueOffset, LayoutCode.NULL);
this.writeSparseTypeCode(valueOffset, LayoutCode.NULL);
valueOffset += (LayoutCode.SIZE / Byte.SIZE);
}
this.WriteSparseTypeCode(valueOffset, LayoutCode.END_SCOPE);
this.writeSparseTypeCode(valueOffset, LayoutCode.END_SCOPE);
checkState(spaceNeeded == metaBytes + numBytes);
newScope.setAndGet(new RowCursor());
newScope.get().scopeType(scopeType);
@@ -1641,7 +1641,7 @@ public final class RowBuffer {
// Write scope terminator.
int valueOffset = edit.get().valueOffset() + udt.size();
this.WriteSparseTypeCode(valueOffset, LayoutCode.END_SCOPE);
this.writeSparseTypeCode(valueOffset, LayoutCode.END_SCOPE);
checkState(spaceNeeded == metaBytes + numBytes);
newScope.setAndGet(new RowCursor());
newScope.get().scopeType(scopeType);
@@ -1766,7 +1766,7 @@ public final class RowBuffer {
// TODO: C# TO JAVA CONVERTER: Java annotations will not correspond to .NET attributes:
//ORIGINAL LINE: [MethodImpl(MethodImplOptions.AggressiveInlining)] internal void WriteSparseTypeCode(int offset,
// LayoutCode code)
public void WriteSparseTypeCode(int offset, LayoutCode code) {
public void writeSparseTypeCode(int offset, LayoutCode code) {
//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
//ORIGINAL LINE: this.WriteUInt8(offset, (byte)code);
this.WriteUInt8(offset, (byte) code.value());
@@ -1955,9 +1955,9 @@ public final class RowBuffer {
*
* @param edit The field to delete.
*/
public void deleteSparse(Reference<RowCursor> edit) {
public void deleteSparse(RowCursor edit) {
// If the field doesn't exist, then nothing to do.
if (!edit.get().exists()) {
if (!edit.exists()) {
return;
}
@@ -2010,14 +2010,14 @@ public final class RowBuffer {
int offset = scopeOffset + layout.size();
for (int i = layout.numFixed(); i < index; i++) {
LayoutColumn col = columns[i];
if (this.ReadBit(scopeOffset, col.getNullBit().clone())) {
if (this.readBit(scopeOffset, col.getNullBit().clone())) {
int lengthSizeInBytes;
Out<Integer> tempOut_lengthSizeInBytes = new Out<Integer>();
//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
//ORIGINAL LINE: ulong valueSizeInBytes = this.Read7BitEncodedUInt(offset, out int lengthSizeInBytes);
long valueSizeInBytes = this.read7BitEncodedUInt(offset, tempOut_lengthSizeInBytes);
lengthSizeInBytes = tempOut_lengthSizeInBytes.get();
if (col.getType().getIsVarint()) {
if (col.type().getIsVarint()) {
offset += lengthSizeInBytes;
} else {
offset += (int) valueSizeInBytes + lengthSizeInBytes;
@@ -2510,14 +2510,14 @@ public final class RowBuffer {
//ORIGINAL LINE: case LayoutNull _:
case LayoutNull
_:
this.WriteSparseTypeCode(offset, code.LayoutCode);
this.writeSparseTypeCode(offset, code.LayoutCode);
return 1;
// TODO: C# TO JAVA CONVERTER: Java has no equivalent to C# pattern variables in 'case' statements:
//ORIGINAL LINE: case LayoutBoolean _:
case LayoutBoolean
_:
this.WriteSparseTypeCode(offset, LayoutCode.BOOLEAN_FALSE);
this.writeSparseTypeCode(offset, LayoutCode.BOOLEAN_FALSE);
return 1;
// TODO: C# TO JAVA CONVERTER: Java has no equivalent to C# pattern variables in 'case' statements:
@@ -2658,7 +2658,7 @@ public final class RowBuffer {
case LayoutArray _:
// Variable length sparse collection scopes take 1 byte for the end-of-scope terminator.
this.WriteSparseTypeCode(offset, LayoutCode.END_SCOPE);
this.writeSparseTypeCode(offset, LayoutCode.END_SCOPE);
return (LayoutCode.SIZE / Byte.SIZE);
// TODO: C# TO JAVA CONVERTER: Java has no equivalent to C# pattern variables in 'case' statements:
@@ -2683,10 +2683,10 @@ public final class RowBuffer {
// Fixed arity sparse collections take 1 byte for end-of-scope plus a null for each element.
for (int i = 0; i < typeArgs.count(); i++) {
this.WriteSparseTypeCode(offset, LayoutCode.NULL);
this.writeSparseTypeCode(offset, LayoutCode.NULL);
}
this.WriteSparseTypeCode(offset, LayoutCode.END_SCOPE);
this.writeSparseTypeCode(offset, LayoutCode.END_SCOPE);
return (LayoutCode.SIZE / Byte.SIZE) + ((LayoutCode.SIZE / Byte.SIZE) * typeArgs.count());
// TODO: C# TO JAVA CONVERTER: Java has no equivalent to C# pattern variables in 'case' statements:
@@ -2727,7 +2727,7 @@ public final class RowBuffer {
this.buffer.Slice(offset, udt.getSize()).Fill(0);
// Write scope terminator.
this.WriteSparseTypeCode(offset + udt.getSize(), LayoutCode.END_SCOPE);
this.writeSparseTypeCode(offset + udt.getSize(), LayoutCode.END_SCOPE);
return udt.getSize() + (LayoutCode.SIZE / Byte.SIZE);
default:
@@ -3117,7 +3117,7 @@ public final class RowBuffer {
edit.get().scopeType().SetImplicitTypeCode(edit);
edit.get().valueOffset(edit.get().metaOffset());
} else {
edit.get().cellType = this.ReadSparseTypeCode(edit.get().metaOffset());
edit.get().cellType = this.readSparseTypeCode(edit.get().metaOffset());
edit.get().valueOffset(edit.get().metaOffset() + (LayoutCode.SIZE / Byte.SIZE));
edit.get().cellTypeArgs = TypeArgumentList.EMPTY;
if (edit.get().cellType() instanceof LayoutEndScope) {
@@ -3202,10 +3202,10 @@ public final class RowBuffer {
}
} else {
if (code == LayoutTypes.Boolean) {
code = this.ReadSparseTypeCode(edit.metaOffset());
code = this.readSparseTypeCode(edit.metaOffset());
checkState(code == LayoutTypes.Boolean || code == LayoutTypes.BooleanFalse);
} else {
checkState(this.ReadSparseTypeCode(edit.metaOffset()) == code);
checkState(this.readSparseTypeCode(edit.metaOffset()) == code);
}
}

View File

@@ -13,6 +13,8 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.deser.std.StdDeserializer;
import com.fasterxml.jackson.databind.exc.MismatchedInputException;
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
import it.unimi.dsi.fastutil.ints.Int2ReferenceMap;
import it.unimi.dsi.fastutil.ints.Int2ReferenceOpenHashMap;
import java.io.IOException;
@@ -26,13 +28,13 @@ import static com.google.common.base.Strings.lenientFormat;
@JsonSerialize(using = SchemaId.JsonSerializer.class)
public final class SchemaId {
// TODO: DANOBLE: Consider caching SchemaId instances to reduce memory footprint
public static final SchemaId INVALID = null;
public static final SchemaId NONE = new SchemaId(-1);
public static final int SIZE = (Integer.SIZE / Byte.SIZE);
public static final int SIZE = Integer.SIZE / Byte.SIZE;
private static final long MAX_VALUE = 0x00000000FFFFFFFFL;
private static final Int2ReferenceMap<SchemaId> cache = new Int2ReferenceOpenHashMap<>();
private static long MAX_VALUE = 0x00000000FFFFFFFFL;
private final int value;
/**
@@ -62,11 +64,25 @@ public final class SchemaId {
return this.value() == other.value();
}
/**
* Returns a {@link SchemaId} from a specified underlying integer value
*
* @return The integer value of this {@link SchemaId}
*/
public static SchemaId from(int value) {
return cache.computeIfAbsent(value, SchemaId::new);
}
@Override
public int hashCode() {
return Integer.valueOf(this.value()).hashCode();
}
@Override
public String toString() {
return String.valueOf(this.value());
}
/**
* The underlying integer value of this {@link SchemaId}
*
@@ -76,20 +92,6 @@ public final class SchemaId {
return this.value;
}
/**
* Returns a {@link SchemaId} from a specified underlying integer value
*
* @return The integer value of this {@link SchemaId}
*/
public static SchemaId from(int value) {
return new SchemaId(value);
}
@Override
public String toString() {
return String.valueOf(this.value());
}
static final class JsonDeserializer extends StdDeserializer<SchemaId> {
private JsonDeserializer() {

View File

@@ -298,7 +298,7 @@ public final class RowReader {
checkState(this.cursor.scopeType() instanceof LayoutUDT);
LayoutColumn col = this.columns[this.columnIndex];
if (!this.row.ReadBit(this.cursor.start(), col.getNullBit().clone())) {
if (!this.row.readBit(this.cursor.start(), col.getNullBit().clone())) {
// Skip schematized values if they aren't present.
// TODO: C# TO JAVA CONVERTER: There is no 'goto' in Java:
// goto case States.Schematized;
@@ -1104,7 +1104,7 @@ public final class RowReader {
return Result.TypeMismatch;
}
switch (col == null ? null : col.getStorage()) {
switch (col == null ? null : col.storage()) {
case Fixed:
Reference<RowBuffer> tempReference_row =
new Reference<RowBuffer>(this.row);
@@ -1142,7 +1142,7 @@ public final class RowReader {
return Result.TypeMismatch;
}
switch (col == null ? null : col.getStorage()) {
switch (col == null ? null : col.storage()) {
case Fixed:
Reference<RowBuffer> tempReference_row = new Reference<RowBuffer>(this.row);
Reference<RowCursor> tempReference_cursor = new Reference<RowCursor>(this.cursor);
@@ -1180,7 +1180,7 @@ public final class RowReader {
return Result.TypeMismatch;
}
switch (col == null ? null : col.getStorage()) {
switch (col == null ? null : col.storage()) {
case Fixed:
Reference<RowBuffer> tempReference_row = new Reference<RowBuffer>(this.row);
Reference<RowCursor> tempReference_cursor = new Reference<RowCursor>(this.cursor);

View File

@@ -3,7 +3,6 @@
package com.azure.data.cosmos.serialization.hybridrow.layouts;
import com.azure.data.cosmos.core.Out;
import com.azure.data.cosmos.core.Utf8String;
import com.azure.data.cosmos.core.UtfAnyString;
import com.azure.data.cosmos.serialization.hybridrow.SchemaId;
@@ -11,8 +10,12 @@ import com.azure.data.cosmos.serialization.hybridrow.schemas.Namespace;
import com.azure.data.cosmos.serialization.hybridrow.schemas.Schema;
import com.azure.data.cosmos.serialization.hybridrow.schemas.StorageKind;
import javax.annotation.Nonnull;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Optional;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* A Layout describes the structure of a Hybrid Row
@@ -36,39 +39,45 @@ public final class Layout {
private final int numVariable;
private final HashMap<Utf8String, LayoutColumn> pathMap;
private final HashMap<String, LayoutColumn> pathStringMap;
private final SchemaId schemaId = new SchemaId();
private final SchemaId schemaId;
private final int size;
private final StringTokenizer tokenizer;
private final LayoutColumn[] topColumns;
public Layout(String name, SchemaId schemaId, int numBitmaskBytes, int minRequiredSize, ArrayList<LayoutColumn> columns) {
public Layout(
@Nonnull final String name, @Nonnull final SchemaId schemaId, final int numBitmaskBytes,
final int minRequiredSize, @Nonnull final ArrayList<LayoutColumn> columns
) {
checkNotNull(name);
checkNotNull(schemaId);
checkNotNull(columns);
this.name = name;
this.schemaId = schemaId.clone();
this.schemaId = schemaId;
this.numBitmaskBytes = numBitmaskBytes;
this.size = minRequiredSize;
this.tokenizer = new StringTokenizer();
this.pathMap = new HashMap<Utf8String, LayoutColumn>(columns.size(), SamplingUtf8StringComparer.Default);
this.pathStringMap = new HashMap<String, LayoutColumn>(columns.size());
this.pathMap = new HashMap<>(columns.size());
this.pathStringMap = new HashMap<>(columns.size());
final ArrayList<LayoutColumn> top = new ArrayList<LayoutColumn>(columns.size());
final ArrayList<LayoutColumn> top = new ArrayList<>(columns.size());
int numFixed = 0;
int numVariable = 0;
for (LayoutColumn c : columns) {
for (LayoutColumn column : columns) {
this.tokenizer().add(c.getPath());
this.pathMap.put(c.getFullPath(), c);
this.pathStringMap.put(c.getFullPath().toString(), c);
this.tokenizer().add(column.path());
this.pathMap.put(column.fullPath(), column);
this.pathStringMap.put(column.fullPath().toString(), column);
if (c.getStorage() == StorageKind.Fixed) {
if (column.storage() == StorageKind.Fixed) {
numFixed++;
} else if (c.getStorage() == StorageKind.Variable) {
} else if (column.storage() == StorageKind.Variable) {
numVariable++;
}
if (c.getParent() == null) {
top.add(c);
if (column.parent() == null) {
top.add(column);
}
}
@@ -78,36 +87,35 @@ public final class Layout {
}
/**
* Finds a column specification for a column with a matching path.
* Finds a column specification for a column with a matching path
*
* @param path The path of the column to find.
* @param column If found, the column specification, otherwise {@code null}.
* @return {@code true} if a column with the path is found, otherwise {@code false}.
* @param path path of the column to find
* @return {@link LayoutColumn}, if a column with the {@code path} is found, {@link Optional#empty()}
*/
public boolean TryFind(UtfAnyString path, Out<LayoutColumn> column) {
public Optional<LayoutColumn> tryFind(@Nonnull UtfAnyString path) {
checkNotNull(path);
if (path.isNull()) {
column.setAndGet(null);
return false;
return Optional.empty();
}
if (path.isUtf8()) {
return (this.pathMap.containsKey(path.toUtf8()) && (column.setAndGet(this.pathMap.get(path.toUtf8()))) == column.get());
return Optional.ofNullable(this.pathMap.get(path.toUtf8()));
}
String value = path.toUtf16();
return (this.pathStringMap.containsKey(value) && (column.setAndGet(this.pathStringMap.get(value))) == column.get());
return Optional.ofNullable(this.pathStringMap.get(path.toUtf16()));
}
/**
* Finds a column specification for a column with a matching path.
*
* @param path The path of the column to find.
* @param column If found, the column specification, otherwise null.
* @return True if a column with the path is found, otherwise false.
*/
public boolean TryFind(String path, Out<LayoutColumn> column) {
return (this.pathStringMap.containsKey(path) && (column.setAndGet(this.pathStringMap.get(path))) == column.get());
public Optional<LayoutColumn> tryFind(@Nonnull String path) {
checkNotNull(path);
return Optional.ofNullable(this.pathStringMap.get(path));
}
/**
@@ -181,15 +189,15 @@ public final class Layout {
sb.append(String.format("\tCount: %1$s\n", this.topColumns.length));
sb.append(String.format("\tFixedSize: %1$s\n", this.size()));
for (LayoutColumn c : this.topColumns) {
if (c.getType().getIsFixed()) {
if (c.getType().getIsBool()) {
sb.append(String.format("\t%1$s: %2$s @ %3$s:%4$s:%5$s\n", c.getFullPath(), c.getType().getName(), c.getOffset(), c.getNullBit().clone(), c.getBoolBit().clone()));
for (LayoutColumn column : this.topColumns) {
if (column.type().isFixed()) {
if (column.type().isBoolean()) {
sb.append(String.format("\t%1$s: %2$s @ %3$s:%4$s:%5$s\n", column.fullPath(), column.type().name(), column.getOffset(), column.getNullBit(), column.getBooleanBit()));
} else {
sb.append(String.format("\t%1$s: %2$s @ %3$s\n", c.getFullPath(), c.getType().getName(), c.getOffset()));
sb.append(String.format("\t%1$s: %2$s @ %3$s\n", column.fullPath(), column.type().name(), column.getOffset()));
}
} else {
sb.append(String.format("\t%1$s: %2$s[%4$s] @ %3$s\n", c.getFullPath(), c.getType().getName(), c.getOffset(), c.getSize()));
sb.append(String.format("\t%1$s: %2$s[%4$s] @ %3$s\n", column.fullPath(), column.type().name(), column.getOffset(), column.getSize()));
}
}

View File

@@ -32,14 +32,14 @@ public final class LayoutBinary extends LayoutType<byte[]> implements ILayoutSpa
//ORIGINAL LINE: public override Result ReadFixed(ref RowBuffer b, ref RowCursor scope, LayoutColumn col, out
// byte[] value)
@Override
public Result readFixed(Reference<RowBuffer> b, Reference<RowCursor> scope, LayoutColumn col,
public Result readFixed(RowBuffer b, RowCursor scope, LayoutColumn column,
Out<byte[]> value) {
ReadOnlySpan<Byte> span;
// 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:
//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
//ORIGINAL LINE: Result r = this.ReadFixed(ref b, ref scope, col, out ReadOnlySpan<byte> span);
Result r = this.ReadFixed(b, scope, col, out span);
Result r = this.ReadFixed(b, scope, column, out span);
value.setAndGet((r == Result.Success) ? span.ToArray() :)
default
return r;
@@ -52,7 +52,7 @@ public final class LayoutBinary extends LayoutType<byte[]> implements ILayoutSpa
Out<ReadOnlySpan<Byte>> value) {
checkArgument(scope.get().scopeType() instanceof LayoutUDT);
checkArgument(col.getSize() >= 0);
if (!b.get().ReadBit(scope.get().start(), col.getNullBit().clone())) {
if (!b.get().readBit(scope.get().start(), col.getNullBit().clone())) {
value.setAndGet(null);
return Result.NotFound;
}
@@ -64,7 +64,7 @@ public final class LayoutBinary extends LayoutType<byte[]> implements ILayoutSpa
//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
//ORIGINAL LINE: public override Result ReadSparse(ref RowBuffer b, ref RowCursor edit, out byte[] value)
@Override
public Result readSparse(Reference<RowBuffer> b, Reference<RowCursor> edit,
public Result readSparse(RowBuffer b, RowCursor edit,
Out<byte[]> value) {
ReadOnlySpan<Byte> span;
// 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:
@@ -93,14 +93,14 @@ public final class LayoutBinary extends LayoutType<byte[]> implements ILayoutSpa
//ORIGINAL LINE: public override Result ReadVariable(ref RowBuffer b, ref RowCursor scope, LayoutColumn col, out
// byte[] value)
@Override
public Result readVariable(Reference<RowBuffer> b, Reference<RowCursor> scope, LayoutColumn col
public Result readVariable(RowBuffer b, RowCursor scope, LayoutColumn column
, Out<byte[]> value) {
ReadOnlySpan<Byte> span;
// 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:
//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
//ORIGINAL LINE: Result r = this.ReadVariable(ref b, ref scope, col, out ReadOnlySpan<byte> span);
Result r = this.ReadVariable(b, scope, col, out span);
Result r = this.ReadVariable(b, scope, column, out span);
value.setAndGet((r == Result.Success) ? span.ToArray() :)
default
return r;
@@ -112,7 +112,7 @@ public final class LayoutBinary extends LayoutType<byte[]> implements ILayoutSpa
public Result ReadVariable(Reference<RowBuffer> b, Reference<RowCursor> scope, LayoutColumn col
, Out<ReadOnlySpan<Byte>> value) {
checkArgument(scope.get().scopeType() instanceof LayoutUDT);
if (!b.get().ReadBit(scope.get().start(), col.getNullBit().clone())) {
if (!b.get().readBit(scope.get().start(), col.getNullBit().clone())) {
value.setAndGet(null);
return Result.NotFound;
}
@@ -127,12 +127,12 @@ public final class LayoutBinary extends LayoutType<byte[]> implements ILayoutSpa
//ORIGINAL LINE: public override Result WriteFixed(ref RowBuffer b, ref RowCursor scope, LayoutColumn col, byte[]
// value)
@Override
public Result writeFixed(Reference<RowBuffer> b, Reference<RowCursor> scope, LayoutColumn col,
public Result writeFixed(RowBuffer b, RowCursor scope, LayoutColumn column,
byte[] value) {
checkArgument(value != null);
//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
//ORIGINAL LINE: return this.WriteFixed(ref b, ref scope, col, new ReadOnlySpan<byte>(value));
return this.WriteFixed(b, scope, col, new ReadOnlySpan<Byte>(value));
return this.WriteFixed(b, scope, column, new ReadOnlySpan<Byte>(value));
}
//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
@@ -170,7 +170,7 @@ public final class LayoutBinary extends LayoutType<byte[]> implements ILayoutSpa
}
@Override
public Result writeSparse(Reference<RowBuffer> b, Reference<RowCursor> edit, byte[] value) {
public Result writeSparse(RowBuffer b, RowCursor edit, byte[] value) {
return writeSparse(b, edit, value, UpdateOptions.Upsert);
}
@@ -179,7 +179,7 @@ public final class LayoutBinary extends LayoutType<byte[]> implements ILayoutSpa
// UpdateOptions options = UpdateOptions.Upsert)
//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
@Override
public Result writeSparse(Reference<RowBuffer> b, Reference<RowCursor> edit, byte[] value,
public Result writeSparse(RowBuffer b, RowCursor edit, byte[] value,
UpdateOptions options) {
checkArgument(value != null);
//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
@@ -254,7 +254,7 @@ public final class LayoutBinary extends LayoutType<byte[]> implements ILayoutSpa
return Result.TooBig;
}
boolean exists = b.get().ReadBit(scope.get().start(), col.getNullBit().clone());
boolean exists = b.get().readBit(scope.get().start(), col.getNullBit().clone());
int varOffset = b.get().computeVariableValueOffset(scope.get().layout(), scope.get().start(),
col.getOffset());
int shift;
@@ -282,7 +282,7 @@ public final class LayoutBinary extends LayoutType<byte[]> implements ILayoutSpa
return Result.TooBig;
}
boolean exists = b.get().ReadBit(scope.get().start(), col.getNullBit().clone());
boolean exists = b.get().readBit(scope.get().start(), col.getNullBit().clone());
int varOffset = b.get().computeVariableValueOffset(scope.get().layout(), scope.get().start(),
col.getOffset());
int shift;

View File

@@ -5,19 +5,12 @@ package com.azure.data.cosmos.serialization.hybridrow.layouts;
import static com.google.common.base.Preconditions.checkArgument;
//C# TO JAVA CONVERTER WARNING: Java does not allow user-defined value types. The behavior of this class may differ
// from the original:
//ORIGINAL LINE: public readonly struct LayoutBit : IEquatable<LayoutBit>
//C# TO JAVA CONVERTER WARNING: Java has no equivalent to the C# readonly struct:
public final class LayoutBit implements IEquatable<LayoutBit> {
public final class LayoutBit {
/**
* The empty bit.
*/
public static final LayoutBit Invalid = new LayoutBit(-1);
public static final LayoutBit INVALID = new LayoutBit(-1);
/**
* The 0-based offset into the layout bitmask.
*/
private int index;
/**
@@ -25,58 +18,50 @@ public final class LayoutBit implements IEquatable<LayoutBit> {
*
* @param index The 0-based offset into the layout bitmask.
*/
public LayoutBit() {
}
public LayoutBit(int index) {
checkArgument(index >= -1);
this.index = index;
}
/**
* Compute the division rounding up to the next whole number.
* Compute the division rounding up to the next whole number
*
* @param numerator The numerator to divide.
* @param divisor The divisor to divide by.
* @return The ceiling(numerator/divisor).
*/
public static int DivCeiling(int numerator, int divisor) {
public static int divCeiling(int numerator, int divisor) {
return (numerator + (divisor - 1)) / divisor;
}
/**
* Returns the 0-based bit from the beginning of the byte that contains this bit.
* Also see {@link GetOffset} to identify relevant byte.
* Zero-based bit from the beginning of the byte that contains this bit
* <p>
* Also see {@link #offset} to identify relevant byte.
*
* @return The bit of the byte within the bitmask.
*/
// TODO: C# TO JAVA CONVERTER: Java annotations will not correspond to .NET attributes:
//ORIGINAL LINE: [MethodImpl(MethodImplOptions.AggressiveInlining)] public int GetBit()
public int GetBit() {
return this.index % LayoutType.BitsPerByte;
public int bit() {
return this.index() % LayoutTypes.BitsPerByte;
}
/**
* Returns the 0-based byte offset from the beginning of the row or scope that contains the
* bit from the bitmask.
* Zero-based offset into the layout bitmask
*/
public int index() {
return this.index;
}
/**
* Returns the zero-based byte offset from the beginning of the row or scope that contains the bit from the bitmask
* <p>
* Also see {@link GetBit} to identify.
* Also see {@link #bit} to identify.
*
* @param offset The byte offset from the beginning of the row where the scope begins.
* @return The byte offset containing this bit.
*/
// TODO: C# TO JAVA CONVERTER: Java annotations will not correspond to .NET attributes:
//ORIGINAL LINE: [MethodImpl(MethodImplOptions.AggressiveInlining)] public int GetOffset(int offset)
public int GetOffset(int offset) {
return offset + (this.index / LayoutType.BitsPerByte);
}
public LayoutBit clone() {
LayoutBit varCopy = new LayoutBit();
varCopy.index = this.index;
return varCopy;
public int offset(int offset) {
return offset + (this.index() / LayoutTypes.BitsPerByte);
}
@Override
@@ -84,45 +69,19 @@ public final class LayoutBit implements IEquatable<LayoutBit> {
return other instanceof LayoutBit && this.equals((LayoutBit)other);
}
// TODO: C# TO JAVA CONVERTER: Java annotations will not correspond to .NET attributes:
//ORIGINAL LINE: [MethodImpl(MethodImplOptions.AggressiveInlining)] public bool Equals(LayoutBit other)
public boolean equals(LayoutBit other) {
return this.index == other.index;
return other != null && this.index() == other.index();
}
@Override
public int hashCode() {
return (new Integer(this.index)).hashCode();
return Integer.valueOf(this.index()).hashCode();
}
// TODO: C# TO JAVA CONVERTER: Java annotations will not correspond to .NET attributes:
//ORIGINAL LINE: [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool operator ==(LayoutBit
// left, LayoutBit right)
public static boolean opEquals(LayoutBit left, LayoutBit right) {
return left.equals(right.clone());
}
// TODO: C# TO JAVA CONVERTER: Java annotations will not correspond to .NET attributes:
//ORIGINAL LINE: [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool operator !=(LayoutBit
// left, LayoutBit right)
public static boolean opNotEquals(LayoutBit left, LayoutBit right) {
return !LayoutBit.opEquals(left.clone(), right.clone());
}
/**
* The 0-based offset into the layout bitmask.
*/
int getIndex()
/**
* The 0-based offset into the layout bitmask.
*/
boolean getIsInvalid()
/**
* Allocates layout bits from a bitmask.
*/
public static class Allocator {
static class Allocator {
/**
* The next bit to allocate.
*/
@@ -139,7 +98,7 @@ public final class LayoutBit implements IEquatable<LayoutBit> {
* The number of bytes needed to hold all bits so far allocated.
*/
public final int getNumBytes() {
return LayoutBit.DivCeiling(this.next, LayoutType.BitsPerByte);
return LayoutBit.divCeiling(this.next, LayoutTypes.BitsPerByte);
}
/**

View File

@@ -29,20 +29,20 @@ public final class LayoutBoolean extends LayoutType<Boolean> {
}
@Override
public Result readFixed(Reference<RowBuffer> b, Reference<RowCursor> scope, LayoutColumn col,
public Result readFixed(RowBuffer b, RowCursor scope, LayoutColumn column,
Out<Boolean> value) {
checkArgument(scope.get().scopeType() instanceof LayoutUDT);
if (!b.get().ReadBit(scope.get().start(), col.getNullBit().clone())) {
if (!b.get().readBit(scope.get().start(), column.getNullBit().clone())) {
value.setAndGet(false);
return Result.NotFound;
}
value.setAndGet(b.get().ReadBit(scope.get().start(), col.getBoolBit().clone()));
value.setAndGet(b.get().readBit(scope.get().start(), column.getBooleanBit().clone()));
return Result.Success;
}
@Override
public Result readSparse(Reference<RowBuffer> b, Reference<RowCursor> edit,
public Result readSparse(RowBuffer b, RowCursor edit,
Out<Boolean> value) {
Result result = LayoutType.prepareSparseRead(b, edit, this.LayoutCode);
if (result != Result.Success) {
@@ -63,9 +63,9 @@ public final class LayoutBoolean extends LayoutType<Boolean> {
}
if (value) {
b.get().SetBit(scope.get().start(), col.getBoolBit().clone());
b.get().SetBit(scope.get().start(), col.getBooleanBit().clone());
} else {
b.get().UnsetBit(scope.get().start(), col.getBoolBit().clone());
b.get().UnsetBit(scope.get().start(), col.getBooleanBit().clone());
}
b.get().SetBit(scope.get().start(), col.getNullBit().clone());

View File

@@ -12,12 +12,12 @@ import java.util.Stack;
import static com.google.common.base.Preconditions.checkArgument;
public final class LayoutBuilder {
private LayoutBit.Allocator bitallocator;
private LayoutBit.Allocator bitAllocator;
private ArrayList<LayoutColumn> fixedColumns;
private int fixedCount;
private int fixedSize;
private String name;
private SchemaId schemaId = new SchemaId();
private SchemaId schemaId;
private Stack<LayoutColumn> scope;
private ArrayList<LayoutColumn> sparseColumns;
private int sparseCount;
@@ -32,112 +32,103 @@ public final class LayoutBuilder {
// ]
public LayoutBuilder(String name, SchemaId schemaId) {
this.name = name;
this.schemaId = schemaId.clone();
this.Reset();
this.schemaId = schemaId;
this.reset();
}
public void AddFixedColumn(String path, LayoutType type, boolean nullable) {
AddFixedColumn(path, type, nullable, 0);
}
public void addFixedColumn(String path, LayoutType type, boolean nullable, int length) {
//C# TO JAVA CONVERTER NOTE: Java does not support optional parameters. Overloaded method(s) are created above:
//ORIGINAL LINE: public void AddFixedColumn(string path, LayoutType type, bool nullable, int length = 0)
public void AddFixedColumn(String path, LayoutType type, boolean nullable, int length) {
checkArgument(length >= 0);
checkArgument(!type.getIsVarint());
checkArgument(!type.isVarint());
LayoutColumn col;
if (type.getIsNull()) {
LayoutColumn column;
if (type.isNull()) {
checkArgument(nullable);
LayoutBit nullbit = this.bitallocator.Allocate().clone();
col = new LayoutColumn(path, type, TypeArgumentList.EMPTY, StorageKind.Fixed, this.getParent(),
this.fixedCount, 0, nullbit.clone(), LayoutBit.Invalid, 0);
} else if (type.getIsBool()) {
LayoutBit nullbit = nullable ? this.bitallocator.Allocate() : LayoutBit.Invalid;
LayoutBit boolbit = this.bitallocator.Allocate().clone();
col = new LayoutColumn(path, type, TypeArgumentList.EMPTY, StorageKind.Fixed, this.getParent(),
this.fixedCount, 0, nullbit.clone(), boolbit.clone(), 0);
LayoutBit nullBit = this.bitAllocator.Allocate();
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(),
this.fixedCount, 0, nullBit, boolbit, 0);
} else {
LayoutBit nullBit = nullable ? this.bitallocator.Allocate() : LayoutBit.Invalid;
col = new LayoutColumn(path, type, TypeArgumentList.EMPTY, StorageKind.Fixed, this.getParent(),
this.fixedCount, this.fixedSize, nullBit.clone(), LayoutBit.Invalid, length);
LayoutBit nullBit = nullable ? this.bitAllocator.Allocate() : LayoutBit.INVALID;
column = new LayoutColumn(path, type, TypeArgumentList.EMPTY, StorageKind.Fixed, this.parent(),
this.fixedCount, this.fixedSize, nullBit, LayoutBit.INVALID, length);
this.fixedSize += type.getIsFixed() ? type.Size : length;
this.fixedSize += type.isFixed() ? type.size() : length;
}
this.fixedCount++;
this.fixedColumns.add(col);
this.fixedColumns.add(column);
}
public void AddObjectScope(String path, LayoutType type) {
LayoutColumn col = new LayoutColumn(path, type, TypeArgumentList.EMPTY, StorageKind.Sparse, this.getParent(),
this.sparseCount, -1, LayoutBit.Invalid, LayoutBit.Invalid, 0);
public void addObjectScope(String path, LayoutType type) {
LayoutColumn column = new LayoutColumn(path, type, TypeArgumentList.EMPTY, StorageKind.Sparse, this.parent(),
this.sparseCount, -1, LayoutBit.INVALID, LayoutBit.INVALID, 0);
this.sparseCount++;
this.sparseColumns.add(col);
this.scope.push(col);
this.sparseColumns.add(column);
this.scope.push(column);
}
public void AddSparseColumn(String path, LayoutType type) {
LayoutColumn col = new LayoutColumn(path, type, TypeArgumentList.EMPTY, StorageKind.Sparse, this.getParent(),
this.sparseCount, -1, LayoutBit.Invalid, LayoutBit.Invalid, 0);
public void addSparseColumn(String path, LayoutType type) {
LayoutColumn column = new LayoutColumn(path, type, TypeArgumentList.EMPTY, StorageKind.Sparse, this.parent(),
this.sparseCount, -1, LayoutBit.INVALID, LayoutBit.INVALID, 0);
this.sparseCount++;
this.sparseColumns.add(column);
}
public void addTypedScope(String path, LayoutType type, TypeArgumentList typeArgs) {
LayoutColumn col = new LayoutColumn(path, type, typeArgs, StorageKind.Sparse, this.parent(), this.sparseCount,
-1, LayoutBit.INVALID, LayoutBit.INVALID, 0);
this.sparseCount++;
this.sparseColumns.add(col);
}
public void AddTypedScope(String path, LayoutType type, TypeArgumentList typeArgs) {
LayoutColumn col = new LayoutColumn(path, type, typeArgs.clone(), StorageKind.Sparse, this.getParent(),
this.sparseCount, -1, LayoutBit.Invalid, LayoutBit.Invalid, 0);
this.sparseCount++;
this.sparseColumns.add(col);
}
//C# TO JAVA CONVERTER NOTE: Java does not support optional parameters. Overloaded method(s) are created above:
//ORIGINAL LINE: public void AddVariableColumn(string path, LayoutType type, int length = 0)
public void AddVariableColumn(String path, LayoutType type, int length) {
public void addVariableColumn(String path, LayoutType type, int length) {
checkArgument(length >= 0);
checkArgument(type.getAllowVariable());
checkArgument(type.allowVariable());
LayoutColumn col = new LayoutColumn(path, type, TypeArgumentList.EMPTY, StorageKind.Variable,
this.getParent(), this.varCount, this.varCount, this.bitallocator.Allocate().clone(), LayoutBit.Invalid,
length);
LayoutColumn column = new LayoutColumn(path, type, TypeArgumentList.EMPTY, StorageKind.Variable, this.parent(),
this.varCount, this.varCount, this.bitAllocator.Allocate(), LayoutBit.INVALID, length);
this.varCount++;
this.varColumns.add(col);
this.varColumns.add(column);
}
public void AddVariableColumn(String path, LayoutType type) {
AddVariableColumn(path, type, 0);
}
public Layout Build() {
public Layout build() {
// Compute offset deltas. Offset bools by the present byte count, and fixed fields by the sum of the present
// and bool count.
int fixedDelta = this.bitallocator.getNumBytes();
int fixedDelta = this.bitAllocator.getNumBytes();
int varIndexDelta = this.fixedCount;
// Update the fixedColumns with the delta before freezing them.
ArrayList<LayoutColumn> updatedColumns =
new ArrayList<LayoutColumn>(this.fixedColumns.size() + this.varColumns.size());
for (LayoutColumn c : this.fixedColumns) {
c.SetOffset(c.getOffset() + fixedDelta);
updatedColumns.add(c);
for (LayoutColumn column : this.fixedColumns) {
column.offset(column.offset() + fixedDelta);
updatedColumns.add(column);
}
for (LayoutColumn c : this.varColumns) {
for (LayoutColumn column : this.varColumns) {
// Adjust variable column indexes such that they begin immediately following the last fixed column.
c.SetIndex(c.getIndex() + varIndexDelta);
updatedColumns.add(c);
column.index(column.index() + varIndexDelta);
updatedColumns.add(column);
}
updatedColumns.addAll(this.sparseColumns);
Layout layout = new Layout(this.name, this.schemaId.clone(), this.bitallocator.getNumBytes(), this.fixedSize + fixedDelta, updatedColumns);
this.Reset();
Layout layout = new Layout(this.name, this.schemaId, this.bitAllocator.getNumBytes(), this.fixedSize + fixedDelta, updatedColumns);
this.reset();
return layout;
}
@@ -146,7 +137,7 @@ public final class LayoutBuilder {
this.scope.pop();
}
private LayoutColumn getParent() {
private LayoutColumn parent() {
if (this.scope.empty()) {
return null;
}
@@ -154,8 +145,8 @@ public final class LayoutBuilder {
return this.scope.peek();
}
private void Reset() {
this.bitallocator = new LayoutBit.Allocator();
private void reset() {
this.bitAllocator = new LayoutBit.Allocator();
this.fixedSize = 0;
this.fixedCount = 0;
this.fixedColumns = new ArrayList<LayoutColumn>();

View File

@@ -6,235 +6,205 @@ package com.azure.data.cosmos.serialization.hybridrow.layouts;
import com.azure.data.cosmos.core.Utf8String;
import com.azure.data.cosmos.serialization.hybridrow.schemas.StorageKind;
import javax.annotation.Nonnull;
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Strings.lenientFormat;
public final class LayoutColumn {
/**
* For bool fields, 0-based index into the bit mask for the bool value.
*/
private LayoutBit boolBit = new LayoutBit();
/**
* The full logical path of the field within the row.
*/
private Utf8String fullPath;
/**
* 0-based index of the column within the structure. Also indicates which presence bit
* controls this column.
*/
private final LayoutBit booleanBit;
private final Utf8String fullPath;
private final LayoutBit nullBit;
private final LayoutColumn parent;
private final Utf8String path;
private final int size;
private final StorageKind storage;
private final LayoutType type;
private final TypeArgument typeArg;
private final TypeArgumentList typeArgs;
private int index;
/**
* For nullable fields, the 0-based index into the bit mask for the null bit.
*/
private LayoutBit nullBit = new LayoutBit();
/**
* If {@link storage} equals {@link StorageKind.Fixed} then the byte offset to
* the field location.
* <para />
* If {@link storage} equals {@link StorageKind.Variable} then the 0-based index of the
* field from the beginning of the variable length segment.
* <para />
* For all other values of {@link storage}, {@link Offset} is ignored.
*/
private int offset;
/**
* The layout of the parent scope, if a nested column, otherwise null.
*/
private LayoutColumn parent;
/**
* The relative path of the field within its parent scope.
*/
private Utf8String path;
/**
* If {@link LayoutType.IsBool} then the 0-based extra index within the bool byte
* holding the value of this type, otherwise must be 0.
*/
private int size;
/**
* The storage kind of the field.
*/
private StorageKind storage = StorageKind.values()[0];
/**
* The physical layout type of the field.
*/
private LayoutType type;
/**
* The physical layout type of the field.
*/
private TypeArgument typeArg = new TypeArgument();
/**
* For types with generic parameters (e.g. {@link LayoutTuple}, the type parameters.
*/
private TypeArgumentList typeArgs = new TypeArgumentList();
/**
* Initializes a new instance of the {@link LayoutColumn} class.
* Initializes a new instance of the {@link LayoutColumn} class
*
* @param path The path to the field relative to parent scope.
* @param type Type of the field.
* @param storage Storage encoding of the field.
* @param parent The layout of the parent scope, if a nested column.
* @param index 0-based column index.
* @param offset 0-based Offset from beginning of serialization.
* @param nullBit 0-based index into the bit mask for the null bit.
* @param boolBit For bool fields, 0-based index into the bit mask for the bool value.
* @param length For variable length types the length, otherwise 0.
* @param typeArgs For types with generic parameters (e.g. {@link LayoutTuple}, the type
* parameters.
* @param path The path to the field relative to parent scope.
* @param type Type of the field.
* @param typeArgs For types with generic parameters (e.g. {@link LayoutTuple}, the type parameters.
* @param storage Storage encoding of the field.
* @param parent The layout of the parent scope, if a nested column.
* @param index zero-based column index.
* @param offset zero-based Offset from beginning of serialization.
* @param nullBit zero-based index into the bit mask for the null bit.
* @param booleanBit For bool fields, zero-based index into the bit mask for the boolean value.
* @param length For variable length types the length, otherwise {@code 0}.
*/
public LayoutColumn(
@Nonnull final String path, @Nonnull final LayoutType type, @Nonnull final TypeArgumentList typeArgs,
@Nonnull final StorageKind storage, final LayoutColumn parent, int index, int offset,
@Nonnull final LayoutBit nullBit, @Nonnull final LayoutBit booleanBit, int length) {
public LayoutColumn(String path, LayoutType type, TypeArgumentList typeArgs, StorageKind storage,
LayoutColumn parent, int index, int offset, LayoutBit nullBit, LayoutBit boolBit) {
this(path, type, typeArgs, storage, parent, index, offset, nullBit, boolBit, 0);
}
checkNotNull(path);
checkNotNull(type);
checkNotNull(typeArgs);
checkNotNull(storage);
checkNotNull(nullBit);
checkNotNull(booleanBit);
//C# TO JAVA CONVERTER NOTE: Java does not support optional parameters. Overloaded method(s) are created above:
//ORIGINAL LINE: internal LayoutColumn(string path, LayoutType type, TypeArgumentList typeArgs, StorageKind
// storage, LayoutColumn parent, int index, int offset, LayoutBit nullBit, LayoutBit boolBit, int length = 0)
public LayoutColumn(String path, LayoutType type, TypeArgumentList typeArgs, StorageKind storage,
LayoutColumn parent, int index, int offset, LayoutBit nullBit, LayoutBit boolBit, int length) {
this.path = Utf8String.TranscodeUtf16(path);
this.fullPath = Utf8String.TranscodeUtf16(LayoutColumn.GetFullPath(parent, path));
this.path = Utf8String.transcodeUtf16(path);
this.fullPath = Utf8String.transcodeUtf16(fullPath(parent, path));
this.type = type;
this.typeArgs = typeArgs.clone();
this.typeArg = new TypeArgument(type, typeArgs.clone());
this.typeArgs = typeArgs;
this.typeArg = new TypeArgument(type, typeArgs);
this.storage = storage;
this.parent = parent;
this.index = index;
this.offset = offset;
this.nullBit = nullBit.clone();
this.boolBit = boolBit.clone();
this.size = this.typeArg.type().getIsFixed() ? type.Size : length;
this.nullBit = nullBit;
this.booleanBit = booleanBit;
this.size = this.typeArg().type().isFixed() ? type.size() : length;
}
/**
* The full logical path of the field within the row.
* <p>
* Paths are expressed in dotted notation: e.g. a relative {@link Path} of 'b.c'
* within the scope 'a' yields a {@link FullPath} of 'a.b.c'.
* For bool fields, zero-based index into the bit mask for the bool value.
*/
public Utf8String getFullPath() {
public @Nonnull LayoutBit booleanBit() {
return this.booleanBit;
}
/**
* Full logical path of the field within the row
* <p>
* Paths are expressed in dotted notation: e.g. a relative {@link #path} of 'b.c' within the scope 'a' yields a
* {@link #fullPath} of 'a.b.c'.
*/
public @Nonnull Utf8String fullPath() {
return this.fullPath;
}
/**
* 0-based index of the column within the structure. Also indicates which presence bit
* controls this column.
* Zero-based index of the column within the structure
* <p>
* This value also indicates which presence bit controls this column.
*/
public int getIndex() {
public int index() {
return this.index;
}
/**
* The layout of the parent scope, if a nested column, otherwise null.
* For nullable fields, the zero-based index into the bit mask for the null bit
*/
public LayoutColumn getParent() {
public @Nonnull LayoutBit nullBit() {
return this.nullBit;
}
/**
* 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
* beginning of the variable length segment.
* <p>
* For all other values of {@link #storage}, {@link #offset} is ignored.
*/
public int offset() {
return this.offset;
}
/**
* Layout of the parent scope, if a nested column, otherwise null.
*/
public LayoutColumn parent() {
return this.parent;
}
/**
* The relative path of the field within its parent scope.
* <p>
* Paths are expressed in dotted notation: e.g. a relative {@link Path} of 'b.c'
* within the scope 'a' yields a {@link FullPath} of 'a.b.c'.
* Paths are expressed in dotted notation: e.g. a relative {@link #path} of 'b.c' within the scope 'a' yields a
* {@link #fullPath} of 'a.b.c'.
*/
public Utf8String getPath() {
public @Nonnull Utf8String path() {
return this.path;
}
/**
* If {@link LayoutType#isBoolean} then the zero-based extra index within the bool byte
* holding the value of this type, otherwise must be 0.
*/
public int size() {
return this.size;
}
/**
* The storage kind of the field.
*/
public StorageKind getStorage() {
public @Nonnull StorageKind storage() {
return this.storage;
}
/**
* The physical layout type of the field.
*/
public LayoutType getType() {
public @Nonnull LayoutType type() {
return this.type;
}
/**
* The full logical type.
* The full logical type
*/
public TypeArgument getTypeArg() {
return this.typeArg.clone();
public @Nonnull TypeArgument typeArg() {
return this.typeArg;
}
/**
* For types with generic parameters (e.g. {@link LayoutTuple}, the type parameters.
*/
public TypeArgumentList getTypeArgs() {
return this.typeArgs.clone();
}
public void SetIndex(int index) {
this.index = index;
}
public void SetOffset(int offset) {
this.offset = offset;
public @Nonnull TypeArgumentList typeArgs() {
return this.typeArgs;
}
/**
* The physical layout type of the field cast to the specified type.
*/
// TODO: C# TO JAVA CONVERTER: Java annotations will not correspond to .NET attributes:
//ORIGINAL LINE: [DebuggerHidden] public T TypeAs<T>() where T : ILayoutType
public <T extends ILayoutType> T TypeAs() {
return this.type.typeAs();
@SuppressWarnings("unchecked")
public @Nonnull <T extends ILayoutType> T typeAs() {
return (T) this.type().typeAs();
}
LayoutColumn index(int value) {
this.index = value;
return this;
}
LayoutColumn offset(int value) {
this.offset = value;
return this;
}
/**
* For bool fields, 0-based index into the bit mask for the bool value.
*/
LayoutBit getBoolBit()
/**
* For nullable fields, the the bit in the layout bitmask for the null bit.
*/
LayoutBit getNullBit()
/**
* If {@link storage} equals {@link StorageKind.Fixed} then the byte offset to
* the field location.
* <para />
* If {@link storage} equals {@link StorageKind.Variable} then the 0-based index of the
* field from the beginning of the variable length segment.
* <para />
* For all other values of {@link storage}, {@link Offset} is ignored.
*/
int getOffset()
/**
* If {@link storage} equals {@link StorageKind.Fixed} then the fixed number of
* bytes reserved for the value.
* <para />
* If {@link storage} equals {@link StorageKind.Variable} then the maximum number of
* bytes allowed for the value.
*/
int getSize()
/**
* Computes the full logical path to the column.
* Computes the full logical path to the column
*
* @param parent The layout of the parent scope, if a nested column, otherwise null.
* @param path The path to the field relative to parent scope.
* @return The full logical path.
* @param parent The layout of the parent scope, if a nested column, otherwise null
* @param path The path to the field relative to parent scope
* @return The full logical path
*/
private static String GetFullPath(LayoutColumn parent, String path) {
private static @Nonnull String fullPath(final LayoutColumn parent, @Nonnull final String path) {
if (parent != null) {
switch (LayoutCodeTraits.ClearImmutableBit(parent.type.LayoutCode)) {
switch (LayoutCodeTraits.ClearImmutableBit(parent.type().layoutCode())) {
case OBJECT_SCOPE:
case SCHEMA:
return parent.getFullPath().toString() + "." + path;
return parent.fullPath().toString() + "." + path;
case ARRAY_SCOPE:
case TYPED_ARRAY_SCOPE:
case TYPED_SET_SCOPE:
case TYPED_MAP_SCOPE:
return parent.getFullPath().toString() + "[]" + path;
return parent.fullPath().toString() + "[]" + path;
default:
throw new IllegalStateException(lenientFormat("Parent scope type not supported: %s", parent.type.LayoutCode));
return null;
final String message = lenientFormat("Parent scope type not supported: %s", parent.type().layoutCode());
throw new IllegalStateException(message);
}
}

View File

@@ -45,7 +45,7 @@ public final class LayoutCompiler {
LayoutBuilder builder = new LayoutBuilder(schema.getName(), schema.getSchemaId().clone());
LayoutCompiler.AddProperties(builder, ns, LayoutCode.SCHEMA, schema.getProperties());
return builder.Build();
return builder.build();
}
private static void AddProperties(LayoutBuilder builder, Namespace ns, LayoutCode scope,
@@ -63,7 +63,7 @@ public final class LayoutCompiler {
}
ObjectPropertyType op = (ObjectPropertyType)p.getPropertyType();
builder.AddObjectScope(p.getPath(), type);
builder.addObjectScope(p.getPath(), type);
LayoutCompiler.AddProperties(builder, ns, type.LayoutCode, op.getProperties());
builder.EndObjectScope();
break;
@@ -84,7 +84,7 @@ public final class LayoutCompiler {
throw new LayoutCompilationException("Non-nullable sparse column are not supported.");
}
builder.AddTypedScope(p.getPath(), type, typeArgs.clone());
builder.addTypedScope(p.getPath(), type, typeArgs.clone());
break;
}
@@ -109,7 +109,7 @@ public final class LayoutCompiler {
".");
}
builder.AddFixedColumn(p.getPath(), type, pp.getNullable(), pp.getLength());
builder.addFixedColumn(p.getPath(), type, pp.getNullable(), pp.getLength());
break;
case Variable:
if (LayoutCodeTraits.ClearImmutableBit(scope) != LayoutCode.SCHEMA) {
@@ -122,7 +122,7 @@ public final class LayoutCompiler {
"supported.");
}
builder.AddVariableColumn(p.getPath(), type, pp.getLength());
builder.addVariableColumn(p.getPath(), type, pp.getLength());
break;
case Sparse:
if (!pp.getNullable()) {
@@ -130,7 +130,7 @@ public final class LayoutCompiler {
"supported.");
}
builder.AddSparseColumn(p.getPath(), type);
builder.addSparseColumn(p.getPath(), type);
break;
default:
throw new LayoutCompilationException(String.format("Unknown storage specification: " +

View File

@@ -30,7 +30,7 @@ public final class LayoutDateTime extends LayoutType<DateTime> {
public Result ReadFixed(Reference<RowBuffer> b, Reference<RowCursor> scope, LayoutColumn col,
Out<LocalDateTime> value) {
checkArgument(scope.get().scopeType() instanceof LayoutUDT);
if (!b.get().ReadBit(scope.get().start(), col.getNullBit().clone())) {
if (!b.get().readBit(scope.get().start(), col.getNullBit().clone())) {
value.setAndGet(LocalDateTime.MIN);
return Result.NotFound;
}
@@ -80,7 +80,7 @@ public final class LayoutDateTime extends LayoutType<DateTime> {
}
@Override
public Result writeSparse(Reference<RowBuffer> b, Reference<RowCursor> edit, DateTime value) {
public Result writeSparse(RowBuffer b, RowCursor edit, DateTime value) {
return writeSparse(b, edit, value, UpdateOptions.Upsert);
}
}

View File

@@ -4,7 +4,6 @@
package com.azure.data.cosmos.serialization.hybridrow.layouts;
import com.azure.data.cosmos.core.Out;
import com.azure.data.cosmos.core.Reference;
import com.azure.data.cosmos.serialization.hybridrow.Result;
import com.azure.data.cosmos.serialization.hybridrow.RowBuffer;
import com.azure.data.cosmos.serialization.hybridrow.RowCursor;
@@ -28,20 +27,20 @@ public final class LayoutDecimal extends LayoutType<BigDecimal> {
}
@Override
public Result readFixed(Reference<RowBuffer> b, Reference<RowCursor> scope, LayoutColumn col,
public Result readFixed(RowBuffer b, RowCursor scope, LayoutColumn column,
Out<BigDecimal> value) {
checkArgument(scope.get().scopeType() instanceof LayoutUDT);
if (!b.get().ReadBit(scope.get().start(), col.getNullBit().clone())) {
if (!b.get().readBit(scope.get().start(), column.getNullBit().clone())) {
value.setAndGet(new BigDecimal(0));
return Result.NotFound;
}
value.setAndGet(b.get().ReadDecimal(scope.get().start() + col.getOffset()));
value.setAndGet(b.get().ReadDecimal(scope.get().start() + column.getOffset()));
return Result.Success;
}
@Override
public Result readSparse(Reference<RowBuffer> b, Reference<RowCursor> edit,
public Result readSparse(RowBuffer b, RowCursor edit,
Out<BigDecimal> value) {
Result result = LayoutType.prepareSparseRead(b, edit, this.LayoutCode);
if (result != Result.Success) {
@@ -54,15 +53,15 @@ public final class LayoutDecimal extends LayoutType<BigDecimal> {
}
@Override
public Result writeFixed(Reference<RowBuffer> b, Reference<RowCursor> scope, LayoutColumn col,
public Result writeFixed(RowBuffer b, RowCursor scope, LayoutColumn column,
BigDecimal value) {
checkArgument(scope.get().scopeType() instanceof LayoutUDT);
if (scope.get().immutable()) {
return Result.InsufficientPermissions;
}
b.get().WriteDecimal(scope.get().start() + col.getOffset(), value);
b.get().SetBit(scope.get().start(), col.getNullBit().clone());
b.get().WriteDecimal(scope.get().start() + column.getOffset(), value);
b.get().SetBit(scope.get().start(), column.getNullBit().clone());
return Result.Success;
}
@@ -70,7 +69,7 @@ public final class LayoutDecimal extends LayoutType<BigDecimal> {
//ORIGINAL LINE: public override Result WriteSparse(ref RowBuffer b, ref RowCursor edit, decimal value,
// UpdateOptions options = UpdateOptions.Upsert)
@Override
public Result writeSparse(Reference<RowBuffer> b, Reference<RowCursor> edit, BigDecimal value,
public Result writeSparse(RowBuffer b, RowCursor edit, BigDecimal value,
UpdateOptions options) {
Result result = LayoutType.prepareSparseWrite(b, edit, this.typeArg().clone(), options);
if (result != Result.Success) {
@@ -82,8 +81,8 @@ public final class LayoutDecimal extends LayoutType<BigDecimal> {
}
@Override
public Result writeSparse(Reference<RowBuffer> b, Reference<RowCursor> edit,
java.math.BigDecimal value) {
public Result writeSparse(RowBuffer b, RowCursor edit,
BigDecimal value) {
return writeSparse(b, edit, value, UpdateOptions.Upsert);
}
}

View File

@@ -4,7 +4,6 @@
package com.azure.data.cosmos.serialization.hybridrow.layouts;
import com.azure.data.cosmos.core.Out;
import com.azure.data.cosmos.core.Reference;
import com.azure.data.cosmos.serialization.hybridrow.Float128;
import com.azure.data.cosmos.serialization.hybridrow.Result;
import com.azure.data.cosmos.serialization.hybridrow.RowBuffer;
@@ -26,20 +25,20 @@ public final class LayoutFloat128 extends LayoutType<com.azure.data.cosmos.seria
}
@Override
public Result readFixed(Reference<RowBuffer> b, Reference<RowCursor> scope, LayoutColumn col,
public Result readFixed(RowBuffer b, RowCursor scope, LayoutColumn column,
Out<Float128> value) {
checkArgument(scope.get().scopeType() instanceof LayoutUDT);
if (!b.get().ReadBit(scope.get().start(), col.getNullBit().clone())) {
if (!b.get().readBit(scope.get().start(), column.getNullBit().clone())) {
value.setAndGet(null);
return Result.NotFound;
}
value.setAndGet(b.get().ReadFloat128(scope.get().start() + col.getOffset()).clone());
value.setAndGet(b.get().ReadFloat128(scope.get().start() + column.getOffset()).clone());
return Result.Success;
}
@Override
public Result readSparse(Reference<RowBuffer> b, Reference<RowCursor> edit,
public Result readSparse(RowBuffer b, RowCursor edit,
Out<Float128> value) {
Result result = LayoutType.prepareSparseRead(b, edit, this.LayoutCode);
if (result != Result.Success) {
@@ -52,15 +51,15 @@ public final class LayoutFloat128 extends LayoutType<com.azure.data.cosmos.seria
}
@Override
public Result writeFixed(Reference<RowBuffer> b, Reference<RowCursor> scope, LayoutColumn col,
public Result writeFixed(RowBuffer b, RowCursor scope, LayoutColumn column,
Float128 value) {
checkArgument(scope.get().scopeType() instanceof LayoutUDT);
if (scope.get().immutable()) {
return Result.InsufficientPermissions;
}
b.get().writeFloat128(scope.get().start() + col.getOffset(), value);
b.get().SetBit(scope.get().start(), col.getNullBit().clone());
b.get().writeFloat128(scope.get().start() + column.getOffset(), value);
b.get().SetBit(scope.get().start(), column.getNullBit().clone());
return Result.Success;
}
@@ -68,7 +67,7 @@ public final class LayoutFloat128 extends LayoutType<com.azure.data.cosmos.seria
//ORIGINAL LINE: public override Result WriteSparse(ref RowBuffer b, ref RowCursor edit, Float128 value,
// UpdateOptions options = UpdateOptions.Upsert)
@Override
public Result writeSparse(Reference<RowBuffer> b, Reference<RowCursor> edit, Float128 value,
public Result writeSparse(RowBuffer b, RowCursor edit, Float128 value,
UpdateOptions options) {
Result result = LayoutType.prepareSparseWrite(b, edit, this.typeArg().clone(), options);
if (result != Result.Success) {
@@ -80,7 +79,7 @@ public final class LayoutFloat128 extends LayoutType<com.azure.data.cosmos.seria
}
@Override
public Result writeSparse(Reference<RowBuffer> b, Reference<RowCursor> edit, Float128 value) {
public Result writeSparse(RowBuffer b, RowCursor edit, Float128 value) {
return writeSparse(b, edit, value, UpdateOptions.Upsert);
}
}

View File

@@ -25,20 +25,20 @@ public final class LayoutFloat32 extends LayoutType<Float> {
}
@Override
public Result readFixed(Reference<RowBuffer> b, Reference<RowCursor> scope, LayoutColumn col,
public Result readFixed(RowBuffer b, RowCursor scope, LayoutColumn column,
Out<Float> value) {
checkArgument(scope.get().scopeType() instanceof LayoutUDT);
if (!b.get().ReadBit(scope.get().start(), col.getNullBit().clone())) {
if (!b.get().readBit(scope.get().start(), column.getNullBit().clone())) {
value.setAndGet(0);
return Result.NotFound;
}
value.setAndGet(b.get().ReadFloat32(scope.get().start() + col.getOffset()));
value.setAndGet(b.get().ReadFloat32(scope.get().start() + column.getOffset()));
return Result.Success;
}
@Override
public Result readSparse(Reference<RowBuffer> b, Reference<RowCursor> edit,
public Result readSparse(RowBuffer b, RowCursor edit,
Out<Float> value) {
Result result = prepareSparseRead(b, edit, this.LayoutCode);
if (result != Result.Success) {

View File

@@ -25,20 +25,20 @@ public final class LayoutFloat64 extends LayoutType<Double> {
}
@Override
public Result readFixed(Reference<RowBuffer> b, Reference<RowCursor> scope, LayoutColumn col,
public Result readFixed(RowBuffer b, RowCursor scope, LayoutColumn column,
Out<Double> value) {
checkArgument(scope.get().scopeType() instanceof LayoutUDT);
if (!b.get().ReadBit(scope.get().start(), col.getNullBit().clone())) {
if (!b.get().readBit(scope.get().start(), column.getNullBit().clone())) {
value.setAndGet(0);
return Result.NotFound;
}
value.setAndGet(b.get().ReadFloat64(scope.get().start() + col.getOffset()));
value.setAndGet(b.get().ReadFloat64(scope.get().start() + column.getOffset()));
return Result.Success;
}
@Override
public Result readSparse(Reference<RowBuffer> b, Reference<RowCursor> edit,
public Result readSparse(RowBuffer b, RowCursor edit,
Out<Double> value) {
Result result = LayoutType.prepareSparseRead(b, edit, this.LayoutCode);
if (result != Result.Success) {

View File

@@ -4,7 +4,6 @@
package com.azure.data.cosmos.serialization.hybridrow.layouts;
import com.azure.data.cosmos.core.Out;
import com.azure.data.cosmos.core.Reference;
import com.azure.data.cosmos.serialization.hybridrow.Result;
import com.azure.data.cosmos.serialization.hybridrow.RowBuffer;
import com.azure.data.cosmos.serialization.hybridrow.RowCursor;
@@ -27,20 +26,20 @@ public final class LayoutGuid extends LayoutType<UUID> {
}
@Override
public Result readFixed(Reference<RowBuffer> b, Reference<RowCursor> scope, LayoutColumn col,
public Result readFixed(RowBuffer b, RowCursor scope, LayoutColumn column,
Out<UUID> value) {
checkArgument(scope.get().scopeType() instanceof LayoutUDT);
if (!b.get().ReadBit(scope.get().start(), col.getNullBit().clone())) {
if (!b.get().readBit(scope.get().start(), column.getNullBit().clone())) {
value.setAndGet(null);
return Result.NotFound;
}
value.setAndGet(b.get().ReadGuid(scope.get().start() + col.getOffset()));
value.setAndGet(b.get().ReadGuid(scope.get().start() + column.getOffset()));
return Result.Success;
}
@Override
public Result readSparse(Reference<RowBuffer> b, Reference<RowCursor> edit,
public Result readSparse(RowBuffer b, RowCursor edit,
Out<UUID> value) {
Result result = prepareSparseRead(b, edit, this.LayoutCode);
if (result != Result.Success) {
@@ -53,15 +52,15 @@ public final class LayoutGuid extends LayoutType<UUID> {
}
@Override
public Result writeFixed(Reference<RowBuffer> b, Reference<RowCursor> scope, LayoutColumn col,
public Result writeFixed(RowBuffer b, RowCursor scope, LayoutColumn column,
UUID value) {
checkArgument(scope.get().scopeType() instanceof LayoutUDT);
if (scope.get().immutable()) {
return Result.InsufficientPermissions;
}
b.get().WriteGuid(scope.get().start() + col.getOffset(), value);
b.get().SetBit(scope.get().start(), col.getNullBit().clone());
b.get().WriteGuid(scope.get().start() + column.getOffset(), value);
b.get().SetBit(scope.get().start(), column.getNullBit().clone());
return Result.Success;
}
@@ -69,7 +68,7 @@ public final class LayoutGuid extends LayoutType<UUID> {
//ORIGINAL LINE: public override Result WriteSparse(ref RowBuffer b, ref RowCursor edit, Guid value,
// UpdateOptions options = UpdateOptions.Upsert)
@Override
public Result writeSparse(Reference<RowBuffer> b, Reference<RowCursor> edit, UUID value,
public Result writeSparse(RowBuffer b, RowCursor edit, UUID value,
UpdateOptions options) {
Result result = prepareSparseWrite(b, edit, this.typeArg().clone(), options);
if (result != Result.Success) {
@@ -81,8 +80,8 @@ public final class LayoutGuid extends LayoutType<UUID> {
}
@Override
public Result writeSparse(Reference<RowBuffer> b, Reference<RowCursor> edit,
java.util.UUID value) {
public Result writeSparse(RowBuffer b, RowCursor edit,
UUID value) {
return writeSparse(b, edit, value, UpdateOptions.Upsert);
}
}

View File

@@ -14,10 +14,6 @@ public abstract class LayoutIndexedScope extends LayoutScope {
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, true, isFixedArity, isUniqueScope, isTypedScope);
}

View File

@@ -25,20 +25,20 @@ public final class LayoutInt16 extends LayoutType<Short> {
}
@Override
public Result readFixed(Reference<RowBuffer> b, Reference<RowCursor> scope, LayoutColumn col,
public Result readFixed(RowBuffer b, RowCursor scope, LayoutColumn column,
Out<Short> value) {
checkArgument(scope.get().scopeType() instanceof LayoutUDT);
if (!b.get().ReadBit(scope.get().start(), col.getNullBit().clone())) {
if (!b.get().readBit(scope.get().start(), column.getNullBit().clone())) {
value.setAndGet(0);
return Result.NotFound;
}
value.setAndGet(b.get().ReadInt16(scope.get().start() + col.getOffset()));
value.setAndGet(b.get().ReadInt16(scope.get().start() + column.getOffset()));
return Result.Success;
}
@Override
public Result readSparse(Reference<RowBuffer> b, Reference<RowCursor> edit,
public Result readSparse(RowBuffer b, RowCursor edit,
Out<Short> value) {
Result result = prepareSparseRead(b, edit, this.LayoutCode);
if (result != Result.Success) {

View File

@@ -25,20 +25,20 @@ public final class LayoutInt32 extends LayoutType<Integer> {
}
@Override
public Result readFixed(Reference<RowBuffer> b, Reference<RowCursor> scope, LayoutColumn col,
public Result readFixed(RowBuffer b, RowCursor scope, LayoutColumn column,
Out<Integer> value) {
checkArgument(scope.get().scopeType() instanceof LayoutUDT);
if (!b.get().ReadBit(scope.get().start(), col.getNullBit().clone())) {
if (!b.get().readBit(scope.get().start(), column.getNullBit().clone())) {
value.setAndGet(0);
return Result.NotFound;
}
value.setAndGet(b.get().ReadInt32(scope.get().start() + col.getOffset()));
value.setAndGet(b.get().ReadInt32(scope.get().start() + column.getOffset()));
return Result.Success;
}
@Override
public Result readSparse(Reference<RowBuffer> b, Reference<RowCursor> edit,
public Result readSparse(RowBuffer b, RowCursor edit,
Out<Integer> value) {
Result result = LayoutType.prepareSparseRead(b, edit, this.LayoutCode);
if (result != Result.Success) {

View File

@@ -25,20 +25,20 @@ public final class LayoutInt64 extends LayoutType<Long> {
}
@Override
public Result readFixed(Reference<RowBuffer> b, Reference<RowCursor> scope, LayoutColumn col,
public Result readFixed(RowBuffer b, RowCursor scope, LayoutColumn column,
Out<Long> value) {
checkArgument(scope.get().scopeType() instanceof LayoutUDT);
if (!b.get().ReadBit(scope.get().start(), col.getNullBit().clone())) {
if (!b.get().readBit(scope.get().start(), column.getNullBit().clone())) {
value.setAndGet(0);
return Result.NotFound;
}
value.setAndGet(b.get().ReadInt64(scope.get().start() + col.getOffset()));
value.setAndGet(b.get().ReadInt64(scope.get().start() + column.getOffset()));
return Result.Success;
}
@Override
public Result readSparse(Reference<RowBuffer> b, Reference<RowCursor> edit,
public Result readSparse(RowBuffer b, RowCursor edit,
Out<Long> value) {
Result result = LayoutType.prepareSparseRead(b, edit, this.LayoutCode);
if (result != Result.Success) {

View File

@@ -25,20 +25,20 @@ public final class LayoutInt8 extends LayoutType<Byte> {
}
@Override
public Result readFixed(Reference<RowBuffer> b, Reference<RowCursor> scope, LayoutColumn col,
public Result readFixed(RowBuffer b, RowCursor scope, LayoutColumn column,
Out<Byte> value) {
checkArgument(scope.get().scopeType() instanceof LayoutUDT);
if (!b.get().ReadBit(scope.get().start(), col.getNullBit().clone())) {
if (!b.get().readBit(scope.get().start(), column.getNullBit().clone())) {
value.setAndGet(0);
return Result.NotFound;
}
value.setAndGet(b.get().ReadInt8(scope.get().start() + col.getOffset()));
value.setAndGet(b.get().ReadInt8(scope.get().start() + column.getOffset()));
return Result.Success;
}
@Override
public Result readSparse(Reference<RowBuffer> b, Reference<RowCursor> edit,
public Result readSparse(RowBuffer b, RowCursor edit,
Out<Byte> value) {
Result result = LayoutType.prepareSparseRead(b, edit, this.LayoutCode);
if (result != Result.Success) {

View File

@@ -4,7 +4,6 @@
package com.azure.data.cosmos.serialization.hybridrow.layouts;
import com.azure.data.cosmos.core.Out;
import com.azure.data.cosmos.core.Reference;
import com.azure.data.cosmos.serialization.hybridrow.Result;
import com.azure.data.cosmos.serialization.hybridrow.RowBuffer;
import com.azure.data.cosmos.serialization.hybridrow.RowCursor;
@@ -26,20 +25,20 @@ public final class LayoutMongoDbObjectId extends LayoutType<MongoDbObjectId> {
}
@Override
public Result readFixed(Reference<RowBuffer> b, Reference<RowCursor> scope, LayoutColumn col,
public Result readFixed(RowBuffer b, RowCursor scope, LayoutColumn column,
Out<MongoDbObjectId> value) {
checkArgument(scope.get().scopeType() instanceof LayoutUDT);
if (!b.get().ReadBit(scope.get().start(), col.getNullBit().clone())) {
if (!b.get().readBit(scope.get().start(), column.getNullBit().clone())) {
value.setAndGet(null);
return Result.NotFound;
}
value.setAndGet(b.get().ReadMongoDbObjectId(scope.get().start() + col.getOffset()).clone());
value.setAndGet(b.get().ReadMongoDbObjectId(scope.get().start() + column.getOffset()).clone());
return Result.Success;
}
@Override
public Result readSparse(Reference<RowBuffer> b, Reference<RowCursor> edit,
public Result readSparse(RowBuffer b, RowCursor edit,
Out<MongoDbObjectId> value) {
Result result = LayoutType.prepareSparseRead(b, edit, this.LayoutCode);
if (result != Result.Success) {
@@ -52,15 +51,15 @@ public final class LayoutMongoDbObjectId extends LayoutType<MongoDbObjectId> {
}
@Override
public Result writeFixed(Reference<RowBuffer> b, Reference<RowCursor> scope, LayoutColumn col,
public Result writeFixed(RowBuffer b, RowCursor scope, LayoutColumn column,
MongoDbObjectId value) {
checkArgument(scope.get().scopeType() instanceof LayoutUDT);
if (scope.get().immutable()) {
return Result.InsufficientPermissions;
}
b.get().WriteMongoDbObjectId(scope.get().start() + col.getOffset(), value.clone());
b.get().SetBit(scope.get().start(), col.getNullBit().clone());
b.get().WriteMongoDbObjectId(scope.get().start() + column.getOffset(), value.clone());
b.get().SetBit(scope.get().start(), column.getNullBit().clone());
return Result.Success;
}
@@ -68,7 +67,7 @@ public final class LayoutMongoDbObjectId extends LayoutType<MongoDbObjectId> {
//ORIGINAL LINE: public override Result WriteSparse(ref RowBuffer b, ref RowCursor edit, MongoDbObjectId value,
// UpdateOptions options = UpdateOptions.Upsert)
@Override
public Result writeSparse(Reference<RowBuffer> b, Reference<RowCursor> edit,
public Result writeSparse(RowBuffer b, RowCursor edit,
MongoDbObjectId value, UpdateOptions options) {
Result result = LayoutType.prepareSparseWrite(b, edit, this.typeArg().clone(), options);
if (result != Result.Success) {
@@ -80,7 +79,7 @@ public final class LayoutMongoDbObjectId extends LayoutType<MongoDbObjectId> {
}
@Override
public Result writeSparse(Reference<RowBuffer> b, Reference<RowCursor> edit,
public Result writeSparse(RowBuffer b, RowCursor edit,
MongoDbObjectId value) {
return writeSparse(b, edit, value, UpdateOptions.Upsert);
}

View File

@@ -4,7 +4,6 @@
package com.azure.data.cosmos.serialization.hybridrow.layouts;
import com.azure.data.cosmos.core.Out;
import com.azure.data.cosmos.core.Reference;
import com.azure.data.cosmos.serialization.hybridrow.NullValue;
import com.azure.data.cosmos.serialization.hybridrow.Result;
import com.azure.data.cosmos.serialization.hybridrow.RowBuffer;
@@ -30,11 +29,11 @@ public final class LayoutNull extends LayoutType<NullValue> {
}
@Override
public Result readFixed(Reference<RowBuffer> b, Reference<RowCursor> scope, LayoutColumn col,
public Result readFixed(RowBuffer b, RowCursor scope, LayoutColumn column,
Out<NullValue> value) {
checkArgument(scope.get().scopeType() instanceof LayoutUDT);
value.setAndGet(NullValue.Default);
if (!b.get().ReadBit(scope.get().start(), col.getNullBit().clone())) {
if (!b.get().readBit(scope.get().start(), column.getNullBit().clone())) {
return Result.NotFound;
}
@@ -42,7 +41,7 @@ public final class LayoutNull extends LayoutType<NullValue> {
}
@Override
public Result readSparse(Reference<RowBuffer> b, Reference<RowCursor> edit,
public Result readSparse(RowBuffer b, RowCursor edit,
Out<NullValue> value) {
Result result = prepareSparseRead(b, edit, this.LayoutCode);
if (result != Result.Success) {
@@ -55,14 +54,14 @@ public final class LayoutNull extends LayoutType<NullValue> {
}
@Override
public Result writeFixed(Reference<RowBuffer> b, Reference<RowCursor> scope, LayoutColumn col,
public Result writeFixed(RowBuffer b, RowCursor scope, LayoutColumn column,
NullValue value) {
checkArgument(scope.get().scopeType() instanceof LayoutUDT);
if (scope.get().immutable()) {
return Result.InsufficientPermissions;
}
b.get().SetBit(scope.get().start(), col.getNullBit().clone());
b.get().SetBit(scope.get().start(), column.getNullBit().clone());
return Result.Success;
}
@@ -70,7 +69,7 @@ public final class LayoutNull extends LayoutType<NullValue> {
//ORIGINAL LINE: public override Result WriteSparse(ref RowBuffer b, ref RowCursor edit, NullValue value,
// UpdateOptions options = UpdateOptions.Upsert)
@Override
public Result writeSparse(Reference<RowBuffer> b, Reference<RowCursor> edit, NullValue value,
public Result writeSparse(RowBuffer b, RowCursor edit, NullValue value,
UpdateOptions options) {
Result result = prepareSparseWrite(b, edit, this.typeArg().clone(), options);
if (result != Result.Success) {
@@ -82,7 +81,7 @@ public final class LayoutNull extends LayoutType<NullValue> {
}
@Override
public Result writeSparse(Reference<RowBuffer> b, Reference<RowCursor> edit, NullValue value) {
public Result writeSparse(RowBuffer b, RowCursor edit, NullValue value) {
return writeSparse(b, edit, value, UpdateOptions.Upsert);
}
}

View File

@@ -95,7 +95,7 @@ public final class LayoutNullable extends LayoutIndexedScope {
@Override
public int writeTypeArgument(Reference<RowBuffer> row, int offset, TypeArgumentList value) {
checkState(value.count() == 1);
row.get().WriteSparseTypeCode(offset, this.LayoutCode);
row.get().writeSparseTypeCode(offset, this.LayoutCode);
int lenInBytes = (com.azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.SIZE / Byte.SIZE);
lenInBytes += value.get(0).type().writeTypeArgument(row, offset + lenInBytes,
value.get(0).typeArgs().clone());

View File

@@ -71,15 +71,15 @@ public abstract class LayoutScope extends LayoutType {
return this.isUniqueScope;
}
public final Result DeleteScope(Reference<RowBuffer> b, Reference<RowCursor> edit) {
public final Result deleteScope(@Nonnull final RowBuffer b, @Nonnull final RowCursor edit) {
Result result = LayoutType.prepareSparseDelete(b, edit, this.LayoutCode);
Result result = LayoutType.prepareSparseDelete(b, edit, this.layoutCode());
if (result != Result.Success) {
return result;
}
b.get().deleteSparse(edit);
b.deleteSparse(edit);
return Result.Success;
}
@@ -161,7 +161,7 @@ public abstract class LayoutScope extends LayoutType {
r = func == null ? null : func.Invoke(ref b, ref childScope, context) ??Result.Success;
childScope = tempReference_childScope.get();
if (r != Result.Success) {
this.DeleteScope(b, scope);
this.deleteScope(b, scope);
return r;
}

View File

@@ -73,7 +73,7 @@ public final class LayoutTagged extends LayoutIndexedScope {
@Override
public int writeTypeArgument(Reference<RowBuffer> row, int offset, TypeArgumentList value) {
checkArgument(value.count() == 2);
row.get().WriteSparseTypeCode(offset, this.LayoutCode);
row.get().writeSparseTypeCode(offset, this.LayoutCode);
int lenInBytes = (com.azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.SIZE / Byte.SIZE);
lenInBytes += value.get(1).type().writeTypeArgument(row, offset + lenInBytes,
value.get(1).typeArgs().clone());

View File

@@ -86,7 +86,7 @@ public final class LayoutTagged2 extends LayoutIndexedScope {
@Override
public int writeTypeArgument(Reference<RowBuffer> row, int offset, TypeArgumentList value) {
checkState(value.count() == 3);
row.get().WriteSparseTypeCode(offset, this.LayoutCode);
row.get().writeSparseTypeCode(offset, this.LayoutCode);
int lenInBytes = (com.azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.SIZE / Byte.SIZE);
for (int i = 1; i < value.count(); i++) {
TypeArgument arg = value.get(i).clone();

View File

@@ -73,7 +73,7 @@ public final class LayoutTuple extends LayoutIndexedScope {
@Override
public int writeTypeArgument(Reference<RowBuffer> row, int offset, TypeArgumentList value) {
row.get().WriteSparseTypeCode(offset, this.LayoutCode);
row.get().writeSparseTypeCode(offset, this.LayoutCode);
int lenInBytes = (com.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);

View File

@@ -9,6 +9,8 @@ import com.azure.data.cosmos.serialization.hybridrow.Result;
import com.azure.data.cosmos.serialization.hybridrow.RowBuffer;
import com.azure.data.cosmos.serialization.hybridrow.RowCursor;
import javax.annotation.Nonnull;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Strings.lenientFormat;
@@ -92,20 +94,20 @@ public abstract class LayoutType<T> implements ILayoutType {
return (com.azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.SIZE / Byte.SIZE);
}
public final Result deleteFixed(Reference<RowBuffer> b, Reference<RowCursor> scope, LayoutColumn col) {
public final Result deleteFixed(RowBuffer b, RowCursor scope, LayoutColumn column) {
checkArgument(scope.get().scopeType() instanceof LayoutUDT);
checkArgument(scope.scopeType() instanceof LayoutUDT);
if (scope.get().immutable()) {
if (scope.immutable()) {
return Result.InsufficientPermissions;
}
if (col.getNullBit().getIsInvalid()) {
if (column.nullBit().isInvalid()) {
// Cannot delete a non-nullable fixed column.
return Result.TypeMismatch;
}
b.get().UnsetBit(scope.get().start(), col.getNullBit().clone());
b.UnsetBit(scope.start(), column.nullBit());
return Result.Success;
}
@@ -114,8 +116,10 @@ public abstract class LayoutType<T> implements ILayoutType {
* <p>
* If a value exists, then it is removed. The remainder of the row is resized to accomodate
* a decrease in required space. If no value exists this operation is a no-op.
* @param b
* @param edit
*/
public final Result deleteSparse(Reference<RowBuffer> b, Reference<RowCursor> edit) {
public final Result deleteSparse(RowBuffer b, RowCursor edit) {
Result result = LayoutType.prepareSparseDelete(b, edit, this.layoutCode());
@@ -123,7 +127,7 @@ public abstract class LayoutType<T> implements ILayoutType {
return result;
}
b.get().deleteSparse(edit);
b.deleteSparse(edit);
return Result.Success;
}
@@ -133,21 +137,20 @@ public abstract class LayoutType<T> implements ILayoutType {
* If a value exists, then it is removed. The remainder of the row is resized to accommodate a decrease in
* required space. If no value exists this operation is a no-op.
*/
public final Result deleteVariable(Reference<RowBuffer> b, Reference<RowCursor> scope, LayoutColumn col) {
public final Result deleteVariable(RowBuffer b, RowCursor scope, LayoutColumn column) {
checkArgument(scope.get().scopeType() instanceof LayoutUDT);
checkArgument(scope.scopeType() instanceof LayoutUDT);
if (scope.get().immutable()) {
if (scope.immutable()) {
return Result.InsufficientPermissions;
}
boolean exists = b.get().ReadBit(scope.get().start(), col.getNullBit());
boolean exists = b.readBit(scope.start(), column.nullBit());
if (exists) {
int varOffset = b.get().computeVariableValueOffset(scope.get().layout(), scope.get().start(),
col.getOffset());
b.get().deleteVariable(varOffset, this.isVarint());
b.get().UnsetBit(scope.get().start(), col.getNullBit().clone());
int varOffset = b.computeVariableValueOffset(scope.layout(), scope.start(), column.offset());
b.deleteVariable(varOffset, this.isVarint());
b.UnsetBit(scope.start(), column.nullBit());
}
return Result.Success;
@@ -159,8 +162,8 @@ public abstract class LayoutType<T> implements ILayoutType {
return type;
}
public final Result hasValue(Reference<RowBuffer> b, Reference<RowCursor> scope, LayoutColumn col) {
if (!b.get().ReadBit(scope.get().start(), col.getNullBit().clone())) {
public final Result hasValue(RowBuffer b, RowCursor scope, LayoutColumn column) {
if (!b.readBit(scope.start(), column.nullBit())) {
return Result.NotFound;
}
return Result.Success;
@@ -186,16 +189,17 @@ public abstract class LayoutType<T> implements ILayoutType {
* @param code The expected type of the field.
* @return Success if the delete is permitted, the error code otherwise.
*/
public static Result prepareSparseDelete(Reference<RowBuffer> b, Reference<RowCursor> edit, LayoutCode code) {
if (edit.get().scopeType().isFixedArity()) {
public static Result prepareSparseDelete(RowBuffer b, RowCursor edit, LayoutCode code) {
if (edit.scopeType().isFixedArity()) {
return Result.TypeConstraint;
}
if (edit.get().immutable()) {
if (edit.immutable()) {
return Result.InsufficientPermissions;
}
if (edit.get().exists() && LayoutCodeTraits.Canonicalize(edit.get().cellType().layoutCode()) != code) {
if (edit.exists() && LayoutCodeTraits.Canonicalize(edit.cellType().layoutCode()) != code) {
return Result.TypeMismatch;
}
@@ -216,16 +220,16 @@ public abstract class LayoutType<T> implements ILayoutType {
* The source field is delete if the move prepare fails with a destination error.
*/
public static Result prepareSparseMove(
Reference<RowBuffer> b,
Reference<RowCursor> destinationScope,
RowBuffer b,
RowCursor destinationScope,
LayoutScope destinationCode,
TypeArgument elementType,
Reference<RowCursor> srcEdit,
RowCursor srcEdit,
UpdateOptions options,
Out<RowCursor> dstEdit
) {
checkArgument(destinationScope.get().scopeType() == destinationCode);
checkArgument(destinationScope.get().index() == 0, "Can only insert into a edit at the root");
checkArgument(destinationScope.scopeType() == destinationCode);
checkArgument(destinationScope.index() == 0, "Can only insert into a edit at the root");
// Prepare the delete of the source
Result result = LayoutType.prepareSparseDelete(b, srcEdit, elementType.type().layoutCode());
@@ -235,39 +239,39 @@ public abstract class LayoutType<T> implements ILayoutType {
return result;
}
if (!srcEdit.get().exists()) {
if (!srcEdit.exists()) {
dstEdit.setAndGet(null);
return Result.NotFound;
}
if (destinationScope.get().immutable()) {
b.get().deleteSparse(srcEdit);
if (destinationScope.immutable()) {
b.deleteSparse(srcEdit);
dstEdit.setAndGet(null);
return Result.InsufficientPermissions;
}
if (!srcEdit.get().cellTypeArgs().equals(elementType.typeArgs())) {
b.get().deleteSparse(srcEdit);
if (!srcEdit.cellTypeArgs().equals(elementType.typeArgs())) {
b.deleteSparse(srcEdit);
dstEdit.setAndGet(null);
return Result.TypeConstraint;
}
if (options == UpdateOptions.InsertAt) {
b.get().deleteSparse(srcEdit);
b.deleteSparse(srcEdit);
dstEdit.setAndGet(null);
return Result.TypeConstraint;
}
// Prepare the insertion at the destination.
dstEdit.setAndGet(b.get().PrepareSparseMove(destinationScope, srcEdit));
dstEdit.setAndGet(b.prepareSparseMove(destinationScope, srcEdit));
if ((options == UpdateOptions.Update) && (!dstEdit.get().exists())) {
b.get().deleteSparse(srcEdit);
b.deleteSparse(srcEdit);
dstEdit.setAndGet(null);
return Result.NotFound;
}
if ((options == UpdateOptions.Insert) && dstEdit.get().exists()) {
b.get().deleteSparse(srcEdit);
b.deleteSparse(srcEdit);
dstEdit.setAndGet(null);
return Result.Exists;
}
@@ -306,8 +310,9 @@ public abstract class LayoutType<T> implements ILayoutType {
* @return Success if the write is permitted, the error code otherwise.
*/
public static Result prepareSparseWrite(
RowBuffer b, RowCursor edit, TypeArgument typeArg, UpdateOptions options
) {
@Nonnull final RowBuffer b, @Nonnull final RowCursor edit, @Nonnull final TypeArgument typeArg,
@Nonnull final UpdateOptions options) {
if (edit.immutable() || (edit.scopeType().isUniqueScope() && !edit.deferUniqueIndex())) {
return Result.InsufficientPermissions;
}
@@ -343,12 +348,12 @@ public abstract class LayoutType<T> implements ILayoutType {
return Result.Success;
}
public abstract Result readFixed(Reference<RowBuffer> b, Reference<RowCursor> scope, LayoutColumn col, Out<T> value);
public abstract Result readFixed(RowBuffer b, RowCursor scope, LayoutColumn column, Out<T> value);
public abstract Result readSparse(Reference<RowBuffer> b, Reference<RowCursor> edit, Out<T> value);
public abstract Result readSparse(RowBuffer b, RowCursor edit, Out<T> value);
public static TypeArgument readTypeArgument(Reference<RowBuffer> row, int offset, Out<Integer> lenInBytes) {
LayoutType itemCode = row.get().ReadSparseTypeCode(offset);
public static TypeArgument readTypeArgument(RowBuffer row, int offset, Out<Integer> lenInBytes) {
LayoutType itemCode = row.readSparseTypeCode(offset);
int argsLenInBytes;
Out<Integer> tempOut_argsLenInBytes = new Out<Integer>();
TypeArgumentList itemTypeArgs = itemCode.readTypeArgumentList(row, offset + (com.azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.SIZE / Byte.SIZE), tempOut_argsLenInBytes);
@@ -357,12 +362,12 @@ public abstract class LayoutType<T> implements ILayoutType {
return new TypeArgument(itemCode, itemTypeArgs);
}
public TypeArgumentList readTypeArgumentList(Reference<RowBuffer> row, int offset, Out<Integer> lenInBytes) {
public TypeArgumentList readTypeArgumentList(RowBuffer row, int offset, Out<Integer> lenInBytes) {
lenInBytes.setAndGet(0);
return TypeArgumentList.EMPTY;
}
public Result readVariable(Reference<RowBuffer> b, Reference<RowCursor> scope, LayoutColumn col, Out<T> value) {
public Result readVariable(RowBuffer b, RowCursor scope, LayoutColumn column, Out<T> value) {
value.setAndGet(null);
return Result.Failure;
}
@@ -382,15 +387,15 @@ public abstract class LayoutType<T> implements ILayoutType {
return (Value)this;
}
public abstract Result writeFixed(Reference<RowBuffer> b, Reference<RowCursor> scope, LayoutColumn col, T value);
public abstract Result writeFixed(RowBuffer b, RowCursor scope, LayoutColumn column, T value);
public abstract Result writeSparse(Reference<RowBuffer> b, Reference<RowCursor> edit, T value);
public abstract Result writeSparse(RowBuffer b, RowCursor edit, T value);
public abstract Result writeSparse(Reference<RowBuffer> b, Reference<RowCursor> edit, T value, UpdateOptions options);
public abstract Result writeSparse(RowBuffer b, RowCursor edit, T value, UpdateOptions options);
public int writeTypeArgument(Reference<RowBuffer> row, int offset, TypeArgumentList value) {
row.get().WriteSparseTypeCode(offset, this.layoutCode());
return (com.azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.SIZE / Byte.SIZE);
public int writeTypeArgument(RowBuffer row, int offset, TypeArgumentList value) {
row.writeSparseTypeCode(offset, this.layoutCode());
return com.azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.SIZE / Byte.SIZE;
}
public Result writeVariable(Reference<RowBuffer> b, Reference<RowCursor> scope, LayoutColumn col, T value) {

View File

@@ -68,7 +68,7 @@ public final class LayoutTypedArray extends LayoutIndexedScope {
@Override
public int writeTypeArgument(Reference<RowBuffer> row, int offset, TypeArgumentList value) {
checkState(value.count() == 1);
row.get().WriteSparseTypeCode(offset, this.LayoutCode);
row.get().writeSparseTypeCode(offset, this.LayoutCode);
int lenInBytes = (com.azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.SIZE / Byte.SIZE);
lenInBytes += value.get(0).type().writeTypeArgument(row, offset + lenInBytes,
value.get(0).typeArgs().clone());

View File

@@ -89,7 +89,7 @@ public final class LayoutTypedMap extends LayoutUniqueScope {
@Override
public int writeTypeArgument(Reference<RowBuffer> row, int offset, TypeArgumentList value) {
checkState(value.count() == 2);
row.get().WriteSparseTypeCode(offset, this.LayoutCode);
row.get().writeSparseTypeCode(offset, this.LayoutCode);
int lenInBytes = (com.azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.SIZE / Byte.SIZE);
for (TypeArgument arg : value) {
lenInBytes += arg.type().writeTypeArgument(row, offset + lenInBytes, arg.typeArgs().clone());

View File

@@ -75,7 +75,7 @@ public final class LayoutTypedSet extends LayoutUniqueScope {
@Override
public int writeTypeArgument(Reference<RowBuffer> row, int offset, TypeArgumentList value) {
checkArgument(value.count() == 1);
row.get().WriteSparseTypeCode(offset, this.LayoutCode);
row.get().writeSparseTypeCode(offset, this.LayoutCode);
int lenInBytes = (com.azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.SIZE / Byte.SIZE);
lenInBytes += value.get(0).type().writeTypeArgument(row, offset + lenInBytes,
value.get(0).typeArgs().clone());

View File

@@ -86,7 +86,7 @@ public final class LayoutTypedTuple extends LayoutIndexedScope {
@Override
public int writeTypeArgument(Reference<RowBuffer> row, int offset, TypeArgumentList value) {
row.get().WriteSparseTypeCode(offset, this.LayoutCode);
row.get().writeSparseTypeCode(offset, this.LayoutCode);
int lenInBytes = (com.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);

View File

@@ -57,7 +57,7 @@ public final class LayoutUDT extends LayoutPropertyScope {
@Override
public int writeTypeArgument(Reference<RowBuffer> row, int offset, TypeArgumentList value) {
row.get().WriteSparseTypeCode(offset, this.LayoutCode);
row.get().writeSparseTypeCode(offset, this.LayoutCode);
row.get().WriteSchemaId(offset + (com.azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.SIZE / Byte.SIZE), value.schemaId().clone());
return (com.azure.data.cosmos.serialization.hybridrow.layouts.LayoutCode.SIZE / Byte.SIZE) + SchemaId.SIZE;
}

View File

@@ -30,22 +30,22 @@ public final class LayoutUInt16 extends LayoutType<Short> {
//ORIGINAL LINE: public override Result ReadFixed(ref RowBuffer b, ref RowCursor scope, LayoutColumn col, out
// ushort value)
@Override
public Result readFixed(Reference<RowBuffer> b, Reference<RowCursor> scope, LayoutColumn col,
public Result readFixed(RowBuffer b, RowCursor scope, LayoutColumn column,
Out<Short> value) {
checkArgument(scope.get().scopeType() instanceof LayoutUDT);
if (!b.get().ReadBit(scope.get().start(), col.getNullBit().clone())) {
if (!b.get().readBit(scope.get().start(), column.getNullBit().clone())) {
value.setAndGet(0);
return Result.NotFound;
}
value.setAndGet(b.get().ReadUInt16(scope.get().start() + col.getOffset()));
value.setAndGet(b.get().ReadUInt16(scope.get().start() + column.getOffset()));
return Result.Success;
}
//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
//ORIGINAL LINE: public override Result ReadSparse(ref RowBuffer b, ref RowCursor edit, out ushort value)
@Override
public Result readSparse(Reference<RowBuffer> b, Reference<RowCursor> edit,
public Result readSparse(RowBuffer b, RowCursor edit,
Out<Short> value) {
Result result = prepareSparseRead(b, edit, this.LayoutCode);
if (result != Result.Success) {

View File

@@ -30,22 +30,22 @@ public final class LayoutUInt32 extends LayoutType<Integer> {
//ORIGINAL LINE: public override Result ReadFixed(ref RowBuffer b, ref RowCursor scope, LayoutColumn col, out
// uint value)
@Override
public Result readFixed(Reference<RowBuffer> b, Reference<RowCursor> scope, LayoutColumn col,
public Result readFixed(RowBuffer b, RowCursor scope, LayoutColumn column,
Out<Integer> value) {
checkArgument(scope.get().scopeType() instanceof LayoutUDT);
if (!b.get().ReadBit(scope.get().start(), col.getNullBit().clone())) {
if (!b.get().readBit(scope.get().start(), column.getNullBit().clone())) {
value.setAndGet(0);
return Result.NotFound;
}
value.setAndGet(b.get().ReadUInt32(scope.get().start() + col.getOffset()));
value.setAndGet(b.get().ReadUInt32(scope.get().start() + column.getOffset()));
return Result.Success;
}
//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
//ORIGINAL LINE: public override Result ReadSparse(ref RowBuffer b, ref RowCursor edit, out uint value)
@Override
public Result readSparse(Reference<RowBuffer> b, Reference<RowCursor> edit,
public Result readSparse(RowBuffer b, RowCursor edit,
Out<Integer> value) {
Result result = prepareSparseRead(b, edit, this.LayoutCode);
if (result != Result.Success) {

View File

@@ -30,22 +30,22 @@ public final class LayoutUInt64 extends LayoutType<Long> {
//ORIGINAL LINE: public override Result ReadFixed(ref RowBuffer b, ref RowCursor scope, LayoutColumn col, out
// ulong value)
@Override
public Result readFixed(Reference<RowBuffer> b, Reference<RowCursor> scope, LayoutColumn col,
public Result readFixed(RowBuffer b, RowCursor scope, LayoutColumn column,
Out<Long> value) {
checkArgument(scope.get().scopeType() instanceof LayoutUDT);
if (!b.get().ReadBit(scope.get().start(), col.getNullBit().clone())) {
if (!b.get().readBit(scope.get().start(), column.getNullBit().clone())) {
value.setAndGet(0);
return Result.NotFound;
}
value.setAndGet(b.get().ReadUInt64(scope.get().start() + col.getOffset()));
value.setAndGet(b.get().ReadUInt64(scope.get().start() + column.getOffset()));
return Result.Success;
}
//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
//ORIGINAL LINE: public override Result ReadSparse(ref RowBuffer b, ref RowCursor edit, out ulong value)
@Override
public Result readSparse(Reference<RowBuffer> b, Reference<RowCursor> edit,
public Result readSparse(RowBuffer b, RowCursor edit,
Out<Long> value) {
Result result = prepareSparseRead(b, edit, this.LayoutCode);
if (result != Result.Success) {

View File

@@ -30,22 +30,22 @@ public final class LayoutUInt8 extends LayoutType<Byte> {
//ORIGINAL LINE: public override Result ReadFixed(ref RowBuffer b, ref RowCursor scope, LayoutColumn col, out
// byte value)
@Override
public Result readFixed(Reference<RowBuffer> b, Reference<RowCursor> scope, LayoutColumn col,
public Result readFixed(RowBuffer b, RowCursor scope, LayoutColumn column,
Out<Byte> value) {
checkArgument(scope.get().scopeType() instanceof LayoutUDT);
if (!b.get().ReadBit(scope.get().start(), col.getNullBit().clone())) {
if (!b.get().readBit(scope.get().start(), column.getNullBit().clone())) {
value.setAndGet(0);
return Result.NotFound;
}
value.setAndGet(b.get().ReadUInt8(scope.get().start() + col.getOffset()));
value.setAndGet(b.get().ReadUInt8(scope.get().start() + column.getOffset()));
return Result.Success;
}
//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
//ORIGINAL LINE: public override Result ReadSparse(ref RowBuffer b, ref RowCursor edit, out byte value)
@Override
public Result readSparse(Reference<RowBuffer> b, Reference<RowCursor> edit,
public Result readSparse(RowBuffer b, RowCursor edit,
Out<Byte> value) {
Result result = prepareSparseRead(b, edit, this.LayoutCode);
if (result != Result.Success) {

View File

@@ -123,7 +123,7 @@ public abstract class LayoutUniqueScope extends LayoutIndexedScope {
r = func == null ? null : func.Invoke(ref b, ref childScope, context) ??Result.Success;
childScope = tempReference_childScope.get();
if (r != Result.Success) {
this.DeleteScope(b, scope);
this.deleteScope(b, scope);
return r;
}
@@ -133,7 +133,7 @@ public abstract class LayoutUniqueScope extends LayoutIndexedScope {
r = b.get().TypedCollectionUniqueIndexRebuild(tempReference_uniqueScope);
uniqueScope = tempReference_uniqueScope.get();
if (r != Result.Success) {
this.DeleteScope(b, scope);
this.deleteScope(b, scope);
return r;
}

View File

@@ -4,7 +4,6 @@
package com.azure.data.cosmos.serialization.hybridrow.layouts;
import com.azure.data.cosmos.core.Out;
import com.azure.data.cosmos.core.Reference;
import com.azure.data.cosmos.serialization.hybridrow.Result;
import com.azure.data.cosmos.serialization.hybridrow.RowBuffer;
import com.azure.data.cosmos.serialization.hybridrow.RowCursor;
@@ -27,20 +26,20 @@ public final class LayoutUnixDateTime extends LayoutType<com.azure.data.cosmos.s
}
@Override
public Result readFixed(Reference<RowBuffer> b, Reference<RowCursor> scope, LayoutColumn col,
public Result readFixed(RowBuffer b, RowCursor scope, LayoutColumn column,
Out<UnixDateTime> value) {
checkArgument(scope.get().scopeType() instanceof LayoutUDT);
if (!b.get().ReadBit(scope.get().start(), col.getNullBit().clone())) {
if (!b.get().readBit(scope.get().start(), column.getNullBit().clone())) {
value.setAndGet(null);
return Result.NotFound;
}
value.setAndGet(b.get().ReadUnixDateTime(scope.get().start() + col.getOffset()).clone());
value.setAndGet(b.get().ReadUnixDateTime(scope.get().start() + column.getOffset()).clone());
return Result.Success;
}
@Override
public Result readSparse(Reference<RowBuffer> b, Reference<RowCursor> edit,
public Result readSparse(RowBuffer b, RowCursor edit,
Out<UnixDateTime> value) {
Result result = prepareSparseRead(b, edit, this.LayoutCode);
if (result != Result.Success) {
@@ -53,15 +52,15 @@ public final class LayoutUnixDateTime extends LayoutType<com.azure.data.cosmos.s
}
@Override
public Result writeFixed(Reference<RowBuffer> b, Reference<RowCursor> scope, LayoutColumn col,
public Result writeFixed(RowBuffer b, RowCursor scope, LayoutColumn column,
UnixDateTime value) {
checkArgument(scope.get().scopeType() instanceof LayoutUDT);
if (scope.get().immutable()) {
return Result.InsufficientPermissions;
}
b.get().WriteUnixDateTime(scope.get().start() + col.getOffset(), value.clone());
b.get().SetBit(scope.get().start(), col.getNullBit().clone());
b.get().WriteUnixDateTime(scope.get().start() + column.getOffset(), value.clone());
b.get().SetBit(scope.get().start(), column.getNullBit().clone());
return Result.Success;
}
@@ -69,7 +68,7 @@ public final class LayoutUnixDateTime extends LayoutType<com.azure.data.cosmos.s
//ORIGINAL LINE: public override Result WriteSparse(ref RowBuffer b, ref RowCursor edit, UnixDateTime value,
// UpdateOptions options = UpdateOptions.Upsert)
@Override
public Result writeSparse(Reference<RowBuffer> b, Reference<RowCursor> edit, UnixDateTime value
public Result writeSparse(RowBuffer b, RowCursor edit, UnixDateTime value
, UpdateOptions options) {
Result result = prepareSparseWrite(b, edit, this.typeArg().clone(), options);
if (result != Result.Success) {
@@ -81,7 +80,7 @@ public final class LayoutUnixDateTime extends LayoutType<com.azure.data.cosmos.s
}
@Override
public Result writeSparse(Reference<RowBuffer> b, Reference<RowCursor> edit, UnixDateTime value) {
public Result writeSparse(RowBuffer b, RowCursor edit, UnixDateTime value) {
return writeSparse(b, edit, value, UpdateOptions.Upsert);
}
}

View File

@@ -25,12 +25,12 @@ public final class LayoutUtf8 extends LayoutType<String> implements ILayoutUtf8S
}
@Override
public Result readFixed(Reference<RowBuffer> b, Reference<RowCursor> scope, LayoutColumn col,
public Result readFixed(RowBuffer b, RowCursor scope, LayoutColumn column,
Out<String> value) {
Utf8Span span;
// 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:
Result r = this.ReadFixed(b, scope, col, out span);
Result r = this.ReadFixed(b, scope, column, out span);
value.setAndGet((r == Result.Success) ? span.toString() :)
default
return r;
@@ -40,7 +40,7 @@ public final class LayoutUtf8 extends LayoutType<String> implements ILayoutUtf8S
Out<Utf8Span> value) {
checkArgument(scope.get().scopeType() instanceof LayoutUDT);
checkArgument(col.getSize() >= 0);
if (!b.get().ReadBit(scope.get().start(), col.getNullBit().clone())) {
if (!b.get().readBit(scope.get().start(), col.getNullBit().clone())) {
value.setAndGet(null);
return Result.NotFound;
}
@@ -50,7 +50,7 @@ public final class LayoutUtf8 extends LayoutType<String> implements ILayoutUtf8S
}
@Override
public Result readSparse(Reference<RowBuffer> b, Reference<RowCursor> edit,
public Result readSparse(RowBuffer b, RowCursor edit,
Out<String> value) {
Utf8Span span;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these
@@ -73,12 +73,12 @@ public final class LayoutUtf8 extends LayoutType<String> implements ILayoutUtf8S
}
@Override
public Result readVariable(Reference<RowBuffer> b, Reference<RowCursor> scope, LayoutColumn col
public Result readVariable(RowBuffer b, RowCursor scope, LayoutColumn column
, Out<String> value) {
Utf8Span span;
// 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:
Result r = this.ReadVariable(b, scope, col, out span);
Result r = this.ReadVariable(b, scope, column, out span);
value.setAndGet((r == Result.Success) ? span.toString() :)
default
return r;
@@ -87,7 +87,7 @@ public final class LayoutUtf8 extends LayoutType<String> implements ILayoutUtf8S
public Result ReadVariable(Reference<RowBuffer> b, Reference<RowCursor> scope, LayoutColumn col
, Out<Utf8Span> value) {
checkArgument(scope.get().scopeType() instanceof LayoutUDT);
if (!b.get().ReadBit(scope.get().start(), col.getNullBit().clone())) {
if (!b.get().readBit(scope.get().start(), col.getNullBit().clone())) {
value.setAndGet(null);
return Result.NotFound;
}
@@ -99,10 +99,10 @@ public final class LayoutUtf8 extends LayoutType<String> implements ILayoutUtf8S
}
@Override
public Result writeFixed(Reference<RowBuffer> b, Reference<RowCursor> scope, LayoutColumn col,
public Result writeFixed(RowBuffer b, RowCursor scope, LayoutColumn column,
String value) {
checkArgument(value != null);
return this.WriteFixed(b, scope, col, Utf8Span.TranscodeUtf16(value));
return this.WriteFixed(b, scope, column, Utf8Span.TranscodeUtf16(value));
}
public Result WriteFixed(Reference<RowBuffer> b, Reference<RowCursor> scope, LayoutColumn col,
@@ -120,7 +120,7 @@ public final class LayoutUtf8 extends LayoutType<String> implements ILayoutUtf8S
}
@Override
public Result writeSparse(Reference<RowBuffer> b, Reference<RowCursor> edit, String value) {
public Result writeSparse(RowBuffer b, RowCursor edit, String value) {
return writeSparse(b, edit, value, UpdateOptions.Upsert);
}
@@ -128,7 +128,7 @@ public final class LayoutUtf8 extends LayoutType<String> implements ILayoutUtf8S
//ORIGINAL LINE: public override Result WriteSparse(ref RowBuffer b, ref RowCursor edit, string value,
// UpdateOptions options = UpdateOptions.Upsert)
@Override
public Result writeSparse(Reference<RowBuffer> b, Reference<RowCursor> edit, String value,
public Result writeSparse(RowBuffer b, RowCursor edit, String value,
UpdateOptions options) {
checkArgument(value != null);
return this.WriteSparse(b, edit, Utf8Span.TranscodeUtf16(value), options);
@@ -172,7 +172,7 @@ public final class LayoutUtf8 extends LayoutType<String> implements ILayoutUtf8S
return Result.TooBig;
}
boolean exists = b.get().ReadBit(scope.get().start(), col.getNullBit().clone());
boolean exists = b.get().readBit(scope.get().start(), col.getNullBit().clone());
int varOffset = b.get().computeVariableValueOffset(scope.get().layout(), scope.get().start(),
col.getOffset());
int shift;

View File

@@ -29,7 +29,7 @@ public final class LayoutVarInt extends LayoutType<Long> {
}
@Override
public Result readFixed(Reference<RowBuffer> b, Reference<RowCursor> scope, LayoutColumn col,
public Result readFixed(RowBuffer b, RowCursor scope, LayoutColumn column,
Out<Long> value) {
Contract.Fail("Not Implemented");
value.setAndGet(0);
@@ -37,7 +37,7 @@ public final class LayoutVarInt extends LayoutType<Long> {
}
@Override
public Result readSparse(Reference<RowBuffer> b, Reference<RowCursor> edit, Out<Long> value) {
public Result readSparse(RowBuffer b, RowCursor edit, Out<Long> value) {
Result result = LayoutType.prepareSparseRead(b, edit, this.LayoutCode);
if (result != Result.Success) {
value.setAndGet(0);
@@ -49,15 +49,15 @@ public final class LayoutVarInt extends LayoutType<Long> {
}
@Override
public Result readVariable(Reference<RowBuffer> b, Reference<RowCursor> scope, LayoutColumn col, Out<Long> value) {
public Result readVariable(RowBuffer b, RowCursor scope, LayoutColumn column, Out<Long> value) {
checkArgument(scope.get().scopeType() instanceof LayoutUDT);
if (!b.get().ReadBit(scope.get().start(), col.getNullBit().clone())) {
if (!b.get().readBit(scope.get().start(), column.getNullBit().clone())) {
value.setAndGet(0);
return Result.NotFound;
}
int varOffset = b.get().computeVariableValueOffset(scope.get().layout(), scope.get().start(),
col.getOffset());
column.getOffset());
value.setAndGet(b.get().ReadVariableInt(varOffset));
return Result.Success;
}
@@ -97,7 +97,7 @@ public final class LayoutVarInt extends LayoutType<Long> {
return Result.InsufficientPermissions;
}
boolean exists = b.get().ReadBit(scope.get().start(), col.getNullBit().clone());
boolean exists = b.get().readBit(scope.get().start(), col.getNullBit().clone());
int varOffset = b.get().computeVariableValueOffset(scope.get().layout(), scope.get().start(),
col.getOffset());
int shift;

View File

@@ -34,7 +34,7 @@ public final class LayoutVarUInt extends LayoutType<Long> {
//ORIGINAL LINE: public override Result ReadFixed(ref RowBuffer b, ref RowCursor scope, LayoutColumn col, out
// ulong value)
@Override
public Result readFixed(Reference<RowBuffer> b, Reference<RowCursor> scope, LayoutColumn col,
public Result readFixed(RowBuffer b, RowCursor scope, LayoutColumn column,
Out<Long> value) {
Contract.Fail("Not Implemented");
value.setAndGet(0);
@@ -44,7 +44,7 @@ public final class LayoutVarUInt extends LayoutType<Long> {
//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
//ORIGINAL LINE: public override Result ReadSparse(ref RowBuffer b, ref RowCursor edit, out ulong value)
@Override
public Result readSparse(Reference<RowBuffer> b, Reference<RowCursor> edit, Out<Long> value) {
public Result readSparse(RowBuffer b, RowCursor edit, Out<Long> value) {
Result result = prepareSparseRead(b, edit, this.LayoutCode);
if (result != Result.Success) {
value.setAndGet(0);
@@ -59,15 +59,15 @@ public final class LayoutVarUInt extends LayoutType<Long> {
//ORIGINAL LINE: public override Result ReadVariable(ref RowBuffer b, ref RowCursor scope, LayoutColumn col, out
// ulong value)
@Override
public Result readVariable(Reference<RowBuffer> b, Reference<RowCursor> scope, LayoutColumn col, Out<Long> value) {
public Result readVariable(RowBuffer b, RowCursor scope, LayoutColumn column, Out<Long> value) {
checkArgument(scope.get().scopeType() instanceof LayoutUDT);
if (!b.get().ReadBit(scope.get().start(), col.getNullBit().clone())) {
if (!b.get().readBit(scope.get().start(), column.getNullBit().clone())) {
value.setAndGet(0);
return Result.NotFound;
}
int varOffset = b.get().computeVariableValueOffset(scope.get().layout(), scope.get().start(),
col.getOffset());
column.getOffset());
value.setAndGet(b.get().ReadVariableUInt(varOffset));
return Result.Success;
}
@@ -114,7 +114,7 @@ public final class LayoutVarUInt extends LayoutType<Long> {
return Result.InsufficientPermissions;
}
boolean exists = b.get().ReadBit(scope.get().start(), col.getNullBit().clone());
boolean exists = b.get().readBit(scope.get().start(), col.getNullBit().clone());
int varOffset = b.get().computeVariableValueOffset(scope.get().layout(), scope.get().start(),
col.getOffset());
int shift;

View File

@@ -60,7 +60,7 @@ public final class BsonRowGenerator implements Closeable {
public void WriteBuffer(HashMap<Utf8String, Object> dict) {
this.writer.writeStartDocument();
for (LayoutColumn c : this.layout.columns()) {
this.LayoutCodeSwitch(c.getPath(), c.getTypeArg().clone(), dict.get(c.getPath()));
this.LayoutCodeSwitch(c.path(), c.typeArg().clone(), dict.get(c.path()));
}
this.writer.writeEndDocument();
@@ -141,7 +141,7 @@ public final class BsonRowGenerator implements Closeable {
HashMap<Utf8String, Object> dict = (HashMap<Utf8String, Object>)value;
Layout udt = this.resolver.resolve(typeArg.typeArgs().schemaId().clone());
for (LayoutColumn c : udt.columns()) {
this.LayoutCodeSwitch(c.getPath(), c.getTypeArg().clone(), dict.get(c.getPath()));
this.LayoutCodeSwitch(c.path(), c.typeArg().clone(), dict.get(c.path()));
}
this.writer.WriteEndDocument();

View File

@@ -154,9 +154,9 @@ public final class CodeGenRowGenerator {
layout.TryFind(AddressHybridRowSerializer.PostalCodeName, tempOut_postalCode);
this.postalCode = tempOut_postalCode.get();
Out<StringToken> tempOut_postalCodeToken = new Out<StringToken>();
layout.getTokenizer().TryFindToken(this.postalCode.getPath(), tempOut_postalCodeToken);
layout.getTokenizer().TryFindToken(this.postalCode.path(), tempOut_postalCodeToken);
this.postalCodeToken = tempOut_postalCodeToken.get();
this.postalCodeSerializer = new PostalCodeHybridRowSerializer(resolver.resolve(this.postalCode.getTypeArgs().schemaId().clone()), resolver);
this.postalCodeSerializer = new PostalCodeHybridRowSerializer(resolver.resolve(this.postalCode.typeArgs().schemaId().clone()), resolver);
}
@Override
@@ -253,7 +253,7 @@ public final class CodeGenRowGenerator {
root.get().Find(row, this.postalCodeToken.clone());
RowCursor childScope;
Out<RowCursor> tempOut_childScope = new Out<RowCursor>();
r = LayoutType.UDT.WriteScope(row, root, this.postalCode.getTypeArgs().clone(), tempOut_childScope);
r = LayoutType.UDT.WriteScope(row, root, this.postalCode.typeArgs().clone(), tempOut_childScope);
childScope = tempOut_childScope.get();
if (r != Result.Success) {
@@ -338,21 +338,21 @@ public final class CodeGenRowGenerator {
layout.TryFind(GuestsHybridRowSerializer.ConfirmNumberName, tempOut_confirmNumber);
this.confirmNumber = tempOut_confirmNumber.get();
Out<StringToken> tempOut_emailsToken = new Out<StringToken>();
layout.getTokenizer().TryFindToken(this.emails.getPath(), tempOut_emailsToken);
layout.getTokenizer().TryFindToken(this.emails.path(), tempOut_emailsToken);
this.emailsToken = tempOut_emailsToken.get();
Out<StringToken> tempOut_phoneNumbersToken = new Out<StringToken>();
layout.getTokenizer().TryFindToken(this.phoneNumbers.getPath(), tempOut_phoneNumbersToken);
layout.getTokenizer().TryFindToken(this.phoneNumbers.path(), tempOut_phoneNumbersToken);
this.phoneNumbersToken = tempOut_phoneNumbersToken.get();
Out<StringToken> tempOut_addressesToken = new Out<StringToken>();
layout.getTokenizer().TryFindToken(this.addresses.getPath(), tempOut_addressesToken);
layout.getTokenizer().TryFindToken(this.addresses.path(), tempOut_addressesToken);
this.addressesToken = tempOut_addressesToken.get();
this.addressesFieldType =
new TypeArgumentList(new TypeArgument[] { new TypeArgument(LayoutType.TypedTuple,
this.addresses.getTypeArgs().clone()) });
this.addresses.typeArgs().clone()) });
this.addressSerializer =
new AddressHybridRowSerializer(resolver.resolve(this.addresses.getTypeArgs().get(1).typeArgs().schemaId().clone()), resolver);
new AddressHybridRowSerializer(resolver.resolve(this.addresses.typeArgs().get(1).typeArgs().schemaId().clone()), resolver);
this.addressSerializerWriter = (Reference<RowBuffer> b, Reference<RowCursor> scope,
HashMap<Utf8String, Object> context) -> addressSerializer.WriteBuffer(b,
scope, context);
@@ -604,7 +604,7 @@ public final class CodeGenRowGenerator {
root.get().Find(row, this.emailsToken.clone());
// TODO: C# TO JAVA CONVERTER: The following lambda contained an unresolved 'ref'
// keyword - these are not converted by C# to Java Converter:
r = LayoutType.TypedArray.WriteScope(row, root, this.emails.getTypeArgs().clone(),
r = LayoutType.TypedArray.WriteScope(row, root, this.emails.typeArgs().clone(),
(ArrayList<Object>)value, (ref RowBuffer row2, ref RowCursor childScope,
ArrayList<Object> context) ->
{
@@ -644,7 +644,7 @@ public final class CodeGenRowGenerator {
root.get().Find(row, this.phoneNumbersToken.clone());
RowCursor childScope;
Out<RowCursor> tempOut_childScope = new Out<RowCursor>();
r = LayoutType.TypedArray.WriteScope(row, root, this.phoneNumbers.getTypeArgs().clone(),
r = LayoutType.TypedArray.WriteScope(row, root, this.phoneNumbers.typeArgs().clone(),
tempOut_childScope);
childScope = tempOut_childScope.get();
if (r != Result.Success) {
@@ -678,7 +678,7 @@ public final class CodeGenRowGenerator {
root.get().Find(row, this.addressesToken.clone());
// TODO: C# TO JAVA CONVERTER: The following lambda contained an unresolved 'ref'
// keyword - these are not converted by C# to Java Converter:
r = LayoutType.TypedMap.WriteScope(row, root, this.addresses.getTypeArgs().clone(), (this
r = LayoutType.TypedMap.WriteScope(row, root, this.addresses.typeArgs().clone(), (this
, (ArrayList<Object>)value), (ref
RowBuffer row2, ref RowCursor childScope, (GuestsHybridRowSerializer
_this, ArrayList < Object > value)ctx) ->
@@ -792,10 +792,10 @@ public final class CodeGenRowGenerator {
layout.TryFind(HotelsHybridRowSerializer.AddressName, tempOut_address);
this.address = tempOut_address.get();
Out<StringToken> tempOut_addressToken = new Out<StringToken>();
layout.getTokenizer().TryFindToken(this.address.getPath(), tempOut_addressToken);
layout.getTokenizer().TryFindToken(this.address.path(), tempOut_addressToken);
this.addressToken = tempOut_addressToken.get();
this.addressSerializer =
new AddressHybridRowSerializer(resolver.resolve(this.address.getTypeArgs().schemaId().clone()),
new AddressHybridRowSerializer(resolver.resolve(this.address.typeArgs().schemaId().clone()),
resolver);
}
@@ -908,7 +908,7 @@ public final class CodeGenRowGenerator {
root.get().Find(row, this.addressToken.clone());
RowCursor childScope;
Out<RowCursor> tempOut_childScope = new Out<RowCursor>();
r = LayoutType.UDT.WriteScope(row, root, this.address.getTypeArgs().clone(),
r = LayoutType.UDT.WriteScope(row, root, this.address.typeArgs().clone(),
tempOut_childScope);
childScope = tempOut_childScope.get();
if (r != Result.Success) {
@@ -965,7 +965,7 @@ public final class CodeGenRowGenerator {
layout.TryFind(PostalCodeHybridRowSerializer.Plus4Name, tempOut_plus4);
this.plus4 = tempOut_plus4.get();
Out<StringToken> tempOut_plus4Token = new Out<StringToken>();
layout.getTokenizer().TryFindToken(this.plus4.getPath(), tempOut_plus4Token);
layout.getTokenizer().TryFindToken(this.plus4.path(), tempOut_plus4Token);
this.plus4Token = tempOut_plus4Token.get();
}

View File

@@ -59,7 +59,7 @@ public class LayoutCompilerUnitTests {
Namespace tempVar3 = new Namespace();
tempVar3.setSchemas(new ArrayList<Schema>(Arrays.asList(s)));
Layout layout = s.Compile(tempVar3);
Assert.IsTrue(layout.getSize() == LayoutBit.DivCeiling((i + 1) * 2, LayoutType.BitsPerByte), "Size: {0}, " +
Assert.IsTrue(layout.getSize() == LayoutBit.divCeiling((i + 1) * 2, LayoutType.BitsPerByte), "Size: {0}, " +
"i: {1}", layout.getSize(), i);
}
}
@@ -1606,9 +1606,9 @@ private final static class RoundTripFixed extends TestActionDispatcher<RoundTrip
TValue value;
System.out.printf("%1$s" + "\r\n", expected.Json);
TLayout t = (TLayout)col.getType();
TLayout t = (TLayout)col.type();
if (LayoutBit.opNotEquals(col.getNullBit().clone(),
LayoutBit.Invalid)) {
LayoutBit.INVALID)) {
Out<TValue> tempOut_value = new Out<TValue>();
r = t.ReadFixed(row, root, col, tempOut_value);
value = tempOut_value.get();
@@ -1653,7 +1653,7 @@ private final static class RoundTripFixed extends TestActionDispatcher<RoundTrip
ResultAssert.InsufficientPermissions(t.DeleteFixed(row, ref roRoot, col));
if (LayoutBit.opNotEquals(col.getNullBit().clone(),
LayoutBit.Invalid)) {
LayoutBit.INVALID)) {
ResultAssert.IsSuccess(t.DeleteFixed(row, root, col));
} else {
ResultAssert.TypeMismatch(t.DeleteFixed(row, root, col));
@@ -1706,10 +1706,10 @@ private final static class RoundTripSparseArray extends TestActionDispatcher<Rou
public <TLayout, TValue> void Dispatch(Reference<RowBuffer> row, Reference<RowCursor> root,
Closure closure) {
LayoutColumn arrCol = closure.ArrCol;
LayoutType tempVar = arrCol.getType();
LayoutType tempVar = arrCol.type();
LayoutIndexedScope arrT = tempVar instanceof LayoutIndexedScope ? (LayoutIndexedScope)tempVar : null;
Expected expected = closure.Expected.clone();
String tag = String.format("Json: %1$s, Array: %2$s", expected.Json, arrCol.getType().getName());
String tag = String.format("Json: %1$s, Array: %2$s", expected.Json, arrCol.type().getName());
System.out.println(tag);
Assert.IsNotNull(arrT, tag);
@@ -1720,7 +1720,7 @@ private final static class RoundTripSparseArray extends TestActionDispatcher<Rou
RowCursor field;
// 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:
root.get().Clone(out field).Find(row, arrCol.getPath());
root.get().Clone(out field).Find(row, arrCol.path());
Reference<RowCursor> tempReference_field =
new Reference<RowCursor>(field);
RowCursor scope;
@@ -1736,7 +1736,7 @@ private final static class RoundTripSparseArray extends TestActionDispatcher<Rou
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
// 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 modified:
r = arrT.WriteScope(row, ref field, arrCol.getTypeArgs().clone(), out scope);
r = arrT.WriteScope(row, ref field, arrCol.typeArgs().clone(), out scope);
ResultAssert.IsSuccess(r, tag);
// Verify the nested field doesn't yet appear within the new scope.
@@ -1843,7 +1843,7 @@ private final static class RoundTripSparseArray extends TestActionDispatcher<Rou
RowCursor roRoot;
// 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:
root.get().AsReadOnly(out roRoot).Find(row, arrCol.getPath());
root.get().AsReadOnly(out roRoot).Find(row, arrCol.path());
Reference<RowCursor> tempReference_roRoot =
new Reference<RowCursor>(roRoot);
ResultAssert.InsufficientPermissions(arrT.DeleteScope(row, tempReference_roRoot));
@@ -1852,7 +1852,7 @@ private final static class RoundTripSparseArray extends TestActionDispatcher<Rou
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
// 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 modified:
ResultAssert.InsufficientPermissions(arrT.WriteScope(row, ref roRoot, arrCol.getTypeArgs().clone(),
ResultAssert.InsufficientPermissions(arrT.WriteScope(row, ref roRoot, arrCol.typeArgs().clone(),
out scope2));
// Overwrite the whole scope.
@@ -1882,7 +1882,7 @@ private final static class RoundTripSparseArray extends TestActionDispatcher<Rou
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
// 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 modified:
r = arrT.WriteScope(row, ref field, arrCol.getTypeArgs().clone(), out _, UpdateOptions.Update);
r = arrT.WriteScope(row, ref field, arrCol.typeArgs().clone(), out _, UpdateOptions.Update);
ResultAssert.IsSuccess(r, "Json: {0}", expected.Json);
Reference<RowCursor> tempReference_field6 =
new Reference<RowCursor>(field);
@@ -1942,22 +1942,22 @@ private final static class RoundTripSparseObject extends TestActionDispatcher<Ro
public <TLayout, TValue> void Dispatch(Reference<RowBuffer> row, Reference<RowCursor> root,
Closure closure) {
LayoutColumn objCol = closure.ObjCol;
LayoutType tempVar = objCol.getType();
LayoutType tempVar = objCol.type();
LayoutObject objT = tempVar instanceof LayoutObject ? (LayoutObject)tempVar : null;
LayoutColumn col = closure.Col;
Expected expected = closure.Expected.clone();
System.out.printf("%1$s" + "\r\n", col.getType().getName());
System.out.printf("%1$s" + "\r\n", col.type().getName());
Assert.IsNotNull(objT, "Json: {0}", expected.Json);
Assert.AreEqual(objCol, col.getParent(), "Json: {0}", expected.Json);
Assert.AreEqual(objCol, col.parent(), "Json: {0}", expected.Json);
TLayout t = (TLayout)col.getType();
TLayout t = (TLayout)col.type();
// Attempt to read the object and the nested column.
RowCursor field;
// 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:
root.get().Clone(out field).Find(row, objCol.getPath());
root.get().Clone(out field).Find(row, objCol.path());
Reference<RowCursor> tempReference_field =
new Reference<RowCursor>(field);
RowCursor scope;
@@ -1973,7 +1973,7 @@ private final static class RoundTripSparseObject extends TestActionDispatcher<Ro
new Reference<RowCursor>(field);
Out<RowCursor> tempOut_scope2 =
new Out<RowCursor>();
r = objT.WriteScope(row, tempReference_field2, objCol.getTypeArgs().clone(), tempOut_scope2);
r = objT.WriteScope(row, tempReference_field2, objCol.typeArgs().clone(), tempOut_scope2);
scope = tempOut_scope2.get();
field = tempReference_field2.get();
ResultAssert.IsSuccess(r, "Json: {0}", expected.Json);
@@ -1982,7 +1982,7 @@ private final static class RoundTripSparseObject extends TestActionDispatcher<Ro
RowCursor nestedField;
// 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:
scope.Clone(out nestedField).Find(row, col.getPath());
scope.Clone(out nestedField).Find(row, col.path());
TValue value;
// 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:
@@ -2014,7 +2014,7 @@ private final static class RoundTripSparseObject extends TestActionDispatcher<Ro
// Read the nested field
// 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:
scope2.Clone(out nestedField).Find(row, col.getPath());
scope2.Clone(out nestedField).Find(row, col.path());
// 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: C# TO JAVA CONVERTER: The following method call contained an unresolved 'ref' keyword - these
@@ -2032,7 +2032,7 @@ private final static class RoundTripSparseObject extends TestActionDispatcher<Ro
RowCursor roRoot;
// 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:
root.get().AsReadOnly(out roRoot).Find(row, objCol.getPath());
root.get().AsReadOnly(out roRoot).Find(row, objCol.path());
Reference<RowCursor> tempReference_roRoot =
new Reference<RowCursor>(roRoot);
ResultAssert.InsufficientPermissions(objT.DeleteScope(row, tempReference_roRoot));
@@ -2041,7 +2041,7 @@ private final static class RoundTripSparseObject extends TestActionDispatcher<Ro
new Reference<RowCursor>(roRoot);
Out<RowCursor> tempOut_scope22 =
new Out<RowCursor>();
ResultAssert.InsufficientPermissions(objT.WriteScope(row, tempReference_roRoot2, objCol.getTypeArgs().clone(),
ResultAssert.InsufficientPermissions(objT.WriteScope(row, tempReference_roRoot2, objCol.typeArgs().clone(),
tempOut_scope22));
scope2 = tempOut_scope22.get();
roRoot = tempReference_roRoot2.get();
@@ -2073,7 +2073,7 @@ private final static class RoundTripSparseObject extends TestActionDispatcher<Ro
RowCursor _;
Out<RowCursor> tempOut__2 =
new Out<RowCursor>();
r = objT.WriteScope(row, tempReference_field7, objCol.getTypeArgs().clone(), tempOut__2, UpdateOptions.Update);
r = objT.WriteScope(row, tempReference_field7, objCol.typeArgs().clone(), tempOut__2, UpdateOptions.Update);
_ = tempOut__2.get();
field = tempReference_field7.get();
ResultAssert.IsSuccess(r, "Json: {0}", expected.Json);
@@ -2141,13 +2141,13 @@ private final static class RoundTripSparseObjectMulti extends TestActionDispatch
System.out.println(tag);
TLayout t = (TLayout)col.getType();
TLayout t = (TLayout)col.type();
// Verify the nested field doesn't yet appear within the new scope.
RowCursor nestedField;
// 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:
scope.get().Clone(out nestedField).Find(row, col.getPath());
scope.get().Clone(out nestedField).Find(row, col.path());
TValue value;
// 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:
@@ -2211,13 +2211,13 @@ private final static class RoundTripSparseObjectMulti extends TestActionDispatch
System.out.println(tag);
LayoutObject t = (LayoutObject)col.getType();
LayoutObject t = (LayoutObject)col.type();
// Verify the nested field doesn't yet appear within the new scope.
RowCursor nestedField;
// 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:
scope.get().Clone(out nestedField).Find(row, col.getPath());
scope.get().Clone(out nestedField).Find(row, col.path());
Reference<RowCursor> tempReference_nestedField =
new Reference<RowCursor>(nestedField);
RowCursor scope2;
@@ -2233,7 +2233,7 @@ private final static class RoundTripSparseObjectMulti extends TestActionDispatch
new Reference<RowCursor>(nestedField);
Out<RowCursor> tempOut_scope22 =
new Out<RowCursor>();
r = t.WriteScope(row, tempReference_nestedField2, col.getTypeArgs().clone(), tempOut_scope22);
r = t.WriteScope(row, tempReference_nestedField2, col.typeArgs().clone(), tempOut_scope22);
scope2 = tempOut_scope22.get();
nestedField = tempReference_nestedField2.get();
ResultAssert.IsSuccess(r, tag);
@@ -2340,16 +2340,16 @@ private final static class RoundTripSparseObjectNested extends TestActionDispatc
System.out.println(tag);
TLayout t = (TLayout)col.getType();
TLayout t = (TLayout)col.type();
// Ensure scope exists.
RowCursor scope = LayoutCompilerUnitTests.EnsureScope(row, root, col.getParent(), tag);
RowCursor scope = LayoutCompilerUnitTests.EnsureScope(row, root, col.parent(), tag);
// Write the nested field.
RowCursor field;
// 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:
scope.Clone(out field).Find(row, col.getPath());
scope.Clone(out field).Find(row, col.path());
// 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 modified:
Result r = t.WriteSparse(row, ref field, (TValue)prop.Value);
@@ -2575,10 +2575,10 @@ private final static class RoundTripSparseSet extends TestActionDispatcher<Round
public <TLayout, TValue> void Dispatch(Reference<RowBuffer> row, Reference<RowCursor> root,
Closure closure) {
LayoutColumn setCol = closure.SetCol;
LayoutType tempVar = setCol.getType();
LayoutType tempVar = setCol.type();
LayoutUniqueScope setT = tempVar instanceof LayoutUniqueScope ? (LayoutUniqueScope)tempVar : null;
Expected expected = closure.Expected.clone();
String tag = String.format("Json: %1$s, Set: %2$s", expected.Json, setCol.getType().getName());
String tag = String.format("Json: %1$s, Set: %2$s", expected.Json, setCol.type().getName());
System.out.println(tag);
Assert.IsNotNull(setT, tag);
@@ -2589,7 +2589,7 @@ private final static class RoundTripSparseSet extends TestActionDispatcher<Round
RowCursor field;
// 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:
root.get().Clone(out field).Find(row, setCol.getPath());
root.get().Clone(out field).Find(row, setCol.path());
Reference<RowCursor> tempReference_field =
new Reference<RowCursor>(field);
RowCursor scope;
@@ -2605,7 +2605,7 @@ private final static class RoundTripSparseSet extends TestActionDispatcher<Round
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
// 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 modified:
r = setT.WriteScope(row, ref field, setCol.getTypeArgs().clone(), out scope);
r = setT.WriteScope(row, ref field, setCol.typeArgs().clone(), out scope);
ResultAssert.IsSuccess(r, tag);
// Verify the nested field doesn't yet appear within the new scope.
@@ -2825,13 +2825,13 @@ private final static class RoundTripSparseSet extends TestActionDispatcher<Round
RowCursor roRoot;
// 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:
root.get().AsReadOnly(out roRoot).Find(row, setCol.getPath());
root.get().AsReadOnly(out roRoot).Find(row, setCol.path());
Reference<RowCursor> tempReference_roRoot = new Reference<RowCursor>(roRoot);
ResultAssert.InsufficientPermissions(setT.DeleteScope(row, tempReference_roRoot));
roRoot = tempReference_roRoot.get();
// 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: 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 modified:
ResultAssert.InsufficientPermissions(setT.WriteScope(row, ref roRoot, setCol.getTypeArgs().clone(), out _));
ResultAssert.InsufficientPermissions(setT.WriteScope(row, ref roRoot, setCol.typeArgs().clone(), out _));
// Overwrite the whole scope.
Reference<RowCursor> tempReference_field9 = new Reference<RowCursor>(field);
@@ -2854,7 +2854,7 @@ private final static class RoundTripSparseSet extends TestActionDispatcher<Round
Reference<RowCursor> tempReference_field12 = new Reference<RowCursor>(field);
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:
r = setT.WriteScope(row, tempReference_field12, setCol.getTypeArgs().clone(), out _, UpdateOptions.Update);
r = setT.WriteScope(row, tempReference_field12, setCol.typeArgs().clone(), out _, UpdateOptions.Update);
field = tempReference_field12.get();
ResultAssert.IsSuccess(r, "Json: {0}", expected.Json);
Reference<RowCursor> tempReference_field13 = new Reference<RowCursor>(field);
@@ -2914,12 +2914,12 @@ private final static class RoundTripSparseSimple extends TestActionDispatcher<Ro
LayoutColumn col = closure.Col;
Expected expected = closure.Expected.clone();
System.out.printf("%1$s" + "\r\n", col.getType().getName());
TLayout t = (TLayout)col.getType();
System.out.printf("%1$s" + "\r\n", col.type().getName());
TLayout t = (TLayout)col.type();
RowCursor field;
// 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:
root.get().Clone(out field).Find(row, col.getPath());
root.get().Clone(out field).Find(row, col.path());
TValue value;
// 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:
@@ -2956,7 +2956,7 @@ private final static class RoundTripSparseSimple extends TestActionDispatcher<Ro
RowCursor roRoot;
// 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:
root.get().AsReadOnly(out roRoot).Find(row, col.getPath());
root.get().AsReadOnly(out roRoot).Find(row, col.path());
// 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 modified:
ResultAssert.InsufficientPermissions(t.DeleteSparse(row, ref roRoot));
@@ -3066,7 +3066,7 @@ private static class RoundTripVariable extends TestActionDispatcher<RoundTripVar
protected final <TLayout extends LayoutType<TValue>, TValue> void Compare(Reference<RowBuffer> row,
Reference<RowCursor> root, LayoutColumn col, Object exValue, Expected expected) {
TLayout t = (TLayout)col.getType();
TLayout t = (TLayout)col.type();
TValue value;
Out<TValue> tempOut_value = new Out<TValue>();
Result r = t.readVariable(row, root, col, tempOut_value);
@@ -3083,7 +3083,7 @@ private static class RoundTripVariable extends TestActionDispatcher<RoundTripVar
protected final <TLayout extends LayoutType<TValue>, TValue> void RoundTrip(Reference<RowBuffer> row,
Reference<RowCursor> root, LayoutColumn col, Object exValue, Expected expected) {
TLayout t = (TLayout)col.getType();
TLayout t = (TLayout)col.type();
Result r = t.writeVariable(row, root, col, (TValue)exValue);
ResultAssert.IsSuccess(r, "Json: {0}", expected.Json);
this.<TLayout, TValue>Compare(row, root, col, exValue, expected.clone());
@@ -3193,7 +3193,7 @@ private final static class VariableInterleaving extends RoundTripVariable {
private <TLayout extends LayoutType<TValue>, TValue> void Delete(Reference<RowBuffer> row,
Reference<RowCursor> root, LayoutColumn col, Expected expected) {
TLayout t = (TLayout)col.getType();
TLayout t = (TLayout)col.type();
RowCursor roRoot;
// 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:
@@ -3213,7 +3213,7 @@ private final static class VariableInterleaving extends RoundTripVariable {
private <TLayout extends LayoutType<TValue>, TValue> void TooBig(Reference<RowBuffer> row,
Reference<RowCursor> root, LayoutColumn col, Expected expected) {
TLayout t = (TLayout)col.getType();
TLayout t = (TLayout)col.type();
Result r = t.writeVariable(row, root, col, (TValue)expected.TooBig);
Assert.AreEqual(Result.TooBig, r, "Json: {0}", expected.Json);
}

View File

@@ -150,7 +150,7 @@ public final class NullableUnitTests {
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
// 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 modified:
if (c.<LayoutTypedArray>TypeAs().ReadScope(row, ref scope, out scope) == Result.Success) {
if (c.<LayoutTypedArray>typeAs().ReadScope(row, ref scope, out scope) == Result.Success) {
value.NullBool = new ArrayList<Boolean>();
RowCursor nullableScope = null;
Reference<RowCursor> tempReference_nullableScope =
@@ -183,7 +183,7 @@ public final class NullableUnitTests {
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
// 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 modified:
if (c.<LayoutTypedArray>TypeAs().ReadScope(row, ref scope, out scope) == Result.Success) {
if (c.<LayoutTypedArray>typeAs().ReadScope(row, ref scope, out scope) == Result.Success) {
value.NullArray = new ArrayList<Float>();
RowCursor nullableScope = null;
Reference<RowCursor> tempReference_nullableScope2 =
@@ -216,7 +216,7 @@ public final class NullableUnitTests {
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
// 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 modified:
if (c.<LayoutTypedSet>TypeAs().ReadScope(row, ref scope, out scope) == Result.Success) {
if (c.<LayoutTypedSet>typeAs().ReadScope(row, ref scope, out scope) == Result.Success) {
value.NullSet = new ArrayList<String>();
RowCursor nullableScope = null;
Reference<RowCursor> tempReference_nullableScope3 =
@@ -249,7 +249,7 @@ public final class NullableUnitTests {
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
// 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 modified:
if (c.<LayoutTypedArray>TypeAs().ReadScope(row, ref scope, out scope) == Result.Success) {
if (c.<LayoutTypedArray>typeAs().ReadScope(row, ref scope, out scope) == Result.Success) {
value.NullTuple = new ArrayList<(Integer, Long) > ();
RowCursor tupleScope = null;
TypeArgument tupleType = c.TypeArgs[0];
@@ -316,7 +316,7 @@ public final class NullableUnitTests {
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
// 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 modified:
if (c.<LayoutUniqueScope>TypeAs().ReadScope(row, ref scope, out scope) == Result.Success) {
if (c.<LayoutUniqueScope>typeAs().ReadScope(row, ref scope, out scope) == Result.Success) {
//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
//ORIGINAL LINE: value.NullMap = new Dictionary<Guid, Nullable<byte>>();
value.NullMap = new HashMap<UUID, Byte>();
@@ -324,7 +324,7 @@ public final class NullableUnitTests {
// 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
// modified:
TypeArgument tupleType = c.<LayoutUniqueScope>TypeAs().FieldType(ref scope);
TypeArgument tupleType = c.<LayoutUniqueScope>typeAs().FieldType(ref scope);
Reference<RowCursor> tempReference_tupleScope4 =
new Reference<RowCursor>(tupleScope);
while (scope.MoveNext(row, tempReference_tupleScope4)) {
@@ -432,13 +432,13 @@ 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:
root.get().Clone(out outerScope).Find(row, c.getPath());
root.get().Clone(out outerScope).Find(row, c.path());
Reference<RowCursor> tempReference_outerScope =
new Reference<RowCursor>(outerScope);
Out<RowCursor> tempOut_outerScope =
new Out<RowCursor>();
ResultAssert.IsSuccess(c.<LayoutTypedArray>TypeAs().WriteScope(row, tempReference_outerScope,
c.getTypeArgs().clone(), tempOut_outerScope));
ResultAssert.IsSuccess(c.<LayoutTypedArray>typeAs().WriteScope(row, tempReference_outerScope,
c.typeArgs().clone(), tempOut_outerScope));
outerScope = tempOut_outerScope.get();
outerScope = tempReference_outerScope.get();
for (Boolean item : value.NullBool) {
@@ -448,7 +448,7 @@ public final class NullableUnitTests {
Out<RowCursor> tempOut_innerScope =
new Out<RowCursor>();
ResultAssert.IsSuccess(NullableUnitTests.WriteNullable(row, tempReference_outerScope2,
c.getTypeArgs().get(0).clone(), item, tempOut_innerScope));
c.typeArgs().get(0).clone(), item, tempOut_innerScope));
innerScope = tempOut_innerScope.get();
outerScope = tempReference_outerScope2.get();
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'ref' keyword -
@@ -467,13 +467,13 @@ 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:
root.get().Clone(out outerScope).Find(row, c.getPath());
root.get().Clone(out outerScope).Find(row, c.path());
Reference<RowCursor> tempReference_outerScope3 =
new Reference<RowCursor>(outerScope);
Out<RowCursor> tempOut_outerScope2 =
new Out<RowCursor>();
ResultAssert.IsSuccess(c.<LayoutTypedArray>TypeAs().WriteScope(row, tempReference_outerScope3,
c.getTypeArgs().clone(), tempOut_outerScope2));
ResultAssert.IsSuccess(c.<LayoutTypedArray>typeAs().WriteScope(row, tempReference_outerScope3,
c.typeArgs().clone(), tempOut_outerScope2));
outerScope = tempOut_outerScope2.get();
outerScope = tempReference_outerScope3.get();
for (Float item : value.NullArray) {
@@ -483,7 +483,7 @@ public final class NullableUnitTests {
Out<RowCursor> tempOut_innerScope2 =
new Out<RowCursor>();
ResultAssert.IsSuccess(NullableUnitTests.WriteNullable(row, tempReference_outerScope4,
c.getTypeArgs().get(0).clone(), item, tempOut_innerScope2));
c.typeArgs().get(0).clone(), item, tempOut_innerScope2));
innerScope = tempOut_innerScope2.get();
outerScope = tempReference_outerScope4.get();
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'ref' keyword -
@@ -502,13 +502,13 @@ 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:
root.get().Clone(out outerScope).Find(row, c.getPath());
root.get().Clone(out outerScope).Find(row, c.path());
Reference<RowCursor> tempReference_outerScope5 =
new Reference<RowCursor>(outerScope);
Out<RowCursor> tempOut_outerScope3 =
new Out<RowCursor>();
ResultAssert.IsSuccess(c.<LayoutTypedSet>TypeAs().WriteScope(row, tempReference_outerScope5,
c.getTypeArgs().clone(), tempOut_outerScope3));
ResultAssert.IsSuccess(c.<LayoutTypedSet>typeAs().WriteScope(row, tempReference_outerScope5,
c.typeArgs().clone(), tempOut_outerScope3));
outerScope = tempOut_outerScope3.get();
outerScope = tempReference_outerScope5.get();
for (String item : value.NullSet) {
@@ -523,14 +523,14 @@ public final class NullableUnitTests {
Out<RowCursor> tempOut__ =
new Out<RowCursor>();
ResultAssert.IsSuccess(NullableUnitTests.WriteNullable(row, tempReference_temp,
c.getTypeArgs().get(0).clone(), item, tempOut__));
c.typeArgs().get(0).clone(), item, tempOut__));
_ = tempOut__.get();
temp = tempReference_temp.get();
Reference<RowCursor> tempReference_outerScope6 =
new Reference<RowCursor>(outerScope);
Reference<RowCursor> tempReference_temp2 =
new Reference<RowCursor>(temp);
ResultAssert.IsSuccess(c.<LayoutTypedSet>TypeAs().MoveField(row, tempReference_outerScope6,
ResultAssert.IsSuccess(c.<LayoutTypedSet>typeAs().MoveField(row, tempReference_outerScope6,
tempReference_temp2));
temp = tempReference_temp2.get();
outerScope = tempReference_outerScope6.get();
@@ -546,18 +546,18 @@ 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:
root.get().Clone(out outerScope).Find(row, c.getPath());
root.get().Clone(out outerScope).Find(row, c.path());
Reference<RowCursor> tempReference_outerScope7 =
new Reference<RowCursor>(outerScope);
Out<RowCursor> tempOut_outerScope4 =
new Out<RowCursor>();
ResultAssert.IsSuccess(c.<LayoutTypedArray>TypeAs().WriteScope(row, tempReference_outerScope7,
c.getTypeArgs().clone(), tempOut_outerScope4));
ResultAssert.IsSuccess(c.<LayoutTypedArray>typeAs().WriteScope(row, tempReference_outerScope7,
c.typeArgs().clone(), tempOut_outerScope4));
outerScope = tempOut_outerScope4.get();
outerScope = tempReference_outerScope7.get();
for ((Integer item1,Long item2) :value.NullTuple)
{
TypeArgument tupleType = c.getTypeArgs().get(0).clone();
TypeArgument tupleType = c.typeArgs().get(0).clone();
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
@@ -611,22 +611,22 @@ 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:
root.get().Clone(out outerScope).Find(row, c.getPath());
root.get().Clone(out outerScope).Find(row, c.path());
// 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: 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
// modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().WriteScope(row, ref outerScope,
c.getTypeArgs().clone(), out outerScope));
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().WriteScope(row, ref outerScope,
c.typeArgs().clone(), out outerScope));
//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
//ORIGINAL LINE: foreach ((Guid key, Nullable<byte> itemValue) in value.NullMap)
for ((UUID key,Byte itemValue) :value.NullMap)
{
Reference<RowCursor> tempReference_outerScope8 =
new Reference<RowCursor>(outerScope);
TypeArgument tupleType = c.<LayoutUniqueScope>TypeAs().FieldType(tempReference_outerScope8).clone();
TypeArgument tupleType = c.<LayoutUniqueScope>typeAs().FieldType(tempReference_outerScope8).clone();
outerScope = tempReference_outerScope8.get();
RowCursor temp;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword -
@@ -676,7 +676,7 @@ public final class NullableUnitTests {
new Reference<RowCursor>(outerScope);
Reference<RowCursor> tempReference_temp3 =
new Reference<RowCursor>(temp);
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().MoveField(row, tempReference_outerScope9,
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().MoveField(row, tempReference_outerScope9,
tempReference_temp3));
temp = tempReference_temp3.get();
outerScope = tempReference_outerScope9.get();

View File

@@ -160,11 +160,11 @@ public final class RowOperationDispatcher {
assert scope.get().getLayout().TryFind(path, tempOut_col);
col = tempOut_col.get();
assert col != null;
type = col.getType();
typeArgs = col.getTypeArgs().clone();
type = col.type();
typeArgs = col.typeArgs().clone();
}
if ((path != null) && (col == null || col.getStorage() == 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

@@ -130,7 +130,7 @@ public final class RowWriterUnitTests {
new Out<LayoutColumn>();
assert layout.TryFind("array_t<int8>", tempOut_col);
col = tempOut_col.get();
ResultAssert.IsSuccess(writer.WriteScope(col.getPath(), col.getTypeArg().clone(), new byte[] { -86, -87,
ResultAssert.IsSuccess(writer.WriteScope(col.path(), col.typeArg().clone(), new byte[] { -86, -87,
-88 }, (ref RowWriter writer2, TypeArgument typeArg, byte[] values) ->
{
for (byte value : values) {
@@ -144,7 +144,7 @@ public final class RowWriterUnitTests {
new Out<LayoutColumn>();
assert layout.TryFind("array_t<array_t<float32>>", tempOut_col2);
col = tempOut_col2.get();
ResultAssert.IsSuccess(writer.WriteScope(col.getPath(), col.getTypeArg().clone(), new float[][]
ResultAssert.IsSuccess(writer.WriteScope(col.path(), col.typeArg().clone(), new float[][]
{
new float[] { 1, 2, 3 },
new float[] { 1, 2, 3 }
@@ -169,7 +169,7 @@ public final class RowWriterUnitTests {
new Out<LayoutColumn>();
assert layout.TryFind("array_t<utf8>", tempOut_col3);
col = tempOut_col3.get();
ResultAssert.IsSuccess(writer.WriteScope(col.getPath(), col.getTypeArg().clone(), new String[] { "abc",
ResultAssert.IsSuccess(writer.WriteScope(col.path(), col.typeArg().clone(), new String[] { "abc",
"def", "hij" }, (ref RowWriter writer2, TypeArgument typeArg, String[] values) ->
{
for (String value : values) {
@@ -183,7 +183,7 @@ public final class RowWriterUnitTests {
new Out<LayoutColumn>();
assert layout.TryFind("tuple<varint,int64>", tempOut_col4);
col = tempOut_col4.get();
ResultAssert.IsSuccess(writer.WriteScope(col.getPath(), col.getTypeArg().clone(),
ResultAssert.IsSuccess(writer.WriteScope(col.path(), col.typeArg().clone(),
Tuple.Create(-6148914691236517206L, -6148914691236517206L), (ref RowWriter writer2,
TypeArgument typeArg,
Tuple<Long, Long> values) ->
@@ -197,7 +197,7 @@ public final class RowWriterUnitTests {
new Out<LayoutColumn>();
assert layout.TryFind("tuple<null,tuple<int8,int8>>", tempOut_col5);
col = tempOut_col5.get();
ResultAssert.IsSuccess(writer.WriteScope(col.getPath(), col.getTypeArg().clone(),
ResultAssert.IsSuccess(writer.WriteScope(col.path(), col.typeArg().clone(),
Tuple.Create(NullValue.Default, Tuple.Create((byte)-86, (byte)-86)), (ref RowWriter writer2,
TypeArgument typeArg,
Tuple<NullValue, Tuple<Byte,
@@ -219,7 +219,7 @@ public final class RowWriterUnitTests {
new Out<LayoutColumn>();
assert layout.TryFind("tuple<bool,udt>", tempOut_col6);
col = tempOut_col6.get();
ResultAssert.IsSuccess(writer.WriteScope(col.getPath(), col.getTypeArg().clone(), Tuple.Create(false,
ResultAssert.IsSuccess(writer.WriteScope(col.path(), col.typeArg().clone(), Tuple.Create(false,
new RowReaderUnitTests.Point(1, 2)), (ref RowWriter writer2, TypeArgument typeArg, Tuple<Boolean,
RowReaderUnitTests.Point> values) ->
{
@@ -237,7 +237,7 @@ public final class RowWriterUnitTests {
new Out<LayoutColumn>();
assert layout.TryFind("nullable<int32,int64>", tempOut_col7);
col = tempOut_col7.get();
ResultAssert.IsSuccess(writer.WriteScope(col.getPath(), col.getTypeArg().clone(), Tuple.Create(null,
ResultAssert.IsSuccess(writer.WriteScope(col.path(), col.typeArg().clone(), Tuple.Create(null,
(Long)123L), (ref RowWriter writer2, TypeArgument typeArg, Tuple<Integer, Long> values) ->
{
RowWriter.WriterFunc<Integer> f0 = (Reference<RowWriter> writer, TypeArgument typeArg,
@@ -266,7 +266,7 @@ public final class RowWriterUnitTests {
new Out<LayoutColumn>();
assert layout.TryFind("tagged<utf8>", tempOut_col8);
col = tempOut_col8.get();
ResultAssert.IsSuccess(writer.WriteScope(col.getPath(), col.getTypeArg().clone(), Tuple.Create((byte)3,
ResultAssert.IsSuccess(writer.WriteScope(col.path(), col.typeArg().clone(), Tuple.Create((byte)3,
"hello"), (ref RowWriter writer2, TypeArgument typeArg, Tuple<Byte, String> values) ->
{
ResultAssert.IsSuccess(writer2.WriteUInt8(null, values.Item1));
@@ -278,7 +278,7 @@ public final class RowWriterUnitTests {
new Out<LayoutColumn>();
assert layout.TryFind("tagged<bool,utf8>", tempOut_col9);
col = tempOut_col9.get();
ResultAssert.IsSuccess(writer.WriteScope(col.getPath(), col.getTypeArg().clone(), Tuple.Create((byte)5,
ResultAssert.IsSuccess(writer.WriteScope(col.path(), col.typeArg().clone(), Tuple.Create((byte)5,
true, "bye"), (ref RowWriter writer2, TypeArgument typeArg, Tuple<Byte, Boolean, String> values) ->
{
ResultAssert.IsSuccess(writer2.WriteUInt8(null, values.Item1));
@@ -291,7 +291,7 @@ public final class RowWriterUnitTests {
new Out<LayoutColumn>();
assert layout.TryFind("set_t<utf8>", tempOut_col10);
col = tempOut_col10.get();
ResultAssert.IsSuccess(writer.WriteScope(col.getPath(), col.getTypeArg().clone(), new String[] { "abc",
ResultAssert.IsSuccess(writer.WriteScope(col.path(), col.typeArg().clone(), new String[] { "abc",
"xzy", "efg" }, (ref RowWriter writer2, TypeArgument typeArg, String[] values) ->
{
for (String value : values) {
@@ -305,7 +305,7 @@ public final class RowWriterUnitTests {
new Out<LayoutColumn>();
assert layout.TryFind("set_t<array_t<int8>>", tempOut_col11);
col = tempOut_col11.get();
ResultAssert.IsSuccess(writer.WriteScope(col.getPath(), col.getTypeArg().clone(), new byte[][]
ResultAssert.IsSuccess(writer.WriteScope(col.path(), col.typeArg().clone(), new byte[][]
{
new byte[] { 7, 8, 9 },
new byte[] { 4, 5, 6 },
@@ -331,7 +331,7 @@ public final class RowWriterUnitTests {
new Out<LayoutColumn>();
assert layout.TryFind("set_t<set_t<int32>>", tempOut_col12);
col = tempOut_col12.get();
ResultAssert.IsSuccess(writer.WriteScope(col.getPath(), col.getTypeArg().clone(), new int[][]
ResultAssert.IsSuccess(writer.WriteScope(col.path(), col.typeArg().clone(), new int[][]
{
new int[] { 4, 5, 6 },
new int[] { 7, 8, 9 },
@@ -357,7 +357,7 @@ public final class RowWriterUnitTests {
new Out<LayoutColumn>();
assert layout.TryFind("set_t<udt>", tempOut_col13);
col = tempOut_col13.get();
ResultAssert.IsSuccess(writer.WriteScope(col.getPath(), col.getTypeArg().clone(),
ResultAssert.IsSuccess(writer.WriteScope(col.path(), col.typeArg().clone(),
new RowReaderUnitTests.Point[]
{
new RowReaderUnitTests.Point(1, 2),
@@ -380,7 +380,7 @@ public final class RowWriterUnitTests {
new Out<LayoutColumn>();
assert layout.TryFind("map_t<utf8,utf8>", tempOut_col14);
col = tempOut_col14.get();
ResultAssert.IsSuccess(writer.WriteScope(col.getPath(), col.getTypeArg().clone(), new System.Tuple<T1,
ResultAssert.IsSuccess(writer.WriteScope(col.path(), col.typeArg().clone(), new System.Tuple<T1,
T2>[] { Tuple.Create("Harrison", "Han"), Tuple.Create("Mark", "Luke") }, (ref RowWriter writer2,
TypeArgument typeArg,
Tuple<String, String>[] values) ->
@@ -403,7 +403,7 @@ public final class RowWriterUnitTests {
new Out<LayoutColumn>();
assert layout.TryFind("map_t<int8,array_t<int8>>", tempOut_col15);
col = tempOut_col15.get();
ResultAssert.IsSuccess(writer.WriteScope(col.getPath(), col.getTypeArg().clone(), new System.Tuple<T1,
ResultAssert.IsSuccess(writer.WriteScope(col.path(), col.typeArg().clone(), new System.Tuple<T1,
T2>[] { Tuple.Create((byte)2, new byte[] { 4, 5, 6 }),
Tuple.Create((byte)1, new byte[] { 1, 2, 3 }) }, (ref RowWriter writer2, TypeArgument typeArg,
Tuple<Byte, byte[]>[] values) ->
@@ -435,7 +435,7 @@ public final class RowWriterUnitTests {
new Out<LayoutColumn>();
assert layout.TryFind("map_t<int16,map_t<int32,int32>>", tempOut_col16);
col = tempOut_col16.get();
ResultAssert.IsSuccess(writer.WriteScope(col.getPath(), col.getTypeArg().clone(), new System.Tuple<T1,
ResultAssert.IsSuccess(writer.WriteScope(col.path(), col.typeArg().clone(), new System.Tuple<T1,
T2>[] { Tuple.Create((short)2, new System.Tuple<T1, T2>[] { Tuple.Create(7, 8), Tuple.Create(5, 6) })
, Tuple.Create((short)1, new System.Tuple<T1, T2>[] { Tuple.Create(3, 4), Tuple.Create(1, 2) }) },
(ref RowWriter writer2, TypeArgument typeArg, Tuple<Short, Tuple<Integer, Integer>[]>[] values) ->
@@ -475,7 +475,7 @@ public final class RowWriterUnitTests {
new Out<LayoutColumn>();
assert layout.TryFind("map_t<float64,udt>", tempOut_col17);
col = tempOut_col17.get();
ResultAssert.IsSuccess(writer.WriteScope(col.getPath(), col.getTypeArg().clone(), new System.Tuple<T1, T2>[] { Tuple.Create(1.0, new RowReaderUnitTests.Point(1, 2)), Tuple.Create(2.0, new RowReaderUnitTests.Point(3, 4)), Tuple.Create(3.0, new RowReaderUnitTests.Point(5, 6)) }, (ref RowWriter writer2, TypeArgument typeArg, Tuple<Double, RowReaderUnitTests.Point>[] values) ->
ResultAssert.IsSuccess(writer.WriteScope(col.path(), col.typeArg().clone(), new System.Tuple<T1, T2>[] { Tuple.Create(1.0, new RowReaderUnitTests.Point(1, 2)), Tuple.Create(2.0, new RowReaderUnitTests.Point(3, 4)), Tuple.Create(3.0, new RowReaderUnitTests.Point(5, 6)) }, (ref RowWriter writer2, TypeArgument typeArg, Tuple<Double, RowReaderUnitTests.Point>[] values) ->
{
for (Tuple<Double, RowReaderUnitTests.Point> value : values) {
ResultAssert.IsSuccess(writer2.WriteScope(null, new TypeArgument(LayoutType.TypedTuple, typeArg.getTypeArgs().clone()), value, (ref RowWriter writer3, TypeArgument typeArg2, Tuple<Double, RowReaderUnitTests.Point> values2) ->

View File

@@ -130,7 +130,7 @@ public final class TypedMapUnitTests {
// 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
// modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().ReadScope(tempReference_row4, ref mapScope, out mapScope));
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().ReadScope(tempReference_row4, ref mapScope, out mapScope));
row = tempReference_row4.get();
for (String key : permutation) {
KeyValuePair<String, String> pair = new KeyValuePair<String, String>(key, "map lookup matches only on" +
@@ -160,13 +160,13 @@ public final class TypedMapUnitTests {
// 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 modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().Find(tempReference_row7, ref mapScope, ref tempCursor,
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().Find(tempReference_row7, ref mapScope, ref tempCursor,
out findScope));
row = tempReference_row7.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 modified:
TypeArgument tupleType = c.<LayoutUniqueScope>TypeAs().FieldType(ref mapScope);
TypeArgument tupleType = c.<LayoutUniqueScope>typeAs().FieldType(ref mapScope);
Reference<RowBuffer> tempReference_row8 =
new Reference<RowBuffer>(row);
Reference<RowCursor> tempReference_findScope =
@@ -222,7 +222,7 @@ public final class TypedMapUnitTests {
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
// 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 modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().ReadScope(tempReference_row5, ref mapScope, out mapScope));
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().ReadScope(tempReference_row5, ref mapScope, out mapScope));
row = tempReference_row5.get();
for (String key : t1.Cast.keySet()) {
KeyValuePair<String, String> pair = new KeyValuePair<String, String>(key, "map lookup matches only on key");
@@ -250,7 +250,7 @@ public final class TypedMapUnitTests {
// 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
// modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().Find(tempReference_row8, ref mapScope, ref tempCursor,
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().Find(tempReference_row8, ref mapScope, ref tempCursor,
out findScope));
row = tempReference_row8.get();
Reference<RowBuffer> tempReference_row9 =
@@ -331,7 +331,7 @@ public final class TypedMapUnitTests {
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
// 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 modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().ReadScope(tempReference_row5, ref mapScope, out mapScope));
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().ReadScope(tempReference_row5, ref mapScope, out mapScope));
row = tempReference_row5.get();
Reference<RowBuffer> tempReference_row6 =
new Reference<RowBuffer>(row);
@@ -352,7 +352,7 @@ public final class TypedMapUnitTests {
new Reference<RowBuffer>(row);
// 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 modified:
ResultAssert.Exists(c.<LayoutUniqueScope>TypeAs().MoveField(tempReference_row8, ref mapScope, ref tempCursor,
ResultAssert.Exists(c.<LayoutUniqueScope>typeAs().MoveField(tempReference_row8, ref mapScope, ref tempCursor,
UpdateOptions.Insert));
row = tempReference_row8.get();
Reference<RowBuffer> tempReference_row9 =
@@ -390,7 +390,7 @@ public final class TypedMapUnitTests {
new Reference<RowBuffer>(row);
// 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 modified:
ResultAssert.Exists(c.<LayoutUniqueScope>TypeAs().MoveField(tempReference_row13, ref mapScope, ref tempCursor,
ResultAssert.Exists(c.<LayoutUniqueScope>typeAs().MoveField(tempReference_row13, ref mapScope, ref tempCursor,
UpdateOptions.Insert));
row = tempReference_row13.get();
Reference<RowBuffer> tempReference_row14 =
@@ -427,7 +427,7 @@ public final class TypedMapUnitTests {
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
// 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 modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().ReadScope(tempReference_row17, ref mapScope, out mapScope));
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().ReadScope(tempReference_row17, ref mapScope, out mapScope));
row = tempReference_row17.get();
KeyValuePair<UUID, Double> pair = KeyValuePair.Create(UUID.fromString("{4674962B-CE11-4916-81C5-0421EE36F168" +
"}"), 11000000.00);
@@ -448,7 +448,7 @@ public final class TypedMapUnitTests {
new Reference<RowBuffer>(row);
// 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 modified:
ResultAssert.Exists(c.<LayoutUniqueScope>TypeAs().MoveField(tempReference_row20, ref mapScope, ref tempCursor,
ResultAssert.Exists(c.<LayoutUniqueScope>typeAs().MoveField(tempReference_row20, ref mapScope, ref tempCursor,
UpdateOptions.Insert));
row = tempReference_row20.get();
Reference<RowBuffer> tempReference_row21 =
@@ -498,7 +498,7 @@ public final class TypedMapUnitTests {
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
// 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 modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().WriteScope(tempReference_row3, ref mapScope, c.TypeArgs,
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().WriteScope(tempReference_row3, ref mapScope, c.TypeArgs,
out mapScope));
row = tempReference_row3.get();
Reference<RowBuffer> tempReference_row4 =
@@ -528,7 +528,7 @@ public final class TypedMapUnitTests {
new Reference<RowBuffer>(row);
// 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 modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().MoveField(tempReference_row7, ref mapScope, ref tempCursor));
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().MoveField(tempReference_row7, ref mapScope, ref tempCursor));
row = tempReference_row7.get();
Reference<RowBuffer> tempReference_row8 =
new Reference<RowBuffer>(row);
@@ -564,13 +564,13 @@ public final class TypedMapUnitTests {
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
// 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 modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().WriteScope(tempReference_row11, ref mapScope, c.TypeArgs,
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().WriteScope(tempReference_row11, ref mapScope, c.TypeArgs,
out mapScope));
row = tempReference_row11.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 modified:
LayoutIndexedScope tupleLayout =
c.<LayoutUniqueScope>TypeAs().FieldType(ref mapScope).<LayoutIndexedScope>TypeAs();
c.<LayoutUniqueScope>typeAs().FieldType(ref mapScope).<LayoutIndexedScope>TypeAs();
Reference<RowBuffer> tempReference_row12 =
new Reference<RowBuffer>(row);
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword - these
@@ -613,7 +613,7 @@ public final class TypedMapUnitTests {
new Reference<RowBuffer>(row);
// 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 modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().MoveField(tempReference_row17, ref mapScope, ref tempCursor));
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().MoveField(tempReference_row17, ref mapScope, ref tempCursor));
row = tempReference_row17.get();
Reference<RowBuffer> tempReference_row18 =
new Reference<RowBuffer>(row);
@@ -719,7 +719,7 @@ public final class TypedMapUnitTests {
// 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
// modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().ReadScope(tempReference_row4, ref mapScope, out mapScope));
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().ReadScope(tempReference_row4, ref mapScope, out mapScope));
row = tempReference_row4.get();
for (String key : permutation) {
// Verify it is already there.
@@ -750,7 +750,7 @@ public final class TypedMapUnitTests {
// 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 modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().Find(tempReference_row7, ref mapScope, ref tempCursor,
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().Find(tempReference_row7, ref mapScope, ref tempCursor,
out findScope));
row = tempReference_row7.get();
@@ -776,7 +776,7 @@ public final class TypedMapUnitTests {
// 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 modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().MoveField(tempReference_row10, ref mapScope,
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().MoveField(tempReference_row10, ref mapScope,
ref tempCursor, UpdateOptions.Update));
row = tempReference_row10.get();
@@ -804,7 +804,7 @@ public final class TypedMapUnitTests {
// 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 modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().Find(tempReference_row13, ref mapScope, ref tempCursor
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().Find(tempReference_row13, ref mapScope, ref tempCursor
, out findScope));
row = tempReference_row13.get();
Reference<RowBuffer> tempReference_row14 =
@@ -846,7 +846,7 @@ public final class TypedMapUnitTests {
// 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 modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().MoveField(tempReference_row17, ref mapScope,
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().MoveField(tempReference_row17, ref mapScope,
ref tempCursor, UpdateOptions.Upsert));
row = tempReference_row17.get();
@@ -874,7 +874,7 @@ public final class TypedMapUnitTests {
// 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 modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().Find(tempReference_row20, ref mapScope, ref tempCursor
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().Find(tempReference_row20, ref mapScope, ref tempCursor
, out findScope));
row = tempReference_row20.get();
Reference<RowBuffer> tempReference_row21 =
@@ -913,7 +913,7 @@ public final class TypedMapUnitTests {
// 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 modified:
ResultAssert.Exists(c.<LayoutUniqueScope>TypeAs().MoveField(tempReference_row24, ref mapScope,
ResultAssert.Exists(c.<LayoutUniqueScope>typeAs().MoveField(tempReference_row24, ref mapScope,
ref tempCursor, UpdateOptions.Insert));
row = tempReference_row24.get();
@@ -939,7 +939,7 @@ public final class TypedMapUnitTests {
// 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 modified:
ResultAssert.TypeConstraint(c.<LayoutUniqueScope>TypeAs().MoveField(tempReference_row27, ref mapScope,
ResultAssert.TypeConstraint(c.<LayoutUniqueScope>typeAs().MoveField(tempReference_row27, ref mapScope,
ref tempCursor, UpdateOptions.InsertAt));
row = tempReference_row27.get();
}
@@ -953,12 +953,12 @@ public final class TypedMapUnitTests {
// 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:
assert udt.TryFind("domestic", out c);
Out<BigDecimal> tempOut_Domestic = new Out<BigDecimal>();
ResultAssert.IsSuccess(c.<LayoutDecimal>TypeAs().ReadFixed(row, udtScope, c, tempOut_Domestic));
ResultAssert.IsSuccess(c.<LayoutDecimal>typeAs().ReadFixed(row, udtScope, c, tempOut_Domestic));
m.Domestic = tempOut_Domestic.get();
// 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:
assert udt.TryFind("worldwide", out c);
Out<BigDecimal> tempOut_Worldwide = new Out<BigDecimal>();
ResultAssert.IsSuccess(c.<LayoutDecimal>TypeAs().ReadFixed(row, udtScope, c, tempOut_Worldwide));
ResultAssert.IsSuccess(c.<LayoutDecimal>typeAs().ReadFixed(row, udtScope, c, tempOut_Worldwide));
m.Worldwide = tempOut_Worldwide.get();
return m;
}
@@ -1020,7 +1020,7 @@ public final class TypedMapUnitTests {
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
// 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 modified:
if (c.<LayoutUniqueScope>TypeAs().ReadScope(row, ref castScope, out castScope) == Result.Success) {
if (c.<LayoutUniqueScope>typeAs().ReadScope(row, ref castScope, out castScope) == Result.Success) {
value.Cast = new HashMap<String, String>();
while (castScope.MoveNext(row)) {
Reference<RowCursor> tempReference_castScope =
@@ -1047,7 +1047,7 @@ public final class TypedMapUnitTests {
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
// 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 modified:
if (c.<LayoutUniqueScope>TypeAs().ReadScope(row, ref statsScope, out statsScope) == Result.Success) {
if (c.<LayoutUniqueScope>typeAs().ReadScope(row, ref statsScope, out statsScope) == Result.Success) {
value.Stats = new HashMap<UUID, Double>();
while (statsScope.MoveNext(row)) {
Reference<RowCursor> tempReference_statsScope =
@@ -1074,7 +1074,7 @@ public final class TypedMapUnitTests {
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
// 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 modified:
if (c.<LayoutUniqueScope>TypeAs().ReadScope(row, ref relatedScope, out relatedScope) == Result.Success) {
if (c.<LayoutUniqueScope>typeAs().ReadScope(row, ref relatedScope, out relatedScope) == Result.Success) {
value.Related = new HashMap<String, HashMap<Long, String>>();
TypeArgument keyType = c.TypeArgs[0];
TypeArgument valueType = c.TypeArgs[1];
@@ -1136,7 +1136,7 @@ public final class TypedMapUnitTests {
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
// 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 modified:
if (c.<LayoutUniqueScope>TypeAs().ReadScope(row, ref revenueScope, out revenueScope) == Result.Success) {
if (c.<LayoutUniqueScope>typeAs().ReadScope(row, ref revenueScope, out revenueScope) == Result.Success) {
value.Revenue = new HashMap<LocalDateTime, Earnings>();
TypeArgument keyType = c.TypeArgs[0];
TypeArgument valueType = c.TypeArgs[1];
@@ -1182,10 +1182,10 @@ public final class TypedMapUnitTests {
LayoutColumn c;
// 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:
assert udt.TryFind("domestic", out c);
ResultAssert.IsSuccess(c.<LayoutDecimal>TypeAs().WriteFixed(row, udtScope, c, m.Domestic));
ResultAssert.IsSuccess(c.<LayoutDecimal>typeAs().WriteFixed(row, udtScope, c, m.Domestic));
// 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:
assert udt.TryFind("worldwide", out c);
ResultAssert.IsSuccess(c.<LayoutDecimal>TypeAs().WriteFixed(row, udtScope, c, m.Worldwide));
ResultAssert.IsSuccess(c.<LayoutDecimal>typeAs().WriteFixed(row, udtScope, c, m.Worldwide));
}
private static <TKey, TValue> Result WriteKeyValue(Reference<RowBuffer> row,
@@ -1227,15 +1227,15 @@ public final class TypedMapUnitTests {
// 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:
root.get().Clone(out castScope).Find(row, c.getPath());
root.get().Clone(out castScope).Find(row, c.path());
// 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: 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
// modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().WriteScope(row, ref castScope,
c.getTypeArgs().clone(), out castScope));
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().WriteScope(row, ref castScope,
c.typeArgs().clone(), out castScope));
for (KeyValuePair<String, String> item : value.Cast) {
RowCursor tempCursor;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword -
@@ -1245,13 +1245,13 @@ public final class TypedMapUnitTests {
Reference<RowCursor> tempReference_tempCursor =
new Reference<RowCursor>(tempCursor);
ResultAssert.IsSuccess(TypedMapUnitTests.WriteKeyValue(row, tempReference_tempCursor,
c.getTypeArgs().clone(), item));
c.typeArgs().clone(), item));
tempCursor = tempReference_tempCursor.get();
Reference<RowCursor> tempReference_castScope =
new Reference<RowCursor>(castScope);
Reference<RowCursor> tempReference_tempCursor2 =
new Reference<RowCursor>(tempCursor);
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().MoveField(row, tempReference_castScope,
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().MoveField(row, tempReference_castScope,
tempReference_tempCursor2));
tempCursor = tempReference_tempCursor2.get();
castScope = tempReference_castScope.get();
@@ -1267,15 +1267,15 @@ public final class TypedMapUnitTests {
// 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:
root.get().Clone(out statsScope).Find(row, c.getPath());
root.get().Clone(out statsScope).Find(row, c.path());
// 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: 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
// modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().WriteScope(row, ref statsScope,
c.getTypeArgs().clone(), out statsScope));
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().WriteScope(row, ref statsScope,
c.typeArgs().clone(), out statsScope));
for (KeyValuePair<UUID, Double> item : value.Stats) {
RowCursor tempCursor;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword -
@@ -1285,13 +1285,13 @@ public final class TypedMapUnitTests {
Reference<RowCursor> tempReference_tempCursor3 =
new Reference<RowCursor>(tempCursor);
ResultAssert.IsSuccess(TypedMapUnitTests.WriteKeyValue(row, tempReference_tempCursor3,
c.getTypeArgs().clone(), item));
c.typeArgs().clone(), item));
tempCursor = tempReference_tempCursor3.get();
Reference<RowCursor> tempReference_statsScope =
new Reference<RowCursor>(statsScope);
Reference<RowCursor> tempReference_tempCursor4 =
new Reference<RowCursor>(tempCursor);
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().MoveField(row, tempReference_statsScope,
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().MoveField(row, tempReference_statsScope,
tempReference_tempCursor4));
tempCursor = tempReference_tempCursor4.get();
statsScope = tempReference_statsScope.get();
@@ -1307,15 +1307,15 @@ public final class TypedMapUnitTests {
// 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:
root.get().Clone(out relatedScoped).Find(row, c.getPath());
root.get().Clone(out relatedScoped).Find(row, c.path());
// 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: 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
// modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().WriteScope(row, ref relatedScoped,
c.getTypeArgs().clone(), out relatedScoped));
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().WriteScope(row, ref relatedScoped,
c.typeArgs().clone(), out relatedScoped));
for (KeyValuePair<String, HashMap<Long, String>> item : value.Related) {
assert item.Value != null;
@@ -1332,15 +1332,15 @@ public final class TypedMapUnitTests {
// 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 modified:
ResultAssert.IsSuccess(tupleLayout.WriteScope(row, ref tempCursor1, c.getTypeArgs().clone(),
ResultAssert.IsSuccess(tupleLayout.WriteScope(row, ref tempCursor1, c.typeArgs().clone(),
out tupleScope));
// 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 modified:
ResultAssert.IsSuccess(c.getTypeArgs().get(0).type().<LayoutUtf8>typeAs().WriteSparse(row,
ResultAssert.IsSuccess(c.typeArgs().get(0).type().<LayoutUtf8>typeAs().WriteSparse(row,
ref tupleScope, item.Key));
assert tupleScope.MoveNext(row);
TypeArgument valueType = c.getTypeArgs().get(1).clone();
TypeArgument valueType = c.typeArgs().get(1).clone();
LayoutUniqueScope valueLayout = valueType.getType().<LayoutUniqueScope>TypeAs();
RowCursor innerScope;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword -
@@ -1375,7 +1375,7 @@ public final class TypedMapUnitTests {
new Reference<RowCursor>(relatedScoped);
Reference<RowCursor> tempReference_tempCursor1 =
new Reference<RowCursor>(tempCursor1);
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().MoveField(row, tempReference_relatedScoped,
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().MoveField(row, tempReference_relatedScoped,
tempReference_tempCursor1));
tempCursor1 = tempReference_tempCursor1.get();
relatedScoped = tempReference_relatedScoped.get();
@@ -1391,15 +1391,15 @@ public final class TypedMapUnitTests {
// 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:
root.get().Clone(out revenueScope).Find(row, c.getPath());
root.get().Clone(out revenueScope).Find(row, c.path());
// 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: 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
// modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().WriteScope(row, ref revenueScope,
c.getTypeArgs().clone(), out revenueScope));
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().WriteScope(row, ref revenueScope,
c.typeArgs().clone(), out revenueScope));
for (KeyValuePair<LocalDateTime, Earnings> item : value.Revenue) {
assert item.Value != null;
@@ -1416,15 +1416,15 @@ public final class TypedMapUnitTests {
// 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 modified:
ResultAssert.IsSuccess(tupleLayout.WriteScope(row, ref tempCursor1, c.getTypeArgs().clone(),
ResultAssert.IsSuccess(tupleLayout.WriteScope(row, ref tempCursor1, c.typeArgs().clone(),
out tupleScope));
Reference<RowCursor> tempReference_tupleScope =
new Reference<RowCursor>(tupleScope);
ResultAssert.IsSuccess(c.getTypeArgs().get(0).type().<LayoutDateTime>typeAs().WriteSparse(row,
ResultAssert.IsSuccess(c.typeArgs().get(0).type().<LayoutDateTime>typeAs().WriteSparse(row,
tempReference_tupleScope, item.Key));
tupleScope = tempReference_tupleScope.get();
assert tupleScope.MoveNext(row);
TypeArgument valueType = c.getTypeArgs().get(1).clone();
TypeArgument valueType = c.typeArgs().get(1).clone();
LayoutUDT valueLayout = valueType.getType().<LayoutUDT>TypeAs();
Reference<RowCursor> tempReference_tupleScope2 =
new Reference<RowCursor>(tupleScope);
@@ -1444,7 +1444,7 @@ public final class TypedMapUnitTests {
new Reference<RowCursor>(revenueScope);
Reference<RowCursor> tempReference_tempCursor12 =
new Reference<RowCursor>(tempCursor1);
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().MoveField(row, tempReference_revenueScope,
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().MoveField(row, tempReference_revenueScope,
tempReference_tempCursor12));
tempCursor1 = tempReference_tempCursor12.get();
revenueScope = tempReference_revenueScope.get();

View File

@@ -133,7 +133,7 @@ public final class TypedSetUnitTests {
// 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
// modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().ReadScope(tempReference_row5, ref setScope, out setScope));
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().ReadScope(tempReference_row5, ref setScope, out setScope));
row = tempReference_row5.get();
for (UUID p : t1.Projects) {
Reference<RowBuffer> tempReference_row6 =
@@ -161,7 +161,7 @@ public final class TypedSetUnitTests {
// 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 modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().Find(tempReference_row8, ref setScope, ref tempCursor,
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().Find(tempReference_row8, ref setScope, ref tempCursor,
out findScope));
row = tempReference_row8.get();
Reference<RowBuffer> tempReference_row9 =
@@ -221,7 +221,7 @@ public final class TypedSetUnitTests {
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
// 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 modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().ReadScope(tempReference_row5, ref setScope, out setScope));
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().ReadScope(tempReference_row5, ref setScope, out setScope));
row = tempReference_row5.get();
for (int i = 0; i < t1.Attendees.size(); i++) {
Reference<RowBuffer> tempReference_row6 =
@@ -249,7 +249,7 @@ public final class TypedSetUnitTests {
// 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
// modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().Find(tempReference_row8, ref setScope, ref tempCursor,
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().Find(tempReference_row8, ref setScope, ref tempCursor,
out findScope));
row = tempReference_row8.get();
Assert.AreEqual(i, findScope.Index, String.format("Failed to find t1.Attendees[%1$s]", i));
@@ -270,7 +270,7 @@ public final class TypedSetUnitTests {
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
// 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 modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().ReadScope(tempReference_row10, ref setScope, out setScope));
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().ReadScope(tempReference_row10, ref setScope, out setScope));
row = tempReference_row10.get();
TypeArgument innerType = c.TypeArgs[0];
TypeArgument itemType = innerType.getTypeArgs().get(0).clone();
@@ -335,7 +335,7 @@ public final class TypedSetUnitTests {
// 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
// modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().Find(tempReference_row16, ref setScope, ref tempCursor1,
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().Find(tempReference_row16, ref setScope, ref tempCursor1,
out findScope));
row = tempReference_row16.get();
Assert.AreEqual(i, findScope.Index, String.format("Failed to find t1.Prices[%1$s]", i));
@@ -403,7 +403,7 @@ public final class TypedSetUnitTests {
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
// 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 modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().ReadScope(tempReference_row5, ref setScope, out setScope));
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().ReadScope(tempReference_row5, ref setScope, out setScope));
row = tempReference_row5.get();
Reference<RowBuffer> tempReference_row6 =
new Reference<RowBuffer>(row);
@@ -423,7 +423,7 @@ public final class TypedSetUnitTests {
new Reference<RowBuffer>(row);
// 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 modified:
ResultAssert.Exists(c.<LayoutUniqueScope>TypeAs().MoveField(tempReference_row8, ref setScope, ref tempCursor,
ResultAssert.Exists(c.<LayoutUniqueScope>typeAs().MoveField(tempReference_row8, ref setScope, ref tempCursor,
UpdateOptions.Insert));
row = tempReference_row8.get();
Reference<RowBuffer> tempReference_row9 =
@@ -446,7 +446,7 @@ public final class TypedSetUnitTests {
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
// 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 modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().Find(tempReference_row11, ref setScope, ref tempCursor, out _));
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().Find(tempReference_row11, ref setScope, ref tempCursor, out _));
row = tempReference_row11.get();
Reference<RowBuffer> tempReference_row12 =
new Reference<RowBuffer>(row);
@@ -479,7 +479,7 @@ public final class TypedSetUnitTests {
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
// 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 modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().ReadScope(tempReference_row15, ref setScope, out setScope));
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().ReadScope(tempReference_row15, ref setScope, out setScope));
row = tempReference_row15.get();
Reference<RowBuffer> tempReference_row16 =
new Reference<RowBuffer>(row);
@@ -498,7 +498,7 @@ public final class TypedSetUnitTests {
new Reference<RowBuffer>(row);
// 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 modified:
ResultAssert.Exists(c.<LayoutUniqueScope>TypeAs().MoveField(tempReference_row18, ref setScope, ref tempCursor,
ResultAssert.Exists(c.<LayoutUniqueScope>typeAs().MoveField(tempReference_row18, ref setScope, ref tempCursor,
UpdateOptions.Insert));
row = tempReference_row18.get();
@@ -518,7 +518,7 @@ public final class TypedSetUnitTests {
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
// 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 modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().ReadScope(tempReference_row20, ref setScope, out setScope));
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().ReadScope(tempReference_row20, ref setScope, out setScope));
row = tempReference_row20.get();
TypeArgument innerType = c.TypeArgs[0];
LayoutUniqueScope innerLayout = innerType.getType().<LayoutUniqueScope>TypeAs();
@@ -572,7 +572,7 @@ public final class TypedSetUnitTests {
new Reference<RowBuffer>(row);
// 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 modified:
ResultAssert.Exists(c.<LayoutUniqueScope>TypeAs().MoveField(tempReference_row26, ref setScope, ref tempCursor1,
ResultAssert.Exists(c.<LayoutUniqueScope>typeAs().MoveField(tempReference_row26, ref setScope, ref tempCursor1,
UpdateOptions.Insert));
row = tempReference_row26.get();
@@ -592,7 +592,7 @@ public final class TypedSetUnitTests {
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
// 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 modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().ReadScope(tempReference_row28, ref setScope, out setScope));
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().ReadScope(tempReference_row28, ref setScope, out setScope));
row = tempReference_row28.get();
LayoutUDT udtLayout = c.TypeArgs[0].Type.<LayoutUDT>TypeAs();
Reference<RowBuffer> tempReference_row29 =
@@ -625,7 +625,7 @@ public final class TypedSetUnitTests {
new Reference<RowBuffer>(row);
// 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 modified:
ResultAssert.Exists(c.<LayoutUniqueScope>TypeAs().MoveField(tempReference_row32, ref setScope, ref tempCursor,
ResultAssert.Exists(c.<LayoutUniqueScope>typeAs().MoveField(tempReference_row32, ref setScope, ref tempCursor,
UpdateOptions.Insert));
row = tempReference_row32.get();
@@ -645,7 +645,7 @@ public final class TypedSetUnitTests {
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
// 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 modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().ReadScope(tempReference_row34, ref setScope, out setScope));
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().ReadScope(tempReference_row34, ref setScope, out setScope));
row = tempReference_row34.get();
innerType = c.TypeArgs[0];
LayoutIndexedScope tupleLayout = innerType.getType().<LayoutIndexedScope>TypeAs();
@@ -687,7 +687,7 @@ public final class TypedSetUnitTests {
new Reference<RowBuffer>(row);
// 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 modified:
ResultAssert.Exists(c.<LayoutUniqueScope>TypeAs().MoveField(tempReference_row40, ref setScope, ref tempCursor,
ResultAssert.Exists(c.<LayoutUniqueScope>typeAs().MoveField(tempReference_row40, ref setScope, ref tempCursor,
UpdateOptions.Insert));
row = tempReference_row40.get();
}
@@ -719,7 +719,7 @@ public final class TypedSetUnitTests {
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
// 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 modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().WriteScope(tempReference_row3, ref setScope, c.TypeArgs,
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().WriteScope(tempReference_row3, ref setScope, c.TypeArgs,
out setScope));
row = tempReference_row3.get();
Reference<RowBuffer> tempReference_row4 =
@@ -750,7 +750,7 @@ public final class TypedSetUnitTests {
new Reference<RowBuffer>(row);
// 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 modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().MoveField(tempReference_row8, ref setScope, ref tempCursor));
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().MoveField(tempReference_row8, ref setScope, ref tempCursor));
row = tempReference_row8.get();
Reference<RowBuffer> tempReference_row9 =
new Reference<RowBuffer>(row);
@@ -786,7 +786,7 @@ public final class TypedSetUnitTests {
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
// 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 modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().WriteScope(tempReference_row13, ref setScope, c.TypeArgs,
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().WriteScope(tempReference_row13, ref setScope, c.TypeArgs,
out setScope));
row = tempReference_row13.get();
TypeArgument innerType = c.TypeArgs[0];
@@ -844,7 +844,7 @@ public final class TypedSetUnitTests {
new Reference<RowBuffer>(row);
// 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 modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().MoveField(tempReference_row21, ref setScope, ref tempCursor1));
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().MoveField(tempReference_row21, ref setScope, ref tempCursor1));
row = tempReference_row21.get();
Reference<RowBuffer> tempReference_row22 =
new Reference<RowBuffer>(row);
@@ -928,7 +928,7 @@ public final class TypedSetUnitTests {
// 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
// modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().ReadScope(tempReference_row4, ref projScope, out projScope));
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().ReadScope(tempReference_row4, ref projScope, out projScope));
row = tempReference_row4.get();
for (UUID item : t1.Projects) {
Reference<RowBuffer> tempReference_row5 =
@@ -952,7 +952,7 @@ public final class TypedSetUnitTests {
// 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 modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().MoveField(tempReference_row7, ref projScope,
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().MoveField(tempReference_row7, ref projScope,
ref tempCursor));
row = tempReference_row7.get();
}
@@ -1024,7 +1024,7 @@ public final class TypedSetUnitTests {
// 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
// modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().ReadScope(tempReference_row5, ref setScope, out setScope));
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().ReadScope(tempReference_row5, ref setScope, out setScope));
row = tempReference_row5.get();
for (UUID elm : t1.Projects) {
// Verify it is already there.
@@ -1053,7 +1053,7 @@ public final class TypedSetUnitTests {
// 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 modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().Find(tempReference_row8, ref setScope, ref tempCursor,
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().Find(tempReference_row8, ref setScope, ref tempCursor,
value:
out RowCursor _))
row = tempReference_row8.get();
@@ -1079,7 +1079,7 @@ public final class TypedSetUnitTests {
// 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 modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().MoveField(tempReference_row11, ref setScope,
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().MoveField(tempReference_row11, ref setScope,
ref tempCursor, UpdateOptions.Update));
row = tempReference_row11.get();
@@ -1104,7 +1104,7 @@ public final class TypedSetUnitTests {
// 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 modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().MoveField(tempReference_row14, ref setScope,
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().MoveField(tempReference_row14, ref setScope,
ref tempCursor));
row = tempReference_row14.get();
@@ -1129,7 +1129,7 @@ public final class TypedSetUnitTests {
// 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 modified:
ResultAssert.Exists(c.<LayoutUniqueScope>TypeAs().MoveField(tempReference_row17, ref setScope,
ResultAssert.Exists(c.<LayoutUniqueScope>typeAs().MoveField(tempReference_row17, ref setScope,
ref tempCursor, UpdateOptions.Insert));
row = tempReference_row17.get();
@@ -1154,7 +1154,7 @@ public final class TypedSetUnitTests {
// 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 modified:
ResultAssert.TypeConstraint(c.<LayoutUniqueScope>TypeAs().MoveField(tempReference_row20, ref setScope,
ResultAssert.TypeConstraint(c.<LayoutUniqueScope>typeAs().MoveField(tempReference_row20, ref setScope,
ref tempCursor, UpdateOptions.InsertAt));
row = tempReference_row20.get();
}
@@ -1168,14 +1168,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:
assert matchLayout.TryFind("label", out c);
Out<String> tempOut_Label = new Out<String>();
ResultAssert.IsSuccess(c.<LayoutUtf8>TypeAs().ReadVariable(row, matchScope, c, tempOut_Label));
ResultAssert.IsSuccess(c.<LayoutUtf8>typeAs().ReadVariable(row, matchScope, c, tempOut_Label));
m.Label = tempOut_Label.get();
// 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:
assert matchLayout.TryFind("count", out c);
Out<Byte> tempOut_Count = new Out<Byte>();
//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
//ORIGINAL LINE: ResultAssert.IsSuccess(c.TypeAs<LayoutUInt8>().ReadFixed(ref row, ref matchScope, c, out m.Count));
ResultAssert.IsSuccess(c.<LayoutUInt8>TypeAs().ReadFixed(row, matchScope, c, tempOut_Count));
ResultAssert.IsSuccess(c.<LayoutUInt8>typeAs().ReadFixed(row, matchScope, c, tempOut_Count));
m.Count = tempOut_Count.get();
return m;
}
@@ -1195,7 +1195,7 @@ public final class TypedSetUnitTests {
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
// 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 modified:
if (c.<LayoutUniqueScope>TypeAs().ReadScope(row, ref tagsScope, out tagsScope) == Result.Success) {
if (c.<LayoutUniqueScope>typeAs().ReadScope(row, ref tagsScope, out tagsScope) == Result.Success) {
value.Attendees = new ArrayList<String>();
while (tagsScope.MoveNext(row)) {
String item;
@@ -1222,7 +1222,7 @@ public final class TypedSetUnitTests {
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
// 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 modified:
if (c.<LayoutUniqueScope>TypeAs().ReadScope(row, ref projScope, out projScope) == Result.Success) {
if (c.<LayoutUniqueScope>typeAs().ReadScope(row, ref projScope, out projScope) == Result.Success) {
value.Projects = new ArrayList<UUID>();
while (projScope.MoveNext(row)) {
java.util.UUID item;
@@ -1249,7 +1249,7 @@ public final class TypedSetUnitTests {
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
// 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 modified:
if (c.<LayoutUniqueScope>TypeAs().ReadScope(row, ref checkboxScope, out checkboxScope) == Result.Success) {
if (c.<LayoutUniqueScope>typeAs().ReadScope(row, ref checkboxScope, out checkboxScope) == Result.Success) {
value.Checkboxes = new ArrayList<Boolean>();
while (checkboxScope.MoveNext(row)) {
boolean item;
@@ -1276,7 +1276,7 @@ public final class TypedSetUnitTests {
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
// 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 modified:
if (c.<LayoutUniqueScope>TypeAs().ReadScope(row, ref pricesScope, out pricesScope) == Result.Success) {
if (c.<LayoutUniqueScope>typeAs().ReadScope(row, ref pricesScope, out pricesScope) == Result.Success) {
value.Prices = new ArrayList<ArrayList<Float>>();
TypeArgument innerType = c.TypeArgs[0];
LayoutUniqueScope innerLayout = innerType.getType().<LayoutUniqueScope>TypeAs();
@@ -1317,7 +1317,7 @@ public final class TypedSetUnitTests {
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
// 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 modified:
if (c.<LayoutUniqueScope>TypeAs().ReadScope(row, ref nestedScope, out nestedScope) == Result.Success) {
if (c.<LayoutUniqueScope>typeAs().ReadScope(row, ref nestedScope, out nestedScope) == Result.Success) {
value.Nested = new ArrayList<ArrayList<ArrayList<Integer>>>();
TypeArgument in2Type = c.TypeArgs[0];
LayoutUniqueScope in2Layout = in2Type.getType().<LayoutUniqueScope>TypeAs();
@@ -1372,7 +1372,7 @@ public final class TypedSetUnitTests {
// cannot be converted using the 'Out' helper class unless the method is within the code being modified:
// 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 modified:
if (c.<LayoutUniqueScope>TypeAs().ReadScope(row, ref shoppingScope, out shoppingScope) == Result.Success) {
if (c.<LayoutUniqueScope>typeAs().ReadScope(row, ref shoppingScope, out shoppingScope) == Result.Success) {
value.Shopping = new ArrayList<ShoppingItem>();
while (shoppingScope.MoveNext(row)) {
TypeArgument innerType = c.TypeArgs[0];
@@ -1403,7 +1403,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: 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 modified:
if (c.<LayoutUniqueScope>TypeAs().ReadScope(row, ref workScope, out workScope) == Result.Success) {
if (c.<LayoutUniqueScope>typeAs().ReadScope(row, ref workScope, out workScope) == Result.Success) {
//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
//ORIGINAL LINE: value.Work = new List<Tuple<bool, ulong>>();
value.Work = new ArrayList<Tuple<Boolean, Long>>();
@@ -1469,10 +1469,10 @@ public final class TypedSetUnitTests {
LayoutColumn c;
// 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:
assert matchLayout.TryFind("label", out c);
ResultAssert.IsSuccess(c.<LayoutUtf8>TypeAs().WriteVariable(row, matchScope, c, m.Label));
ResultAssert.IsSuccess(c.<LayoutUtf8>typeAs().WriteVariable(row, matchScope, c, m.Label));
// 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:
assert matchLayout.TryFind("count", out c);
ResultAssert.IsSuccess(c.<LayoutUInt8>TypeAs().WriteFixed(row, matchScope, c, m.Count));
ResultAssert.IsSuccess(c.<LayoutUInt8>typeAs().WriteFixed(row, matchScope, c, m.Count));
}
private void WriteTodo(Reference<RowBuffer> row, Reference<RowCursor> root, Todo value) {
@@ -1487,15 +1487,15 @@ 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:
root.get().Clone(out attendScope).Find(row, c.getPath());
root.get().Clone(out attendScope).Find(row, c.path());
// 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: 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
// modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().WriteScope(row, ref attendScope,
c.getTypeArgs().clone(), out attendScope));
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().WriteScope(row, ref attendScope,
c.typeArgs().clone(), out attendScope));
for (String item : value.Attendees) {
RowCursor tempCursor;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword -
@@ -1505,13 +1505,13 @@ public final class TypedSetUnitTests {
// 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 modified:
ResultAssert.IsSuccess(c.getTypeArgs().get(0).type().<LayoutUtf8>typeAs().WriteSparse(row,
ResultAssert.IsSuccess(c.typeArgs().get(0).type().<LayoutUtf8>typeAs().WriteSparse(row,
ref tempCursor, item));
Reference<RowCursor> tempReference_attendScope =
new Reference<RowCursor>(attendScope);
Reference<RowCursor> tempReference_tempCursor =
new Reference<RowCursor>(tempCursor);
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().MoveField(row, tempReference_attendScope,
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().MoveField(row, tempReference_attendScope,
tempReference_tempCursor));
tempCursor = tempReference_tempCursor.get();
attendScope = tempReference_attendScope.get();
@@ -1527,15 +1527,15 @@ 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:
root.get().Clone(out projScope).Find(row, c.getPath());
root.get().Clone(out projScope).Find(row, c.path());
// 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: 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
// modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().WriteScope(row, ref projScope,
c.getTypeArgs().clone(), out projScope));
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().WriteScope(row, ref projScope,
c.typeArgs().clone(), out projScope));
for (UUID item : value.Projects) {
RowCursor tempCursor;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword -
@@ -1544,14 +1544,14 @@ public final class TypedSetUnitTests {
root.get().Clone(out tempCursor).Find(row, Utf8String.Empty);
Reference<RowCursor> tempReference_tempCursor2 =
new Reference<RowCursor>(tempCursor);
ResultAssert.IsSuccess(c.getTypeArgs().get(0).type().<LayoutGuid>typeAs().WriteSparse(row,
ResultAssert.IsSuccess(c.typeArgs().get(0).type().<LayoutGuid>typeAs().WriteSparse(row,
tempReference_tempCursor2, item));
tempCursor = tempReference_tempCursor2.get();
Reference<RowCursor> tempReference_projScope =
new Reference<RowCursor>(projScope);
Reference<RowCursor> tempReference_tempCursor3 =
new Reference<RowCursor>(tempCursor);
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().MoveField(row, tempReference_projScope,
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().MoveField(row, tempReference_projScope,
tempReference_tempCursor3));
tempCursor = tempReference_tempCursor3.get();
projScope = tempReference_projScope.get();
@@ -1567,15 +1567,15 @@ 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:
root.get().Clone(out checkboxScope).Find(row, c.getPath());
root.get().Clone(out checkboxScope).Find(row, c.path());
// 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: 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
// modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().WriteScope(row, ref checkboxScope,
c.getTypeArgs().clone(), out checkboxScope));
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().WriteScope(row, ref checkboxScope,
c.typeArgs().clone(), out checkboxScope));
for (boolean item : value.Checkboxes) {
RowCursor tempCursor;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword -
@@ -1584,14 +1584,14 @@ public final class TypedSetUnitTests {
root.get().Clone(out tempCursor).Find(row, Utf8String.Empty);
Reference<RowCursor> tempReference_tempCursor4 =
new Reference<RowCursor>(tempCursor);
ResultAssert.IsSuccess(c.getTypeArgs().get(0).type().<LayoutBoolean>typeAs().WriteSparse(row,
ResultAssert.IsSuccess(c.typeArgs().get(0).type().<LayoutBoolean>typeAs().WriteSparse(row,
tempReference_tempCursor4, item));
tempCursor = tempReference_tempCursor4.get();
Reference<RowCursor> tempReference_checkboxScope =
new Reference<RowCursor>(checkboxScope);
Reference<RowCursor> tempReference_tempCursor5 =
new Reference<RowCursor>(tempCursor);
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().MoveField(row, tempReference_checkboxScope,
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().MoveField(row, tempReference_checkboxScope,
tempReference_tempCursor5));
tempCursor = tempReference_tempCursor5.get();
checkboxScope = tempReference_checkboxScope.get();
@@ -1607,18 +1607,18 @@ 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:
root.get().Clone(out pricesScope).Find(row, c.getPath());
root.get().Clone(out pricesScope).Find(row, c.path());
// 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: 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
// modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().WriteScope(row, ref pricesScope,
c.getTypeArgs().clone(), out pricesScope));
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().WriteScope(row, ref pricesScope,
c.typeArgs().clone(), out pricesScope));
for (ArrayList<Float> item : value.Prices) {
assert item != null;
TypeArgument innerType = c.getTypeArgs().get(0).clone();
TypeArgument innerType = c.typeArgs().get(0).clone();
LayoutUniqueScope innerLayout = innerType.getType().<LayoutUniqueScope>TypeAs();
RowCursor tempCursor1;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword -
@@ -1657,7 +1657,7 @@ public final class TypedSetUnitTests {
new Reference<RowCursor>(pricesScope);
Reference<RowCursor> tempReference_tempCursor1 =
new Reference<RowCursor>(tempCursor1);
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().MoveField(row, tempReference_pricesScope,
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().MoveField(row, tempReference_pricesScope,
tempReference_tempCursor1));
tempCursor1 = tempReference_tempCursor1.get();
pricesScope = tempReference_pricesScope.get();
@@ -1673,18 +1673,18 @@ 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:
root.get().Clone(out nestedScope).Find(row, c.getPath());
root.get().Clone(out nestedScope).Find(row, c.path());
// 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: 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
// modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().WriteScope(row, ref nestedScope,
c.getTypeArgs().clone(), out nestedScope));
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().WriteScope(row, ref nestedScope,
c.typeArgs().clone(), out nestedScope));
for (ArrayList<ArrayList<Integer>> item : value.Nested) {
assert item != null;
TypeArgument in2Type = c.getTypeArgs().get(0).clone();
TypeArgument in2Type = c.typeArgs().get(0).clone();
LayoutUniqueScope in2Layout = in2Type.getType().<LayoutUniqueScope>TypeAs();
RowCursor tempCursor1;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword -
@@ -1747,7 +1747,7 @@ public final class TypedSetUnitTests {
new Reference<RowCursor>(nestedScope);
Reference<RowCursor> tempReference_tempCursor12 =
new Reference<RowCursor>(tempCursor1);
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().MoveField(row, tempReference_nestedScope,
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().MoveField(row, tempReference_nestedScope,
tempReference_tempCursor12));
tempCursor1 = tempReference_tempCursor12.get();
nestedScope = tempReference_nestedScope.get();
@@ -1763,17 +1763,17 @@ 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:
root.get().Clone(out shoppingScope).Find(row, c.getPath());
root.get().Clone(out shoppingScope).Find(row, c.path());
// 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: 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
// modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().WriteScope(row, ref shoppingScope,
c.getTypeArgs().clone(), out shoppingScope));
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().WriteScope(row, ref shoppingScope,
c.typeArgs().clone(), out shoppingScope));
for (ShoppingItem item : value.Shopping) {
TypeArgument innerType = c.getTypeArgs().get(0).clone();
TypeArgument innerType = c.typeArgs().get(0).clone();
LayoutUDT innerLayout = innerType.getType().<LayoutUDT>TypeAs();
RowCursor tempCursor;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword -
@@ -1797,7 +1797,7 @@ public final class TypedSetUnitTests {
new Reference<RowCursor>(shoppingScope);
Reference<RowCursor> tempReference_tempCursor7 =
new Reference<RowCursor>(tempCursor);
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().MoveField(row, tempReference_shoppingScope,
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().MoveField(row, tempReference_shoppingScope,
tempReference_tempCursor7));
tempCursor = tempReference_tempCursor7.get();
shoppingScope = tempReference_shoppingScope.get();
@@ -1813,19 +1813,19 @@ 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:
root.get().Clone(out workScope).Find(row, c.getPath());
root.get().Clone(out workScope).Find(row, c.path());
// 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: 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
// modified:
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().WriteScope(row, ref workScope,
c.getTypeArgs().clone(), out workScope));
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().WriteScope(row, ref workScope,
c.typeArgs().clone(), out workScope));
//C# TO JAVA CONVERTER WARNING: Unsigned integer types have no direct equivalent in Java:
//ORIGINAL LINE: foreach (Tuple<bool, ulong> item in value.Work)
for (Tuple<Boolean, Long> item : value.Work) {
TypeArgument innerType = c.getTypeArgs().get(0).clone();
TypeArgument innerType = c.typeArgs().get(0).clone();
LayoutIndexedScope innerLayout = innerType.getType().<LayoutIndexedScope>TypeAs();
RowCursor tempCursor;
// TODO: C# TO JAVA CONVERTER: The following method call contained an unresolved 'out' keyword -
@@ -1854,7 +1854,7 @@ public final class TypedSetUnitTests {
new Reference<RowCursor>(workScope);
Reference<RowCursor> tempReference_tempCursor8 =
new Reference<RowCursor>(tempCursor);
ResultAssert.IsSuccess(c.<LayoutUniqueScope>TypeAs().MoveField(row, tempReference_workScope,
ResultAssert.IsSuccess(c.<LayoutUniqueScope>typeAs().MoveField(row, tempReference_workScope,
tempReference_tempCursor8));
tempCursor = tempReference_tempCursor8.get();
workScope = tempReference_workScope.get();