Examples of createProperty()


Examples of com.orientechnologies.orient.core.metadata.schema.OClass.createProperty()

    profile.createProperty("nick", OType.STRING).setMin("3").setMax("30").createIndex(INDEX_TYPE.UNIQUE);
    profile.createProperty("name", OType.STRING).setMin("3").setMax("30").createIndex(INDEX_TYPE.NOTUNIQUE);
    profile.createProperty("surname", OType.STRING).setMin("3").setMax("30");
    profile.createProperty("registeredOn", OType.DATETIME).setMin("2010-01-01 00:00:00");
    profile.createProperty("lastAccessOn", OType.DATETIME).setMin("2010-01-01 00:00:00");
    profile.createProperty("photo", OType.TRANSIENT);

    OClass whiz = database.getMetadata().getSchema().createClass("Whiz");
    whiz.createProperty("id", OType.INTEGER);
    whiz.createProperty("account", OType.LINK, profile);
    whiz.createProperty("date", OType.DATE).setMin("2010-01-01");
View Full Code Here

Examples of com.orientechnologies.orient.core.metadata.schema.OClass.createProperty()

    profile.createProperty("registeredOn", OType.DATETIME).setMin("2010-01-01 00:00:00");
    profile.createProperty("lastAccessOn", OType.DATETIME).setMin("2010-01-01 00:00:00");
    profile.createProperty("photo", OType.TRANSIENT);

    OClass whiz = database.getMetadata().getSchema().createClass("Whiz");
    whiz.createProperty("id", OType.INTEGER);
    whiz.createProperty("account", OType.LINK, profile);
    whiz.createProperty("date", OType.DATE).setMin("2010-01-01");
    whiz.createProperty("text", OType.STRING).setMandatory(true).setMin("1").setMax("140").createIndex(INDEX_TYPE.FULLTEXT);
    whiz.createProperty("replyTo", OType.LINK, profile);
View Full Code Here

Examples of com.orientechnologies.orient.core.metadata.schema.OClass.createProperty()

    profile.createProperty("lastAccessOn", OType.DATETIME).setMin("2010-01-01 00:00:00");
    profile.createProperty("photo", OType.TRANSIENT);

    OClass whiz = database.getMetadata().getSchema().createClass("Whiz");
    whiz.createProperty("id", OType.INTEGER);
    whiz.createProperty("account", OType.LINK, profile);
    whiz.createProperty("date", OType.DATE).setMin("2010-01-01");
    whiz.createProperty("text", OType.STRING).setMandatory(true).setMin("1").setMax("140").createIndex(INDEX_TYPE.FULLTEXT);
    whiz.createProperty("replyTo", OType.LINK, profile);

    database.close();
View Full Code Here

Examples of com.orientechnologies.orient.core.metadata.schema.OClass.createProperty()

    profile.createProperty("photo", OType.TRANSIENT);

    OClass whiz = database.getMetadata().getSchema().createClass("Whiz");
    whiz.createProperty("id", OType.INTEGER);
    whiz.createProperty("account", OType.LINK, profile);
    whiz.createProperty("date", OType.DATE).setMin("2010-01-01");
    whiz.createProperty("text", OType.STRING).setMandatory(true).setMin("1").setMax("140").createIndex(INDEX_TYPE.FULLTEXT);
    whiz.createProperty("replyTo", OType.LINK, profile);

    database.close();
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.metadata.schema.OClass.createProperty()

    OClass whiz = database.getMetadata().getSchema().createClass("Whiz");
    whiz.createProperty("id", OType.INTEGER);
    whiz.createProperty("account", OType.LINK, profile);
    whiz.createProperty("date", OType.DATE).setMin("2010-01-01");
    whiz.createProperty("text", OType.STRING).setMandatory(true).setMin("1").setMax("140").createIndex(INDEX_TYPE.FULLTEXT);
    whiz.createProperty("replyTo", OType.LINK, profile);

    database.close();
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.metadata.schema.OClass.createProperty()

    OClass whiz = database.getMetadata().getSchema().createClass("Whiz");
    whiz.createProperty("id", OType.INTEGER);
    whiz.createProperty("account", OType.LINK, profile);
    whiz.createProperty("date", OType.DATE).setMin("2010-01-01");
    whiz.createProperty("text", OType.STRING).setMandatory(true).setMin("1").setMax("140").createIndex(INDEX_TYPE.FULLTEXT);
    whiz.createProperty("replyTo", OType.LINK, profile);

    database.close();
  }

  @Test(dependsOnMethods = "createSchema")
View Full Code Here

Examples of com.orientechnologies.orient.core.metadata.schema.OClass.createProperty()

  @Test
  public void geoSchema() {
    database.open("admin", "admin");

    final OClass mapPointClass = database.getMetadata().getSchema().createClass("MapPoint");
    mapPointClass.createProperty("x", OType.DOUBLE).createIndex(INDEX_TYPE.NOTUNIQUE);
    mapPointClass.createProperty("y", OType.DOUBLE).createIndex(INDEX_TYPE.NOTUNIQUE);

    final OPropertyIndex xIndex = database.getMetadata().getSchema().getClass("MapPoint").getProperty("x").getIndex();
    Assert.assertNotNull(xIndex);
View Full Code Here

Examples of com.orientechnologies.orient.core.metadata.schema.OClass.createProperty()

  public void geoSchema() {
    database.open("admin", "admin");

    final OClass mapPointClass = database.getMetadata().getSchema().createClass("MapPoint");
    mapPointClass.createProperty("x", OType.DOUBLE).createIndex(INDEX_TYPE.NOTUNIQUE);
    mapPointClass.createProperty("y", OType.DOUBLE).createIndex(INDEX_TYPE.NOTUNIQUE);

    final OPropertyIndex xIndex = database.getMetadata().getSchema().getClass("MapPoint").getProperty("x").getIndex();
    Assert.assertNotNull(xIndex);

    final OPropertyIndex yIndex = database.getMetadata().getSchema().getClass("MapPoint").getProperty("y").getIndex();
View Full Code Here

Examples of com.orientechnologies.orient.core.metadata.schema.OClass.createProperty()

    workplace.createProperty("name", OType.STRING);
    workplace.createProperty("boss", OType.LINK, workplace);
    workplace.createProperty("workers", OType.LINKLIST, workplace);

    car.createProperty("plate", OType.STRING);
    car.createProperty("owner", OType.LINK, worker);

    database.getMetadata().getSchema().save();
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.metadata.schema.OClass.createProperty()

    workplace.createProperty("name", OType.STRING);
    workplace.createProperty("boss", OType.LINK, workplace);
    workplace.createProperty("workers", OType.LINKLIST, workplace);

    car.createProperty("plate", OType.STRING);
    car.createProperty("owner", OType.LINK, worker);

    database.getMetadata().getSchema().save();
  }

  private void populateDatabase() {
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.