use of com.orientechnologies.orient.core.index.OIndexManager in project wicket-orientdb by OrienteerBAP.
the class OIndexModel method loadInstance.
@Override
protected OIndex<?> loadInstance() {
OClass oClass = classModel != null ? classModel.getObject() : null;
OIndexManager indexManager = OrientDbWebSession.get().getDatabase().getMetadata().getIndexManager();
return oClass != null ? indexManager.getClassIndex(oClass.getName(), indexName) : indexManager.getIndex(indexName);
}
use of com.orientechnologies.orient.core.index.OIndexManager in project orientdb by orientechnologies.
the class IndexManagerTest method testAreIndexedThreePropertiesBrokenFiledNameCase.
@Test(dependsOnMethods = { "createCompositeIndexTestWithListener", "createCompositeIndexTestWithoutListener", "testCreateOnePropertyIndexTest" })
public void testAreIndexedThreePropertiesBrokenFiledNameCase() {
final OIndexManager indexManager = database.getMetadata().getIndexManager();
final boolean result = indexManager.areIndexed(CLASS_NAME, Arrays.asList("ftwO", "Fone", "fThrEE"));
assertTrue(result);
}
use of com.orientechnologies.orient.core.index.OIndexManager in project orientdb by orientechnologies.
the class IndexManagerTest method testAreIndexedOneProperty.
@Test(dependsOnMethods = { "createCompositeIndexTestWithListener", "createCompositeIndexTestWithoutListener", "testCreateOnePropertyIndexTest" })
public void testAreIndexedOneProperty() {
final OIndexManager indexManager = database.getMetadata().getIndexManager();
final boolean result = indexManager.areIndexed(CLASS_NAME, Arrays.asList("fOne"));
assertTrue(result);
}
use of com.orientechnologies.orient.core.index.OIndexManager in project orientdb by orientechnologies.
the class IndexManagerTest method testDropSimpleKey.
@Test
public void testDropSimpleKey() {
final OIndexManager indexManager = database.getMetadata().getIndexManager();
indexManager.createIndex("simplekeytwo", OClass.INDEX_TYPE.UNIQUE.toString(), new OSimpleKeyIndexDefinition(-1, OType.INTEGER), null, null, null);
assertNotNull(indexManager.getIndex("simplekeytwo"));
indexManager.dropIndex("simplekeytwo");
assertNull(indexManager.getIndex("simplekeytwo"));
}
use of com.orientechnologies.orient.core.index.OIndexManager in project orientdb by orientechnologies.
the class IndexManagerTest method testDropNullKeyDefinition.
@Test
public void testDropNullKeyDefinition() {
final OIndexManager indexManager = database.getMetadata().getIndexManager();
indexManager.createIndex("nullkeytwo", OClass.INDEX_TYPE.UNIQUE.toString(), null, null, null, null);
assertNotNull(indexManager.getIndex("nullkeytwo"));
indexManager.dropIndex("nullkeytwo");
assertNull(indexManager.getIndex("nullkeytwo"));
}
Aggregations