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

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


    OClass cl = database.createVertexType("Person", "OGraphVertex");
    cl.createProperty("id", OType.LONG);
    cl.createProperty("name", OType.STRING);
    cl.createProperty("surname", OType.STRING);
    cl.createProperty("birthDate", OType.DATE);
    cl.createProperty("salary", OType.FLOAT);
  }

  @Override
  public void cycle() {
    record.reset();
View Full Code Here


  }

  public static void create() {
    OClass account = database.getMetadata().getSchema()
        .createClass("Account", database.getStorage().addCluster("account", OStorage.CLUSTER_TYPE.PHYSICAL));
    account.createProperty("id", OType.LONG);
    account.createProperty("val1", OType.DOUBLE);
    account.createProperty("val2", OType.DOUBLE);
    account.createProperty("val3", OType.FLOAT);
    account.createProperty("val4", OType.SHORT);
    account.createProperty("val5", OType.STRING);
View Full Code Here

  public static void create() {
    OClass account = database.getMetadata().getSchema()
        .createClass("Account", database.getStorage().addCluster("account", OStorage.CLUSTER_TYPE.PHYSICAL));
    account.createProperty("id", OType.LONG);
    account.createProperty("val1", OType.DOUBLE);
    account.createProperty("val2", OType.DOUBLE);
    account.createProperty("val3", OType.FLOAT);
    account.createProperty("val4", OType.SHORT);
    account.createProperty("val5", OType.STRING);
    account.createProperty("name", OType.STRING);
View Full Code Here

  public static void create() {
    OClass account = database.getMetadata().getSchema()
        .createClass("Account", database.getStorage().addCluster("account", OStorage.CLUSTER_TYPE.PHYSICAL));
    account.createProperty("id", OType.LONG);
    account.createProperty("val1", OType.DOUBLE);
    account.createProperty("val2", OType.DOUBLE);
    account.createProperty("val3", OType.FLOAT);
    account.createProperty("val4", OType.SHORT);
    account.createProperty("val5", OType.STRING);
    account.createProperty("name", OType.STRING);
  }
View Full Code Here

    OClass account = database.getMetadata().getSchema()
        .createClass("Account", database.getStorage().addCluster("account", OStorage.CLUSTER_TYPE.PHYSICAL));
    account.createProperty("id", OType.LONG);
    account.createProperty("val1", OType.DOUBLE);
    account.createProperty("val2", OType.DOUBLE);
    account.createProperty("val3", OType.FLOAT);
    account.createProperty("val4", OType.SHORT);
    account.createProperty("val5", OType.STRING);
    account.createProperty("name", OType.STRING);
  }
}
View Full Code Here

        .createClass("Account", database.getStorage().addCluster("account", OStorage.CLUSTER_TYPE.PHYSICAL));
    account.createProperty("id", OType.LONG);
    account.createProperty("val1", OType.DOUBLE);
    account.createProperty("val2", OType.DOUBLE);
    account.createProperty("val3", OType.FLOAT);
    account.createProperty("val4", OType.SHORT);
    account.createProperty("val5", OType.STRING);
    account.createProperty("name", OType.STRING);
  }
}
View Full Code Here

    account.createProperty("id", OType.LONG);
    account.createProperty("val1", OType.DOUBLE);
    account.createProperty("val2", OType.DOUBLE);
    account.createProperty("val3", OType.FLOAT);
    account.createProperty("val4", OType.SHORT);
    account.createProperty("val5", OType.STRING);
    account.createProperty("name", OType.STRING);
  }
}
View Full Code Here

    account.createProperty("val1", OType.DOUBLE);
    account.createProperty("val2", OType.DOUBLE);
    account.createProperty("val3", OType.FLOAT);
    account.createProperty("val4", OType.SHORT);
    account.createProperty("val5", OType.STRING);
    account.createProperty("name", OType.STRING);
  }
}
View Full Code Here

      if (getDatabase().getMetadata().getSchema().getClasses().size() > 0)
        throw new OSecurityException("Default users and roles already installed");

      // CREATE ROLE AND USER SCHEMA CLASSES
      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);
View Full Code Here

        throw new OSecurityException("Default users and roles already installed");

      // CREATE ROLE AND USER SCHEMA CLASSES
      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);
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.