diff --git a/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/DateTimeValueCreatorUtil.java b/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/DateTimeValueCreatorUtil.java deleted file mode 100644 index c0fd3ad8e5345..0000000000000 --- a/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/DateTimeValueCreatorUtil.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2002-2018 "Neo4j," - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Neo4j is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package org.neo4j.kernel.impl.index.schema; - -import org.neo4j.storageengine.api.schema.StoreIndexDescriptor; -import org.neo4j.values.storable.RandomValues; -import org.neo4j.values.storable.ValueGroup; - -public class DateTimeValueCreatorUtil extends ValueCreatorUtil -{ - DateTimeValueCreatorUtil( StoreIndexDescriptor schemaIndexDescriptor, double fractionDuplicates ) - { - super( schemaIndexDescriptor, RandomValues.typesOfGroup( ValueGroup.ZONED_DATE_TIME ), fractionDuplicates ); - } -} diff --git a/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/DateValueCreatorUtil.java b/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/DateValueCreatorUtil.java deleted file mode 100644 index 177f3757075ee..0000000000000 --- a/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/DateValueCreatorUtil.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2002-2018 "Neo4j," - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Neo4j is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package org.neo4j.kernel.impl.index.schema; - -import org.neo4j.storageengine.api.schema.StoreIndexDescriptor; -import org.neo4j.values.storable.RandomValues; -import org.neo4j.values.storable.ValueGroup; - -public class DateValueCreatorUtil extends ValueCreatorUtil -{ - DateValueCreatorUtil( StoreIndexDescriptor indexDescriptor, double fractionDuplicates ) - { - super( indexDescriptor, RandomValues.typesOfGroup( ValueGroup.DATE ), fractionDuplicates ); - } -} diff --git a/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/DurationValueCreatorUtil.java b/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/DurationValueCreatorUtil.java deleted file mode 100644 index 44f04eb9cefec..0000000000000 --- a/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/DurationValueCreatorUtil.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2002-2018 "Neo4j," - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Neo4j is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package org.neo4j.kernel.impl.index.schema; - -import org.neo4j.storageengine.api.schema.StoreIndexDescriptor; -import org.neo4j.values.storable.RandomValues; -import org.neo4j.values.storable.ValueGroup; - -public class DurationValueCreatorUtil extends ValueCreatorUtil -{ - DurationValueCreatorUtil( StoreIndexDescriptor schemaIndexDescriptor, double fractionDuplicates ) - { - super( schemaIndexDescriptor, RandomValues.typesOfGroup( ValueGroup.DURATION ), fractionDuplicates ); - } -} diff --git a/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/GenericValueCreatorUtil.java b/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/GenericValueCreatorUtil.java deleted file mode 100644 index d4e278911313b..0000000000000 --- a/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/GenericValueCreatorUtil.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2002-2018 "Neo4j," - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Neo4j is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package org.neo4j.kernel.impl.index.schema; - -import org.neo4j.storageengine.api.schema.StoreIndexDescriptor; -import org.neo4j.values.storable.RandomValues; - -class GenericValueCreatorUtil extends ValueCreatorUtil -{ - GenericValueCreatorUtil( StoreIndexDescriptor indexDescriptor, double fractionDuplicates ) - { - super( indexDescriptor, RandomValues.Type.values(), fractionDuplicates ); - } -} diff --git a/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/LocalDateTimeValueCreatorUtil.java b/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/LocalDateTimeValueCreatorUtil.java deleted file mode 100644 index ad85a3466101c..0000000000000 --- a/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/LocalDateTimeValueCreatorUtil.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2002-2018 "Neo4j," - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Neo4j is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package org.neo4j.kernel.impl.index.schema; - -import org.neo4j.storageengine.api.schema.StoreIndexDescriptor; -import org.neo4j.values.storable.RandomValues; -import org.neo4j.values.storable.ValueGroup; - -public class LocalDateTimeValueCreatorUtil extends ValueCreatorUtil -{ - LocalDateTimeValueCreatorUtil( StoreIndexDescriptor schemaIndexDescriptor, double fractionDuplicates ) - { - super( schemaIndexDescriptor, RandomValues.typesOfGroup( ValueGroup.LOCAL_DATE_TIME ), fractionDuplicates ); - } -} diff --git a/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/LocalTimeValueCreatorUtil.java b/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/LocalTimeValueCreatorUtil.java deleted file mode 100644 index 6a80fdf13fc3a..0000000000000 --- a/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/LocalTimeValueCreatorUtil.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2002-2018 "Neo4j," - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Neo4j is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package org.neo4j.kernel.impl.index.schema; - -import org.neo4j.storageengine.api.schema.StoreIndexDescriptor; -import org.neo4j.values.storable.RandomValues; -import org.neo4j.values.storable.ValueGroup; - -public class LocalTimeValueCreatorUtil extends ValueCreatorUtil -{ - LocalTimeValueCreatorUtil( StoreIndexDescriptor indexDescriptor, double fractionDuplicates ) - { - super( indexDescriptor, RandomValues.typesOfGroup( ValueGroup.LOCAL_TIME ), fractionDuplicates ); - } -} diff --git a/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/NativeIndexAccessorTest.java b/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/NativeIndexAccessorTest.java index 4c669e510cd9d..b9cf5a5d7c387 100644 --- a/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/NativeIndexAccessorTest.java +++ b/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/NativeIndexAccessorTest.java @@ -33,13 +33,16 @@ import org.neo4j.io.fs.FileSystemAbstraction; import org.neo4j.io.pagecache.PageCache; import org.neo4j.kernel.api.index.IndexProvider; -import org.neo4j.kernel.api.schema.index.TestIndexDescriptorFactory; import org.neo4j.kernel.configuration.Config; import org.neo4j.kernel.impl.index.schema.config.ConfiguredSpaceFillingCurveSettingsCache; import org.neo4j.kernel.impl.index.schema.config.IndexSpecificSpaceFillingCurveSettingsCache; import org.neo4j.storageengine.api.schema.StoreIndexDescriptor; +import org.neo4j.values.storable.RandomValues; import org.neo4j.values.storable.ValueGroup; +import static org.neo4j.kernel.api.schema.index.TestIndexDescriptorFactory.forLabel; +import static org.neo4j.kernel.impl.index.schema.ValueCreatorUtil.FRACTION_DUPLICATE_NON_UNIQUE; + @RunWith( Parameterized.class ) public class NativeIndexAccessorTest, VALUE extends NativeIndexValue> extends NativeIndexAccessorTests { @@ -49,52 +52,52 @@ public static Collection data() return Arrays.asList( new Object[][]{ {"Number", numberAccessorFactory(), - (ValueCreatorUtilFactory) NumberValueCreatorUtil::new, + RandomValues.typesOfGroup( ValueGroup.NUMBER ), (IndexLayoutFactory) NumberLayoutNonUnique::new }, {"String", stringAccessorFactory(), - (ValueCreatorUtilFactory) StringValueCreatorUtil::new, + RandomValues.typesOfGroup( ValueGroup.TEXT ), (IndexLayoutFactory) StringLayout::new }, {"Date", temporalAccessorFactory( ValueGroup.DATE ), - (ValueCreatorUtilFactory) DateValueCreatorUtil::new, + RandomValues.typesOfGroup( ValueGroup.DATE ), (IndexLayoutFactory) DateLayout::new }, {"DateTime", temporalAccessorFactory( ValueGroup.ZONED_DATE_TIME ), - (ValueCreatorUtilFactory) DateTimeValueCreatorUtil::new, + RandomValues.typesOfGroup( ValueGroup.ZONED_DATE_TIME ), (IndexLayoutFactory) ZonedDateTimeLayout::new }, {"Duration", temporalAccessorFactory( ValueGroup.DURATION ), - (ValueCreatorUtilFactory) DurationValueCreatorUtil::new, + RandomValues.typesOfGroup( ValueGroup.DURATION ), (IndexLayoutFactory) DurationLayout::new }, {"LocalDateTime", temporalAccessorFactory( ValueGroup.LOCAL_DATE_TIME ), - (ValueCreatorUtilFactory) LocalDateTimeValueCreatorUtil::new, + RandomValues.typesOfGroup( ValueGroup.LOCAL_DATE_TIME ), (IndexLayoutFactory) LocalDateTimeLayout::new }, {"LocalTime", temporalAccessorFactory( ValueGroup.LOCAL_TIME ), - (ValueCreatorUtilFactory) LocalTimeValueCreatorUtil::new, + RandomValues.typesOfGroup( ValueGroup.LOCAL_TIME ), (IndexLayoutFactory) LocalTimeLayout::new }, {"LocalDateTime", temporalAccessorFactory( ValueGroup.LOCAL_DATE_TIME ), - (ValueCreatorUtilFactory) LocalDateTimeValueCreatorUtil::new, + RandomValues.typesOfGroup( ValueGroup.LOCAL_DATE_TIME ), (IndexLayoutFactory) LocalDateTimeLayout::new }, {"Time", temporalAccessorFactory( ValueGroup.ZONED_TIME ), - (ValueCreatorUtilFactory) TimeValueCreatorUtil::new, + RandomValues.typesOfGroup( ValueGroup.ZONED_TIME ), (IndexLayoutFactory) ZonedTimeLayout::new }, {"Generic", genericAccessorFactory(), - (ValueCreatorUtilFactory) GenericValueCreatorUtil::new, + RandomValues.Type.values(), (IndexLayoutFactory) () -> new GenericLayout( 1, spaceFillingCurveSettings ) }, //{ Spatial has it's own subclass because it need to override some of the test methods } @@ -106,17 +109,17 @@ public static Collection data() private static final StandardConfiguration configuration = new StandardConfiguration(); private final AccessorFactory accessorFactory; - private final ValueCreatorUtilFactory valueCreatorUtilFactory; + private final RandomValues.Type[] supportedTypes; private final IndexLayoutFactory indexLayoutFactory; @SuppressWarnings( "unused" ) public NativeIndexAccessorTest( String name, AccessorFactory accessorFactory, - ValueCreatorUtilFactory valueCreatorUtilFactory, + RandomValues.Type[] supportedTypes, IndexLayoutFactory indexLayoutFactory ) { this.accessorFactory = accessorFactory; - this.valueCreatorUtilFactory = valueCreatorUtilFactory; + this.supportedTypes = supportedTypes; this.indexLayoutFactory = indexLayoutFactory; } @@ -129,7 +132,7 @@ NativeIndexAccessor makeAccessor() throws IOException @Override ValueCreatorUtil createValueCreatorUtil() { - return valueCreatorUtilFactory.create( TestIndexDescriptorFactory.forLabel( 42, 666 ).withId( 0 ), ValueCreatorUtil.FRACTION_DUPLICATE_NON_UNIQUE ); + return new ValueCreatorUtil<>( forLabel( 42, 666 ).withId( 0 ), supportedTypes, FRACTION_DUPLICATE_NON_UNIQUE ); } @Override diff --git a/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/NativeIndexPopulatorTest.java b/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/NativeIndexPopulatorTest.java index 8692ca9d76ee4..070727031474b 100644 --- a/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/NativeIndexPopulatorTest.java +++ b/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/NativeIndexPopulatorTest.java @@ -37,6 +37,7 @@ import org.neo4j.kernel.impl.index.schema.config.ConfiguredSpaceFillingCurveSettingsCache; import org.neo4j.kernel.impl.index.schema.config.IndexSpecificSpaceFillingCurveSettingsCache; import org.neo4j.storageengine.api.schema.StoreIndexDescriptor; +import org.neo4j.values.storable.RandomValues; import org.neo4j.values.storable.ValueGroup; public class NativeIndexPopulatorTest @@ -46,52 +47,52 @@ private static Collection allPopulators() return Arrays.asList( new Object[][]{ {"Number", numberPopulatorFactory(), - (ValueCreatorUtilFactory) NumberValueCreatorUtil::new, + RandomValues.typesOfGroup( ValueGroup.NUMBER ), (IndexLayoutFactory) NumberLayoutNonUnique::new }, {"String", (PopulatorFactory) StringIndexPopulator::new, - (ValueCreatorUtilFactory) StringValueCreatorUtil::new, + RandomValues.typesOfGroup( ValueGroup.TEXT ), (IndexLayoutFactory) StringLayout::new }, {"Date", temporalPopulatorFactory( ValueGroup.DATE ), - (ValueCreatorUtilFactory) DateValueCreatorUtil::new, + RandomValues.typesOfGroup( ValueGroup.DATE ), (IndexLayoutFactory) DateLayout::new }, {"DateTime", temporalPopulatorFactory( ValueGroup.ZONED_DATE_TIME ), - (ValueCreatorUtilFactory) DateTimeValueCreatorUtil::new, + RandomValues.typesOfGroup( ValueGroup.ZONED_DATE_TIME ), (IndexLayoutFactory) ZonedDateTimeLayout::new }, {"Duration", temporalPopulatorFactory( ValueGroup.DURATION ), - (ValueCreatorUtilFactory) DurationValueCreatorUtil::new, + RandomValues.typesOfGroup( ValueGroup.DURATION ), (IndexLayoutFactory) DurationLayout::new }, {"LocalDateTime", temporalPopulatorFactory( ValueGroup.LOCAL_DATE_TIME ), - (ValueCreatorUtilFactory) LocalDateTimeValueCreatorUtil::new, + RandomValues.typesOfGroup( ValueGroup.LOCAL_DATE_TIME ), (IndexLayoutFactory) LocalDateTimeLayout::new }, {"LocalTime", temporalPopulatorFactory( ValueGroup.LOCAL_TIME ), - (ValueCreatorUtilFactory) LocalTimeValueCreatorUtil::new, + RandomValues.typesOfGroup( ValueGroup.LOCAL_TIME ), (IndexLayoutFactory) LocalTimeLayout::new }, {"LocalDateTime", temporalPopulatorFactory( ValueGroup.LOCAL_DATE_TIME ), - (ValueCreatorUtilFactory) LocalDateTimeValueCreatorUtil::new, + RandomValues.typesOfGroup( ValueGroup.LOCAL_DATE_TIME ), (IndexLayoutFactory) LocalDateTimeLayout::new }, {"Time", temporalPopulatorFactory( ValueGroup.ZONED_TIME ), - (ValueCreatorUtilFactory) TimeValueCreatorUtil::new, + RandomValues.typesOfGroup( ValueGroup.ZONED_TIME ), (IndexLayoutFactory) ZonedTimeLayout::new }, {"Generic", genericPopulatorFactory(), - (ValueCreatorUtilFactory) GenericValueCreatorUtil::new, + RandomValues.Type.values(), (IndexLayoutFactory) () -> new GenericLayout( 1, spaceFillingCurveSettings ) }, // todo { Spatial has it's own subclass because it need to override some of the test methods } @@ -146,7 +147,7 @@ public static Collection data() public PopulatorFactory populatorFactory; @Parameterized.Parameter( 2 ) - public ValueCreatorUtilFactory valueCreatorUtilFactory; + public RandomValues.Type[] supportedTypes; @Parameterized.Parameter( 3 ) public IndexLayoutFactory indexLayoutFactory; @@ -162,7 +163,7 @@ NativeIndexPopulator createPopulator() throws IOException @Override ValueCreatorUtil createValueCreatorUtil() { - return valueCreatorUtilFactory.create( uniqueDescriptor, ValueCreatorUtil.FRACTION_DUPLICATE_UNIQUE ); + return new ValueCreatorUtil<>( uniqueDescriptor, supportedTypes, ValueCreatorUtil.FRACTION_DUPLICATE_UNIQUE ); } @Override @@ -188,7 +189,7 @@ public static Collection data() public PopulatorFactory populatorFactory; @Parameterized.Parameter( 2 ) - public ValueCreatorUtilFactory valueCreatorUtilFactory; + public RandomValues.Type[] supportedTypes; @Parameterized.Parameter( 3 ) public IndexLayoutFactory indexLayoutFactory; @@ -204,7 +205,7 @@ NativeIndexPopulator createPopulator() throws IOException @Override ValueCreatorUtil createValueCreatorUtil() { - return valueCreatorUtilFactory.create( nonUniqueDescriptor, ValueCreatorUtil.FRACTION_DUPLICATE_NON_UNIQUE ); + return new ValueCreatorUtil<>( nonUniqueDescriptor, supportedTypes, ValueCreatorUtil.FRACTION_DUPLICATE_NON_UNIQUE ); } @Override diff --git a/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/NumberFullScanNonUniqueIndexSamplerTest.java b/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/NumberFullScanNonUniqueIndexSamplerTest.java index e21466de76d17..86e98e7999a02 100644 --- a/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/NumberFullScanNonUniqueIndexSamplerTest.java +++ b/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/NumberFullScanNonUniqueIndexSamplerTest.java @@ -26,16 +26,18 @@ import org.neo4j.index.internal.gbptree.GBPTree; import org.neo4j.index.internal.gbptree.Writer; import org.neo4j.io.pagecache.IOLimiter; -import org.neo4j.kernel.api.schema.index.TestIndexDescriptorFactory; import org.neo4j.storageengine.api.schema.IndexSample; import org.neo4j.values.storable.NumberValue; import org.neo4j.values.storable.RandomValues; import org.neo4j.values.storable.Value; -import org.neo4j.values.storable.ValueGroup; import static org.junit.Assert.assertEquals; +import static org.neo4j.kernel.api.schema.index.TestIndexDescriptorFactory.forLabel; import static org.neo4j.kernel.impl.index.schema.NativeIndexKey.Inclusion.NEUTRAL; +import static org.neo4j.kernel.impl.index.schema.ValueCreatorUtil.FRACTION_DUPLICATE_NON_UNIQUE; import static org.neo4j.kernel.impl.index.schema.ValueCreatorUtil.countUniqueValues; +import static org.neo4j.values.storable.RandomValues.typesOfGroup; +import static org.neo4j.values.storable.ValueGroup.NUMBER; public class NumberFullScanNonUniqueIndexSamplerTest extends NativeIndexTestUtil { @@ -63,7 +65,7 @@ public void shouldIncludeAllValuesInTree() throws Exception private Value[] generateNumberValues() { - RandomValues.Type[] numberTypes = RandomValues.including( t -> t.valueGroup == ValueGroup.NUMBER ); + RandomValues.Type[] numberTypes = RandomValues.including( t -> t.valueGroup == NUMBER ); int size = 20; Value[] result = new NumberValue[size]; for ( int i = 0; i < size; i++ ) @@ -98,7 +100,7 @@ private void buildTree( Value[] values ) throws IOException @Override protected ValueCreatorUtil createValueCreatorUtil() { - return new NumberValueCreatorUtil( TestIndexDescriptorFactory.forLabel( 42, 666 ).withId( 0 ), ValueCreatorUtil.FRACTION_DUPLICATE_NON_UNIQUE ); + return new ValueCreatorUtil<>( forLabel( 42, 666 ).withId( 0 ), typesOfGroup( NUMBER ), FRACTION_DUPLICATE_NON_UNIQUE ); } @Override diff --git a/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/NumberValueCreatorUtil.java b/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/NumberValueCreatorUtil.java deleted file mode 100644 index ae0ebe307b416..0000000000000 --- a/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/NumberValueCreatorUtil.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2002-2018 "Neo4j," - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Neo4j is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package org.neo4j.kernel.impl.index.schema; - -import org.neo4j.storageengine.api.schema.StoreIndexDescriptor; -import org.neo4j.values.storable.RandomValues; -import org.neo4j.values.storable.ValueGroup; - -class NumberValueCreatorUtil extends ValueCreatorUtil -{ - NumberValueCreatorUtil( StoreIndexDescriptor indexDescriptor, double fractionDuplicates ) - { - super( indexDescriptor, RandomValues.typesOfGroup( ValueGroup.NUMBER ), fractionDuplicates ); - } -} diff --git a/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/StringValueCreatorUtil.java b/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/StringValueCreatorUtil.java deleted file mode 100644 index 4e6be797783e7..0000000000000 --- a/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/StringValueCreatorUtil.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2002-2018 "Neo4j," - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Neo4j is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package org.neo4j.kernel.impl.index.schema; - -import org.neo4j.storageengine.api.schema.StoreIndexDescriptor; -import org.neo4j.values.storable.RandomValues; -import org.neo4j.values.storable.ValueGroup; - -class StringValueCreatorUtil extends ValueCreatorUtil -{ - StringValueCreatorUtil( StoreIndexDescriptor schemaIndexDescriptor, double fractionDuplicates ) - { - super( schemaIndexDescriptor, RandomValues.typesOfGroup( ValueGroup.TEXT ), fractionDuplicates ); - } -} diff --git a/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/TimeValueCreatorUtil.java b/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/TimeValueCreatorUtil.java deleted file mode 100644 index 96999c9018293..0000000000000 --- a/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/TimeValueCreatorUtil.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2002-2018 "Neo4j," - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Neo4j is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package org.neo4j.kernel.impl.index.schema; - -import org.neo4j.storageengine.api.schema.StoreIndexDescriptor; -import org.neo4j.values.storable.RandomValues; -import org.neo4j.values.storable.ValueGroup; - -public class TimeValueCreatorUtil extends ValueCreatorUtil -{ - TimeValueCreatorUtil( StoreIndexDescriptor indexDescriptor, double fractionDuplicates ) - { - super( indexDescriptor, RandomValues.typesOfGroup( ValueGroup.ZONED_TIME ), fractionDuplicates ); - } -} diff --git a/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/ValueCreatorUtil.java b/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/ValueCreatorUtil.java index 094d905be91f2..4344c7ff02ddf 100644 --- a/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/ValueCreatorUtil.java +++ b/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/ValueCreatorUtil.java @@ -41,7 +41,7 @@ import org.neo4j.values.storable.Value; import org.neo4j.values.storable.Values; -abstract class ValueCreatorUtil, VALUE extends NativeIndexValue> +class ValueCreatorUtil, VALUE extends NativeIndexValue> { static final double FRACTION_DUPLICATE_UNIQUE = 0; static final double FRACTION_DUPLICATE_NON_UNIQUE = 0.1; diff --git a/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/ValueCreatorUtilFactory.java b/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/ValueCreatorUtilFactory.java deleted file mode 100644 index f852606e798c1..0000000000000 --- a/community/kernel/src/test/java/org/neo4j/kernel/impl/index/schema/ValueCreatorUtilFactory.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2002-2018 "Neo4j," - * Neo4j Sweden AB [http://neo4j.com] - * - * This file is part of Neo4j. - * - * Neo4j is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package org.neo4j.kernel.impl.index.schema; - -import org.neo4j.storageengine.api.schema.StoreIndexDescriptor; - -@FunctionalInterface -interface ValueCreatorUtilFactory, VALUE extends NativeIndexValue> -{ - ValueCreatorUtil create( StoreIndexDescriptor descriptor, double fractionDuplicates ); -}