Saves those schemas which depends on other collections data.
@param app
176329
function saveSchemas(app) {
    var keys = Object.keys(DependenciesMap);
    if (keys.length == 0) {
        _l('Default data saved...');
        event.emit(COMPLETED_EVENT);
        return;
    }
    HandlerArray = [];
    var errFlag = true;
    keys.forEach(function (k) {
        dependenciesExists(k) && HandlerArray.push(getHandler(app, k, PluginsData[k]));

    });
    async.series(HandlerArray, function (err, end) {
        if (err)
            throw err;

        saveSchemas(app);
    });
}
668993
public static void extendDatabaseSchema(final App app, final JsonSchema newSchema) throws FrameworkException, URISyntaxException {

		try (final Tx tx = app.tx()) {

			newSchema.createDatabaseSchema(app, JsonSchema.ImportMode.extend);

			tx.success();
		}
	}
21587
public static void saveAll(final Object obj, final PersistenceStoreType storeType) {

        try {

            File file = new File(persistenceStorePath + File.separator + storeType);

            // create necessary parent directories on file system
            File directory = file.getParentFile();
            if (null != directory && !directory.exists()) {
                directory.mkdirs();
            }

            log.info("aws-mock: saving to {}", file.getAbsolutePath());

            ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(file, false));
            out.writeObject(obj);
            out.close();
        } catch (FileNotFoundException e) {
            log.error("FileNotFoundException caught during saving object to file: {}",
                    e.getMessage());
        } catch (IOException e) {
            log.error("IOException caught during saving object to file: {}", e.getMessage());
        }

    }
804461
public void putTableSchema(String key, TableSchema schema) {
		checkNotNull(key);
		checkNotNull(schema);

		final String[] fieldNames = schema.getFieldNames();
		final TypeInformation<?>[] fieldTypes = schema.getFieldTypes();

		final List<List<String>> values = new ArrayList<>();
		for (int i = 0; i < schema.getFieldCount(); i++) {
			values.add(Arrays.asList(fieldNames[i], TypeStringUtils.writeTypeInfo(fieldTypes[i])));
		}

		putIndexedFixedProperties(
			key,
			Arrays.asList(TABLE_SCHEMA_NAME, TABLE_SCHEMA_TYPE),
			values);
	}
214268
public void add(Collection<MobileApplication> mobileApplications)
    {
        for(MobileApplication mobileApplication : mobileApplications)
            this.mobileApplications.put(mobileApplication.getId(), mobileApplication);
    }
97011
public static void writeSchema(String outputPath, Schema schema, JavaSparkContext sc) throws IOException {
        writeStringToFile(outputPath, schema.toString(), sc);
    }
794307
public void setSchema(String schema)
   {
      if (schema.charAt(schema.length() - 1) != '.')
      {
         schema = schema + '.';
      }
      m_schema = schema;
   }
323027
public void setSchema(java.util.Collection<SchemaAttributeType> schema) {
        if (schema == null) {
            this.schema = null;
            return;
        }

        this.schema = new java.util.ArrayList<SchemaAttributeType>(schema);
    }
431825
public void addSchema( String uri, IslandSchema s ) {
		if( schemata.containsKey(uri) )
			throw new IllegalArgumentException();
		schemata.put( uri, s );
	}
230711
public static JsonSchema createFromDatabase(final App app, final List<String> types) throws FrameworkException, URISyntaxException {

		try (final Tx tx = app.tx()) {

			final JsonSchema schema = StructrSchemaDefinition.initializeFromDatabase(app, types);

			tx.success();

			return schema;
		}
	}
1201316
public void refreshSchemaAll() {
		//TODO we don't have a database lock here!
		for (ZooClassDef def: cache.getSchemata()) {
			def.jdoZooGetNode().refreshSchema(def);
			def.getProvidedContext().getIndexer().refreshWithSchema(def);
			def.associateJavaTypes(false, true);
		}
	}
792395
public void put(final String shardingSchemaName, final Collection<String> dataSourceNames) {
        schemaGroup.put(shardingSchemaName, dataSourceNames);
    }
367478
function(app) {
  if (!appCache.good) {
    appCache.good = [];
  }
  if (!existsInCache(app, appCache.good)) {
    appCache.good.push(app);
  }
}
1256111
function (model, options, callback) {
                var schema = model.schema,
                    subModels = [],
                    type,
                    subCollection,
                    subModel,
                    addSubModel = function (model) {
                        subModels.push(model);
                    };

                for (var reference in schema) {
                    if (schema.hasOwnProperty(reference)) {
                        type = schema[reference];
                        if (type.classof) {
                            // TODO: remove $nestedModels and use options to specify, which subModels should also be saved
                            // This depends on the changes of the model.
                            // If the submodels haven't changed, than there is no need to save sub models/collections.
                            if (type.classof(Model)) {
                                subModel = model.$[reference];
                                if (subModel && _.include(model.$nestedModels, reference)) {
                                    subModels.push(subModel);
                                }
                            } else if (type.classof(Collection)) {
                                subCollection = model.$[reference];
                                if (subCollection) {
                                    subCollection.each(addSubModel);
                                }
                            }
                        }

                    }
                }

                flow()
                    .parEach(subModels, function (model, cb) {
                        model.save(options, cb);
                    })
                    .exec(callback);
            }
1116491
public static function prepareMigrationTable(App $app): void{
        $migration = new class($app) extends Migration{

            /**
             * Create the migration table if it does not exist yet
             */
            public function up(): void{
                $schema = $this->getSchema('default');
                if (!$schema->hasTable('migrations')) {
                    $schema->create('migrations', function (Blueprint $table){
                        $table->increments('id');
                        $table->string('name', 255);
                    });
                }
            }

            /**
             * Is not needed, but add it nevertheless
             */
            public function down(): void{
                $this->getSchema('default')->drop('migrations');
            }
        };
        $migration->up();
    }
219902
def attach_schema(self, schem):
    """"""
    self.tuple_schema = schema.AndSchema.make(self.tuple_schema, schem)
1015888
private void addMissingSchemas(Set<String> missingSchemas) {
		if (missingSchemas.isEmpty()) {
			return;
		}
		for (String className: missingSchemas) {
			Class<?> cls;
			try {
				cls = Class.forName(className);
			} catch (ClassNotFoundException e) {
				throw DBLogger.newFatal("Invalid field type in schema", e);
			}
			//TODO primary node is not always right here...
			createSchema(cache.getSession().getPrimaryNode(), cls);
		}
	}