public OUser create() { return delegate.create(); }
public synchronized void create(ODatabaseDocumentInternal database) { schema.create(database); indexManager.create(database); security.create(); functionLibrary.create(database); sequenceLibrary.create(database); security.createClassTrigger(); scheduler.create(database); schema.forceSnapshot(database); // CREATE BASE VERTEX AND EDGE CLASSES schema.createClass(database, "V"); schema.createClass(database, "E"); //create geospatial classes try { OIndexFactory factory = OIndexes.getFactory(OClass.INDEX_TYPE.SPATIAL.toString(), "LUCENE"); if (factory != null && factory instanceof ODatabaseLifecycleListener) { ((ODatabaseLifecycleListener) factory).onCreate(database); } } catch (OIndexException x) { //the index does not exist } loaded = true; }
public OUser create() { return delegate.create(); }
protected void removeDefaultClusters() { listener.onMessage( "\nWARN: Exported database does not support manual index separation." + " Manual index cluster will be dropped."); // In v4 new cluster for manual indexes has been implemented. To keep database consistent we should shift back // all clusters and recreate cluster for manual indexes in the end. database.dropCluster(OMetadataDefault.CLUSTER_MANUAL_INDEX_NAME, true); final OSchema schema = database.getMetadata().getSchema(); if (schema.existsClass(OUser.CLASS_NAME)) schema.dropClass(OUser.CLASS_NAME); if (schema.existsClass(ORole.CLASS_NAME)) schema.dropClass(ORole.CLASS_NAME); if (schema.existsClass(OSecurityShared.RESTRICTED_CLASSNAME)) schema.dropClass(OSecurityShared.RESTRICTED_CLASSNAME); if (schema.existsClass(OFunction.CLASS_NAME)) schema.dropClass(OFunction.CLASS_NAME); if (schema.existsClass("ORIDs")) schema.dropClass("ORIDs"); if (schema.existsClass(OClassTrigger.CLASSNAME)) schema.dropClass(OClassTrigger.CLASSNAME); schema.save(); database.dropCluster(OStorage.CLUSTER_DEFAULT_NAME, true); database.getStorage().setDefaultClusterId(database.addCluster(OStorage.CLUSTER_DEFAULT_NAME)); // Starting from v4 schema has been moved to internal cluster. // Create a stub at #2:0 to prevent cluster position shifting. new ODocument().save(OStorage.CLUSTER_DEFAULT_NAME); database.getMetadata().getSecurity().create(); }