Search in sources :

Example 1 with PlainJavaObjectIndexKey

use of org.apache.ignite.internal.cache.query.index.sorted.keys.PlainJavaObjectIndexKey in project ignite by apache.

the class InlineIndexKeyTypeRegistryTest method testObjectCheck.

/**
 */
@Test
public void testObjectCheck() {
    InlineIndexKeyType t = InlineIndexKeyTypeRegistry.get(new IntegerIndexKey(3), IndexKeyTypes.JAVA_OBJECT, pojoArrayKeyTypeSettings);
    assertEquals(IndexKeyTypes.INT, t.type());
    t = InlineIndexKeyTypeRegistry.get(new PlainJavaObjectIndexKey(new BinaryObjectImpl(), null), IndexKeyTypes.JAVA_OBJECT, pojoArrayKeyTypeSettings);
    assertEquals(IndexKeyTypes.JAVA_OBJECT, t.type());
    t = InlineIndexKeyTypeRegistry.get(new PlainJavaObjectIndexKey(new BinaryObjectImpl(), null), IndexKeyTypes.INT, pojoArrayKeyTypeSettings);
    assertEquals(IndexKeyTypes.JAVA_OBJECT, t.type());
    t = InlineIndexKeyTypeRegistry.get(new IntegerIndexKey(3), IndexKeyTypes.JAVA_OBJECT, pojoHashKeyTypeSettings);
    assertEquals(IndexKeyTypes.INT, t.type());
}
Also used : PlainJavaObjectIndexKey(org.apache.ignite.internal.cache.query.index.sorted.keys.PlainJavaObjectIndexKey) IntegerIndexKey(org.apache.ignite.internal.cache.query.index.sorted.keys.IntegerIndexKey) BinaryObjectImpl(org.apache.ignite.internal.binary.BinaryObjectImpl) GridCommonAbstractTest(org.apache.ignite.testframework.junits.common.GridCommonAbstractTest) Test(org.junit.Test)

Aggregations

BinaryObjectImpl (org.apache.ignite.internal.binary.BinaryObjectImpl)1 IntegerIndexKey (org.apache.ignite.internal.cache.query.index.sorted.keys.IntegerIndexKey)1 PlainJavaObjectIndexKey (org.apache.ignite.internal.cache.query.index.sorted.keys.PlainJavaObjectIndexKey)1 GridCommonAbstractTest (org.apache.ignite.testframework.junits.common.GridCommonAbstractTest)1 Test (org.junit.Test)1