use of com.orientechnologies.orient.core.index.OIndexManager in project orientdb by orientechnologies.
the class IndexManagerTest method testGetClassIndexWrongIndexName.
@Test(dependsOnMethods = { "createCompositeIndexTestWithListener", "createCompositeIndexTestWithoutListener", "testCreateOnePropertyIndexTest" })
public void testGetClassIndexWrongIndexName() {
final OIndexManager indexManager = database.getMetadata().getIndexManager();
final OIndex<?> result = indexManager.getClassIndex(CLASS_NAME, "propertyonetwo");
assertNull(result);
}
use of com.orientechnologies.orient.core.index.OIndexManager in project orientdb by orientechnologies.
the class IndexManagerTest method testAreIndexedPropertiesMoreThanNeededArrayParams.
@Test(dependsOnMethods = { "createCompositeIndexTestWithListener", "createCompositeIndexTestWithoutListener", "testCreateOnePropertyIndexTest" })
public void testAreIndexedPropertiesMoreThanNeededArrayParams() {
final OIndexManager indexManager = database.getMetadata().getIndexManager();
final boolean result = indexManager.areIndexed(CLASS_NAME, "fTwo", "fOne", "fThee", "fFour");
assertFalse(result);
}
use of com.orientechnologies.orient.core.index.OIndexManager in project orientdb by orientechnologies.
the class IndexManagerTest method testAreIndexedTwoPropertiesArrayParams.
@Test(dependsOnMethods = { "createCompositeIndexTestWithListener", "createCompositeIndexTestWithoutListener", "testCreateOnePropertyIndexTest" })
public void testAreIndexedTwoPropertiesArrayParams() {
final OIndexManager indexManager = database.getMetadata().getIndexManager();
final boolean result = indexManager.areIndexed(CLASS_NAME, "fTwo", "fOne");
assertTrue(result);
}
use of com.orientechnologies.orient.core.index.OIndexManager in project orientdb by orientechnologies.
the class IndexManagerTest method testDropIndex.
@Test
public void testDropIndex() throws Exception {
final OIndexManager indexManager = database.getMetadata().getIndexManager();
indexManager.createIndex("anotherproperty", OClass.INDEX_TYPE.UNIQUE.toString(), new OPropertyIndexDefinition(CLASS_NAME, "fOne", OType.INTEGER), new int[] { database.getClusterIdByName(CLASS_NAME) }, null, null);
assertNotNull(indexManager.getIndex("anotherproperty"));
assertNotNull(indexManager.getClassIndex(CLASS_NAME, "anotherproperty"));
indexManager.dropIndex("anotherproperty");
assertNull(indexManager.getIndex("anotherproperty"));
assertNull(indexManager.getClassIndex(CLASS_NAME, "anotherproperty"));
}
use of com.orientechnologies.orient.core.index.OIndexManager in project orientdb by orientechnologies.
the class IndexManagerTest method testAreIndexedThreeProperties.
@Test(dependsOnMethods = { "createCompositeIndexTestWithListener", "createCompositeIndexTestWithoutListener", "testCreateOnePropertyIndexTest" })
public void testAreIndexedThreeProperties() {
final OIndexManager indexManager = database.getMetadata().getIndexManager();
final boolean result = indexManager.areIndexed(CLASS_NAME, Arrays.asList("fTwo", "fOne", "fThree"));
assertTrue(result);
}
Aggregations