Package com.orientechnologies.orient.core.metadata.schema

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


      final OClass roleClass = getDatabase().getMetadata().getSchema().createClass("ORole");
      roleClass.createProperty("mode", OType.BYTE);
      roleClass.createProperty("rules", OType.EMBEDDEDMAP, OType.BYTE);

      final OClass userClass = getDatabase().getMetadata().getSchema().createClass("OUser");
      userClass.createProperty("name", OType.STRING).setMandatory(true).setNotNull(false);
      userClass.createProperty("password", OType.STRING).setMandatory(true).setNotNull(false);
      userClass.createProperty("roles", OType.LINKSET, roleClass);

      // CREATE ROLES AND USERS
      final ORole adminRole = createRole(ORole.ADMIN, ORole.ALLOW_MODES.ALLOW_ALL_BUT);
View Full Code Here


      roleClass.createProperty("mode", OType.BYTE);
      roleClass.createProperty("rules", OType.EMBEDDEDMAP, OType.BYTE);

      final OClass userClass = getDatabase().getMetadata().getSchema().createClass("OUser");
      userClass.createProperty("name", OType.STRING).setMandatory(true).setNotNull(false);
      userClass.createProperty("password", OType.STRING).setMandatory(true).setNotNull(false);
      userClass.createProperty("roles", OType.LINKSET, roleClass);

      // CREATE ROLES AND USERS
      final ORole adminRole = createRole(ORole.ADMIN, ORole.ALLOW_MODES.ALLOW_ALL_BUT);
      final OUser adminUser = createUser(OUser.ADMIN, OUser.ADMIN, new String[] { adminRole.getName() });
View Full Code Here

      roleClass.createProperty("rules", OType.EMBEDDEDMAP, OType.BYTE);

      final OClass userClass = getDatabase().getMetadata().getSchema().createClass("OUser");
      userClass.createProperty("name", OType.STRING).setMandatory(true).setNotNull(false);
      userClass.createProperty("password", OType.STRING).setMandatory(true).setNotNull(false);
      userClass.createProperty("roles", OType.LINKSET, roleClass);

      // CREATE ROLES AND USERS
      final ORole adminRole = createRole(ORole.ADMIN, ORole.ALLOW_MODES.ALLOW_ALL_BUT);
      final OUser adminUser = createUser(OUser.ADMIN, OUser.ADMIN, new String[] { adminRole.getName() });
View Full Code Here

    database.getStorage().addCluster("flat", OStorage.CLUSTER_TYPE.PHYSICAL);
    database.getStorage().addCluster("binary", OStorage.CLUSTER_TYPE.PHYSICAL);

    OClass account = database.getMetadata().getSchema()
        .createClass("Account", database.getStorage().addCluster("account", OStorage.CLUSTER_TYPE.PHYSICAL));
    account.createProperty("id", OType.INTEGER);
    account.createProperty("birthDate", OType.DATE);
    account.createProperty("binary", OType.BINARY);

    database.getMetadata().getSchema().createClass("Company").setSuperClass(account);
View Full Code Here

    database.getStorage().addCluster("binary", OStorage.CLUSTER_TYPE.PHYSICAL);

    OClass account = database.getMetadata().getSchema()
        .createClass("Account", database.getStorage().addCluster("account", OStorage.CLUSTER_TYPE.PHYSICAL));
    account.createProperty("id", OType.INTEGER);
    account.createProperty("birthDate", OType.DATE);
    account.createProperty("binary", OType.BINARY);

    database.getMetadata().getSchema().createClass("Company").setSuperClass(account);

    OClass profile = database.getMetadata().getSchema()
View Full Code Here

    OClass account = database.getMetadata().getSchema()
        .createClass("Account", database.getStorage().addCluster("account", OStorage.CLUSTER_TYPE.PHYSICAL));
    account.createProperty("id", OType.INTEGER);
    account.createProperty("birthDate", OType.DATE);
    account.createProperty("binary", OType.BINARY);

    database.getMetadata().getSchema().createClass("Company").setSuperClass(account);

    OClass profile = database.getMetadata().getSchema()
        .createClass("Profile", database.getStorage().addCluster("profile", OStorage.CLUSTER_TYPE.PHYSICAL));
View Full Code Here

    database.getMetadata().getSchema().createClass("Company").setSuperClass(account);

    OClass profile = database.getMetadata().getSchema()
        .createClass("Profile", database.getStorage().addCluster("profile", OStorage.CLUSTER_TYPE.PHYSICAL));
    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.DATE).setMin("2010-01-01 00:00:00");
    profile.createProperty("lastAccessOn", OType.DATE).setMin("2010-01-01 00:00:00");
View Full Code Here

    database.getMetadata().getSchema().createClass("Company").setSuperClass(account);

    OClass profile = database.getMetadata().getSchema()
        .createClass("Profile", database.getStorage().addCluster("profile", OStorage.CLUSTER_TYPE.PHYSICAL));
    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.DATE).setMin("2010-01-01 00:00:00");
    profile.createProperty("lastAccessOn", OType.DATE).setMin("2010-01-01 00:00:00");

    OClass whiz = database.getMetadata().getSchema().createClass("Whiz");
View Full Code Here

    OClass profile = database.getMetadata().getSchema()
        .createClass("Profile", database.getStorage().addCluster("profile", OStorage.CLUSTER_TYPE.PHYSICAL));
    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.DATE).setMin("2010-01-01 00:00:00");
    profile.createProperty("lastAccessOn", OType.DATE).setMin("2010-01-01 00:00:00");

    OClass whiz = database.getMetadata().getSchema().createClass("Whiz");
    whiz.createProperty("id", OType.INTEGER);
View Full Code Here

    OClass profile = database.getMetadata().getSchema()
        .createClass("Profile", database.getStorage().addCluster("profile", OStorage.CLUSTER_TYPE.PHYSICAL));
    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.DATE).setMin("2010-01-01 00:00:00");
    profile.createProperty("lastAccessOn", OType.DATE).setMin("2010-01-01 00:00:00");

    OClass whiz = database.getMetadata().getSchema().createClass("Whiz");
    whiz.createProperty("id", OType.INTEGER);
    whiz.createProperty("account", OType.LINK, profile);
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.