diff --git a/community/kernel/src/main/java/org/neo4j/kernel/impl/api/store/StorePropertyPayloadCursor.java b/community/kernel/src/main/java/org/neo4j/kernel/impl/api/store/StorePropertyPayloadCursor.java index 52ce27b1d5426..1167b3b64761c 100644 --- a/community/kernel/src/main/java/org/neo4j/kernel/impl/api/store/StorePropertyPayloadCursor.java +++ b/community/kernel/src/main/java/org/neo4j/kernel/impl/api/store/StorePropertyPayloadCursor.java @@ -31,6 +31,7 @@ import org.neo4j.kernel.impl.store.record.Record; import org.neo4j.kernel.impl.util.Bits; import org.neo4j.string.UTF8; +import org.neo4j.values.storable.ArrayValue; import org.neo4j.values.storable.BooleanValue; import org.neo4j.values.storable.ByteValue; import org.neo4j.values.storable.CharValue; @@ -317,7 +318,7 @@ private ByteBuffer newBiggerBuffer( int requiredCapacity ) return ByteBuffer.allocate( newCapacity ).order( ByteOrder.LITTLE_ENDIAN ); } - private static Value readArrayFromBuffer( ByteBuffer buffer ) + private static ArrayValue readArrayFromBuffer( ByteBuffer buffer ) { if ( buffer.limit() <= 0 ) { diff --git a/community/kernel/src/main/java/org/neo4j/kernel/impl/store/ShortArray.java b/community/kernel/src/main/java/org/neo4j/kernel/impl/store/ShortArray.java index 9a493fe6489d0..ecd9b8c6822f9 100644 --- a/community/kernel/src/main/java/org/neo4j/kernel/impl/store/ShortArray.java +++ b/community/kernel/src/main/java/org/neo4j/kernel/impl/store/ShortArray.java @@ -26,6 +26,7 @@ import org.neo4j.kernel.impl.store.record.PropertyBlock; import org.neo4j.kernel.impl.util.Bits; +import org.neo4j.values.storable.ArrayValue; import org.neo4j.values.storable.Value; import org.neo4j.values.storable.Values; @@ -60,8 +61,7 @@ void writeAll( Object array, int length, int requiredBits, Bits result ) } @Override - public - Value createArray( int length, Bits bits, int requiredBits ) + public ArrayValue createArray( int length, Bits bits, int requiredBits ) { if ( length == 0 ) { @@ -76,7 +76,7 @@ Value createArray( int length, Bits bits, int requiredBits ) } @Override - public Value createEmptyArray() + public ArrayValue createEmptyArray() { return Values.EMPTY_BOOLEAN_ARRAY; } @@ -138,8 +138,7 @@ void writeAll( Object array, int length, int requiredBits, Bits result ) } @Override - public - Value createArray( int length, Bits bits, int requiredBits ) + public ArrayValue createArray( int length, Bits bits, int requiredBits ) { if ( length == 0 ) { @@ -154,7 +153,7 @@ Value createArray( int length, Bits bits, int requiredBits ) } @Override - public Value createEmptyArray() + public ArrayValue createEmptyArray() { return Values.EMPTY_BYTE_ARRAY; } @@ -217,8 +216,7 @@ void writeAll( Object array, int length, int requiredBits, Bits result ) } @Override - public - Value createArray( int length, Bits bits, int requiredBits ) + public ArrayValue createArray( int length, Bits bits, int requiredBits ) { if ( length == 0 ) { @@ -233,7 +231,7 @@ Value createArray( int length, Bits bits, int requiredBits ) } @Override - public Value createEmptyArray() + public ArrayValue createEmptyArray() { return Values.EMPTY_SHORT_ARRAY; } @@ -295,8 +293,7 @@ void writeAll( Object array, int length, int requiredBits, Bits result ) } @Override - public - Value createArray( int length, Bits bits, int requiredBits ) + public ArrayValue createArray( int length, Bits bits, int requiredBits ) { if ( length == 0 ) { @@ -311,7 +308,7 @@ Value createArray( int length, Bits bits, int requiredBits ) } @Override - public Value createEmptyArray() + public ArrayValue createEmptyArray() { return Values.EMPTY_CHAR_ARRAY; } @@ -373,8 +370,7 @@ void writeAll( Object array, int length, int requiredBits, Bits result ) } @Override - public - Value createArray( int length, Bits bits, int requiredBits ) + public ArrayValue createArray( int length, Bits bits, int requiredBits ) { if ( length == 0 ) { @@ -389,7 +385,7 @@ Value createArray( int length, Bits bits, int requiredBits ) } @Override - public Value createEmptyArray() + public ArrayValue createEmptyArray() { return Values.EMPTY_INT_ARRAY; } @@ -452,8 +448,7 @@ void writeAll( Object array, int length, int requiredBits, Bits result ) } @Override - public - Value createArray( int length, Bits bits, int requiredBits ) + public ArrayValue createArray( int length, Bits bits, int requiredBits ) { if ( length == 0 ) { @@ -468,7 +463,7 @@ Value createArray( int length, Bits bits, int requiredBits ) } @Override - public Value createEmptyArray() + public ArrayValue createEmptyArray() { return Values.EMPTY_LONG_ARRAY; } @@ -531,8 +526,7 @@ void writeAll( Object array, int length, int requiredBits, Bits result ) } @Override - public - Value createArray( int length, Bits bits, int requiredBits ) + public ArrayValue createArray( int length, Bits bits, int requiredBits ) { if ( length == 0 ) { @@ -547,7 +541,7 @@ Value createArray( int length, Bits bits, int requiredBits ) } @Override - public Value createEmptyArray() + public ArrayValue createEmptyArray() { return Values.EMPTY_FLOAT_ARRAY; } @@ -610,8 +604,7 @@ void writeAll( Object array, int length, int requiredBits, Bits result ) } @Override - public - Value createArray( int length, Bits bits, int requiredBits ) + public ArrayValue createArray( int length, Bits bits, int requiredBits ) { if ( length == 0 ) { @@ -626,7 +619,7 @@ Value createArray( int length, Bits bits, int requiredBits ) } @Override - public Value createEmptyArray() + public ArrayValue createEmptyArray() { return Values.EMPTY_DOUBLE_ARRAY; } @@ -668,7 +661,7 @@ public int intValue() return type.intValue(); } - public abstract Value createArray( int length, Bits bits, int requiredBits ); + public abstract ArrayValue createArray( int length, Bits bits, int requiredBits ); public static boolean encode( int keyId, Object array, PropertyBlock target, int payloadSizeInBytes ) @@ -818,5 +811,5 @@ public static int calculateNumberOfBlocksUsed( int arrayLength, int requiredBits public abstract void writeAll( Object array, int length, int requiredBits, Bits result ); - public abstract Value createEmptyArray(); + public abstract ArrayValue createEmptyArray(); } diff --git a/community/values/src/main/java/org/neo4j/values/storable/Values.java b/community/values/src/main/java/org/neo4j/values/storable/Values.java index 25c6a331a664e..1d4a84b38cce1 100644 --- a/community/values/src/main/java/org/neo4j/values/storable/Values.java +++ b/community/values/src/main/java/org/neo4j/values/storable/Values.java @@ -51,14 +51,14 @@ public final class Values public static final TextValue EMPTY_STRING = Values.stringValue( "" ); public static final DoubleValue E = Values.doubleValue( Math.E ); public static final DoubleValue PI = Values.doubleValue( Math.PI ); - public static final Value EMPTY_SHORT_ARRAY = Values.shortArray( new short[0] ); - public static final Value EMPTY_BOOLEAN_ARRAY = Values.booleanArray( new boolean[0] ); - public static final Value EMPTY_BYTE_ARRAY = Values.byteArray( new byte[0] ); - public static final Value EMPTY_CHAR_ARRAY = Values.charArray( new char[0] ); - public static final Value EMPTY_INT_ARRAY = Values.intArray( new int[0] ); - public static final Value EMPTY_LONG_ARRAY = Values.longArray( new long[0] ); - public static final Value EMPTY_FLOAT_ARRAY = Values.floatArray( new float[0] ); - public static final Value EMPTY_DOUBLE_ARRAY = Values.doubleArray( new double[0] ); + public static final ArrayValue EMPTY_SHORT_ARRAY = Values.shortArray( new short[0] ); + public static final ArrayValue EMPTY_BOOLEAN_ARRAY = Values.booleanArray( new boolean[0] ); + public static final ArrayValue EMPTY_BYTE_ARRAY = Values.byteArray( new byte[0] ); + public static final ArrayValue EMPTY_CHAR_ARRAY = Values.charArray( new char[0] ); + public static final ArrayValue EMPTY_INT_ARRAY = Values.intArray( new int[0] ); + public static final ArrayValue EMPTY_LONG_ARRAY = Values.longArray( new long[0] ); + public static final ArrayValue EMPTY_FLOAT_ARRAY = Values.floatArray( new float[0] ); + public static final ArrayValue EMPTY_DOUBLE_ARRAY = Values.doubleArray( new double[0] ); private Values() {