public void beforeClass() throws Exception {
super.beforeClass();
if (database.isClosed())
database.open("admin", "admin");
final OSchema schema = database.getMetadata().getSchema();
final OClass oClass = schema.createClass("sqlSelectHashIndexReuseTestClass");
oClass.createProperty("prop1", OType.INTEGER);
oClass.createProperty("prop2", OType.INTEGER);
oClass.createProperty("prop3", OType.INTEGER);
oClass.createProperty("prop4", OType.INTEGER);
oClass.createProperty("prop5", OType.INTEGER);
oClass.createProperty("prop6", OType.INTEGER);
oClass.createProperty("prop7", OType.STRING);
oClass.createProperty("prop8", OType.INTEGER);
oClass.createProperty("prop9", OType.INTEGER);
oClass.createProperty("fEmbeddedMap", OType.EMBEDDEDMAP, OType.INTEGER);
oClass.createProperty("fEmbeddedMapTwo", OType.EMBEDDEDMAP, OType.INTEGER);
oClass.createProperty("fLinkMap", OType.LINKMAP);
oClass.createProperty("fEmbeddedList", OType.EMBEDDEDLIST, OType.INTEGER);
oClass.createProperty("fEmbeddedListTwo", OType.EMBEDDEDLIST, OType.INTEGER);
oClass.createProperty("fLinkList", OType.LINKLIST);
oClass.createProperty("fEmbeddedSet", OType.EMBEDDEDSET, OType.INTEGER);
oClass.createProperty("fEmbeddedSetTwo", OType.EMBEDDEDSET, OType.INTEGER);
oClass.createIndex("indexone", OClass.INDEX_TYPE.UNIQUE_HASH_INDEX, "prop1", "prop2");
oClass.createIndex("indextwo", OClass.INDEX_TYPE.UNIQUE_HASH_INDEX, "prop3");
oClass.createIndex("indexthree", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX, "prop1", "prop2", "prop4");
oClass.createIndex("indexfour", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX, "prop4", "prop1", "prop3");
oClass.createIndex("indexfive", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX, "prop6", "prop1", "prop3");
oClass.createIndex("indexsix", OClass.INDEX_TYPE.FULLTEXT_HASH_INDEX, "prop7");
oClass.createIndex("sqlSelectHashIndexReuseTestEmbeddedMapByKey", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX, "fEmbeddedMap");
oClass.createIndex("sqlSelectHashIndexReuseTestEmbeddedMapByValue", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX,
"fEmbeddedMap by value");
oClass.createIndex("sqlSelectHashIndexReuseTestEmbeddedList", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX, "fEmbeddedList");
oClass.createIndex("sqlSelectHashIndexReuseTestEmbeddedMapByKeyProp8", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX,
"fEmbeddedMapTwo", "prop8");
oClass.createIndex("sqlSelectHashIndexReuseTestEmbeddedMapByValueProp8", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX,
"fEmbeddedMapTwo by value", "prop8");
oClass.createIndex("sqlSelectHashIndexReuseTestEmbeddedSetProp8", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX, "fEmbeddedSetTwo",
"prop8");
oClass.createIndex("sqlSelectHashIndexReuseTestProp9EmbeddedSetProp8", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX, "prop9",
"fEmbeddedSetTwo", "prop8");
oClass.createIndex("sqlSelectHashIndexReuseTestEmbeddedListTwoProp8", OClass.INDEX_TYPE.NOTUNIQUE_HASH_INDEX,
"fEmbeddedListTwo", "prop8");
schema.save();
final String fullTextIndexStrings[] = { "Alice : What is the use of a book, without pictures or conversations?",
"Rabbit : Oh my ears and whiskers, how late it's getting!",
"Alice : If it had grown up, it would have made a dreadfully ugly child; but it makes rather a handsome pig, I think",
"The Cat : We're all mad here.", "The Hatter : Why is a raven like a writing desk?",