Examples of existsClass()


Examples of com.orientechnologies.orient.core.metadata.schema.OSchema.existsClass()

  private void createSchema(ODatabaseDocumentTx dbDocumentTx) {
    ODatabaseRecordThreadLocal.INSTANCE.set(dbDocumentTx);

    OSchema schema = dbDocumentTx.getMetadata().getSchema();
    if (!schema.existsClass("TestClass")) {
      OClass testClass = schema.createClass("TestClass");
      testClass.createProperty("id", OType.LONG);
      testClass.createProperty("timestamp", OType.LONG);
      testClass.createProperty("stringValue", OType.STRING);
View Full Code Here

Examples of com.orientechnologies.orient.core.metadata.schema.OSchema.existsClass()

  private void createSchema(ODatabaseDocumentTx dbDocumentTx) {
    ODatabaseRecordThreadLocal.INSTANCE.set(dbDocumentTx);

    OSchema schema = dbDocumentTx.getMetadata().getSchema();
    if (!schema.existsClass("TestClass")) {
      OClass testClass = schema.createClass("TestClass");
      testClass.createProperty("id", OType.LONG);
      testClass.createProperty("timestamp", OType.LONG);
      testClass.createProperty("stringValue", OType.STRING);
      testClass.createProperty("binaryValue", OType.BINARY);
View Full Code Here

Examples of com.orientechnologies.orient.core.metadata.schema.OSchema.existsClass()

  private void createSchema(ODatabaseDocumentTx dbDocumentTx) {
    ODatabaseRecordThreadLocal.INSTANCE.set(dbDocumentTx);

    OSchema schema = dbDocumentTx.getMetadata().getSchema();
    if (!schema.existsClass("TestClass")) {
      OClass testClass = schema.createClass("TestClass");
      testClass.createProperty("id", OType.INTEGER);
      testClass.createProperty("timestamp", OType.LONG);
      testClass.createProperty("stringValue", OType.STRING);
View Full Code Here

Examples of com.orientechnologies.orient.core.metadata.schema.OSchema.existsClass()

  private void createSchema(ODatabaseDocumentTx dbDocumentTx) {
    ODatabaseRecordThreadLocal.INSTANCE.set(dbDocumentTx);

    OSchema schema = dbDocumentTx.getMetadata().getSchema();
    if (!schema.existsClass("TestClass")) {
      OClass testClass = schema.createClass("TestClass");
      testClass.createProperty("id", OType.LONG);
      testClass.createProperty("timestamp", OType.LONG);
      testClass.createProperty("stringValue", OType.STRING);
View Full Code Here

Examples of com.orientechnologies.orient.core.metadata.schema.OSchema.existsClass()

    student5.save();
  }

  private void createSchemaForTest() {
    final OSchema schema = database.getMetadata().getSchema();
    if (!schema.existsClass("lpirtStudent")) {
      final OClass curatorClass = schema.createClass("lpirtCurator");
      curatorClass.createProperty("name", OType.STRING).createIndex(OClass.INDEX_TYPE.NOTUNIQUE);
      curatorClass.createProperty("salary", OType.INTEGER).createIndex(OClass.INDEX_TYPE.UNIQUE);
      curatorClass.createIndex("curotorCompositeIndex", OClass.INDEX_TYPE.UNIQUE, "salary", "name");
View Full Code Here

Examples of com.orientechnologies.orient.core.metadata.schema.OSchema.existsClass()

    OrientGraph graph = new OrientGraph(database, false);
    graph.shutdown();
    database.open("admin", "admin");

    OSchema schema = database.getMetadata().getSchema();
    if (!schema.existsClass("CreateVertexByContent")) {
      OClass vClass = schema.createClass("CreateVertexByContent", schema.getClass("V"));
      vClass.createProperty("message", OType.STRING);
    }

    database.command(new OCommandSQL("create vertex CreateVertexByContent content { \"message\": \"(:\"}")).execute();
View Full Code Here

Examples of com.orientechnologies.orient.core.metadata.schema.OSchema.existsClass()

    boolean automaticSchemaGeneration = false;

    final ODatabaseRecordInternal db = ODatabaseRecordThreadLocal.INSTANCE.get();
    final OSchema oSchema = db.getMetadata().getSchema();

    if (!oSchema.existsClass(iClass.getSimpleName())) {
      if (Modifier.isAbstract(iClass.getModifiers()))
        oSchema.createAbstractClass(iClass.getSimpleName());
      else
        oSchema.createClass(iClass.getSimpleName());
View Full Code Here

Examples of com.orientechnologies.orient.core.metadata.schema.OSchema.existsClass()

        currentClass = Object.class;

      if (!currentClass.equals(Object.class)) {
        OClass oSuperClass;
        OClass currentOClass = oSchema.getClass(iClassName);
        if (!oSchema.existsClass(currentClass.getSimpleName())) {
          OSchema schema = oSchema;
          if (Modifier.isAbstract(currentClass.getModifiers())) {
            oSuperClass = schema.createAbstractClass(currentClass.getSimpleName());
          } else {
            oSuperClass = schema.createClass(currentClass.getSimpleName());
View Full Code Here

Examples of com.orientechnologies.orient.core.metadata.schema.OSchema.existsClass()

    super(url);
  }

  public void testMassiveRecordsHide() {
    final OSchema schema = database.getMetadata().getSchema();
    if (!schema.existsClass("MassiveRecordsHide")) {
      schema.createClass("MassiveRecordsHide");
    }

    final List<ORID> docs = new ArrayList<ORID>();
    for (int i = 0; i < 100; i++) {
View Full Code Here

Examples of com.orientechnologies.orient.core.metadata.schema.OSchema.existsClass()

    Assert.assertTrue(docs.isEmpty());
  }

  public void testMassiveRecordsHideBySQL() {
    final OSchema schema = database.getMetadata().getSchema();
    if (!schema.existsClass("MassiveRecordsHideBySQL")) {
      schema.createClass("MassiveRecordsHideBySQL");
    }

    final List<ORID> docs = new ArrayList<ORID>();
    for (int i = 0; i < 100; i++) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.