All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.umlg.model.IndexCreator Maven / Gradle / Ivy

There is a newer version: 1.2.5
Show newest version
package org.umlg.model;

import org.apache.tinkerpop.gremlin.structure.Edge;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.umlg.qualifier.B;
import org.umlg.qualifier.C;
import org.umlg.qualifier.Customer;
import org.umlg.qualifier.D;
import org.umlg.runtime.adaptor.UMLG;
import org.umlg.runtime.adaptor.UmlgGraph;
import org.umlg.runtime.adaptor.UmlgIndexManager;
import org.umlg.runtime.adaptor.UmlgParameter;

/** This class is responsible to create all keyed indexes.
 * It is invoked via reflection the first time a graph is created.
 */
public class IndexCreator implements UmlgIndexManager {



	public void createIndexes() {
		UMLG.get().createKeyIndex("name", Vertex.class, new UmlgParameter>("unusedIndexValueType", String.class), new UmlgParameter("unusedUniqueorNot", false), new UmlgParameter("unusedLabel", "Customer"));
		UMLG.get().createKeyIndex("accountNumber", Vertex.class, new UmlgParameter>("unusedIndexValueType", Integer.class), new UmlgParameter("unusedUniqueorNot", false), new UmlgParameter("unusedLabel", "Customer"));
		UMLG.get().createKeyIndex("name", Vertex.class, new UmlgParameter>("unusedIndexValueType", String.class), new UmlgParameter("unusedUniqueorNot", false), new UmlgParameter("unusedLabel", "B"));
		UMLG.get().createKeyIndex("name", Vertex.class, new UmlgParameter>("unusedIndexValueType", String.class), new UmlgParameter("unusedUniqueorNot", false), new UmlgParameter("unusedLabel", "C"));
		UMLG.get().createKeyIndex("name", Vertex.class, new UmlgParameter>("unusedIndexValueType", String.class), new UmlgParameter("unusedUniqueorNot", false), new UmlgParameter("unusedLabel", "D"));
		UMLG.get().createKeyIndex(UmlgGraph.ROOT_VERTEX, Vertex.class, new UmlgParameter>("unusedIndexValueType", String.class), new UmlgParameter("unusedUniqueorNot", true), new UmlgParameter("unusedLabel", "ROOT_VERTEX"));
	}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy