/** * Refresh or add the mapping for the given instance. */ private void refresh(Class<?> cls) { if (cls == null) return; MappingRepository repos = getRepository(); repos.setStrategyInstaller(new RefreshStrategyInstaller(repos)); if (getMapping(repos, cls, true) != null) { _flush = true; _flushSchema = true; } }
/** * Add the mapping for the given instance. */ private void add(Class cls) { if (cls == null) return; MappingRepository repos = getRepository(); repos.setStrategyInstaller(new MappingStrategyInstaller(repos)); if (getMapping(repos, cls, true) != null) { _flush = true; _flushSchema = true; } }
/** * Add the mapping for the given instance. */ private void add(Class<?> cls) { if (cls == null) return; MappingRepository repos = getRepository(); repos.setStrategyInstaller(new MappingStrategyInstaller(repos)); if (getMapping(repos, cls, true) != null) { _flush = true; _flushSchema = true; } }
/** * Add the mapping for the given instance. */ private void add(Class<?> cls) { if (cls == null) return; MappingRepository repos = getRepository(); repos.setStrategyInstaller(new MappingStrategyInstaller(repos)); if (getMapping(repos, cls, true) != null) { _flush = true; _flushSchema = true; } }
/** * Add the mapping for the given instance. */ private void add(Class<?> cls) { if (cls == null) return; MappingRepository repos = getRepository(); repos.setStrategyInstaller(new MappingStrategyInstaller(repos)); if (getMapping(repos, cls, true) != null) { _flush = true; _flushSchema = true; } }
/** * Refresh or add the mapping for the given instance. */ private void refresh(Class<?> cls) { if (cls == null) return; MappingRepository repos = getRepository(); repos.setStrategyInstaller(new RefreshStrategyInstaller(repos)); if (getMapping(repos, cls, true) != null) { _flush = true; _flushSchema = true; } }
/** * Refresh or add the mapping for the given instance. */ private void refresh(Class cls) { if (cls == null) return; MappingRepository repos = getRepository(); repos.setStrategyInstaller(new RefreshStrategyInstaller(repos)); if (getMapping(repos, cls, true) != null) { _flush = true; _flushSchema = true; } }
/** * Add the mapping for the given instance. */ private void add(Class<?> cls) { if (cls == null) return; MappingRepository repos = getRepository(); repos.setStrategyInstaller(new MappingStrategyInstaller(repos)); if (getMapping(repos, cls, true) != null) { _flush = true; _flushSchema = true; } }
/** * Refresh or add the mapping for the given instance. */ private void refresh(Class<?> cls) { if (cls == null) return; MappingRepository repos = getRepository(); repos.setStrategyInstaller(new RefreshStrategyInstaller(repos)); if (getMapping(repos, cls, true) != null) { _flush = true; _flushSchema = true; } }
/** * Refresh or add the mapping for the given instance. */ private void refresh(Class<?> cls) { if (cls == null) return; MappingRepository repos = getRepository(); repos.setStrategyInstaller(new RefreshStrategyInstaller(repos)); if (getMapping(repos, cls, true) != null) { _flush = true; _flushSchema = true; } }
/** * Validate the mappings for the given class and its fields. */ private void validate(Class<?> cls) { if (cls == null) return; MappingRepository repos = getRepository(); repos.setStrategyInstaller(new RuntimeStrategyInstaller(repos)); if (getMapping(repos, cls, true) != null) _flushSchema = !contains(_schemaActions,SCHEMA_ACTION_NONE) && !contains(_schemaActions,SchemaTool.ACTION_ADD); }
/** * Validate the mappings for the given class and its fields. */ private void validate(Class<?> cls) { if (cls == null) return; MappingRepository repos = getRepository(); repos.setStrategyInstaller(new RuntimeStrategyInstaller(repos)); if (getMapping(repos, cls, true) != null) _flushSchema = !contains(_schemaActions,SCHEMA_ACTION_NONE) && !contains(_schemaActions,SchemaTool.ACTION_ADD); }
/** * Validate the mappings for the given class and its fields. */ private void validate(Class<?> cls) { if (cls == null) return; MappingRepository repos = getRepository(); repos.setStrategyInstaller(new RuntimeStrategyInstaller(repos)); if (getMapping(repos, cls, true) != null) _flushSchema = !contains(_schemaActions,SCHEMA_ACTION_NONE) && !contains(_schemaActions,SchemaTool.ACTION_ADD); }
/** * Validate the mappings for the given class and its fields. */ private void validate(Class cls) { if (cls == null) return; MappingRepository repos = getRepository(); repos.setStrategyInstaller(new RuntimeStrategyInstaller(repos)); if (getMapping(repos, cls, true) != null) _flushSchema = !contains(_schemaActions,SCHEMA_ACTION_NONE) && !contains(_schemaActions,SchemaTool.ACTION_ADD); }
/** * Validate the mappings for the given class and its fields. */ private void validate(Class<?> cls) { if (cls == null) return; MappingRepository repos = getRepository(); repos.setStrategyInstaller(new RuntimeStrategyInstaller(repos)); if (getMapping(repos, cls, true) != null) _flushSchema = !contains(_schemaActions,SCHEMA_ACTION_NONE) && !contains(_schemaActions,SchemaTool.ACTION_ADD); }
/** * Create the schema using the mapping for the given instance. */ private void buildSchema(Class<?> cls) { if (cls == null) return; MappingRepository repos = getRepository(); repos.setStrategyInstaller(new RuntimeStrategyInstaller(repos)); if (getMapping(repos, cls, true) == null) return; // set any logical pks to non-logical so they get flushed _flushSchema = true; Schema[] schemas = _schema.getSchemas(); Table[] tables; Column[] cols; for (int i = 0; i < schemas.length; i++) { tables = schemas[i].getTables(); for (int j = 0; j < tables.length; j++) { if (tables[j].getPrimaryKey() == null) continue; tables[j].getPrimaryKey().setLogical(false); cols = tables[j].getPrimaryKey().getColumns(); for (int k = 0; k < cols.length; k++) cols[k].setNotNull(true); } } }
/** * Create the schema using the mapping for the given instance. */ private void buildSchema(Class<?> cls) { if (cls == null) return; MappingRepository repos = getRepository(); repos.setStrategyInstaller(new RuntimeStrategyInstaller(repos)); if (getMapping(repos, cls, true) == null) return; // set any logical pks to non-logical so they get flushed _flushSchema = true; Schema[] schemas = _schema.getSchemas(); Table[] tables; Column[] cols; for (int i = 0; i < schemas.length; i++) { tables = schemas[i].getTables(); for (int j = 0; j < tables.length; j++) { if (tables[j].getPrimaryKey() == null) continue; tables[j].getPrimaryKey().setLogical(false); cols = tables[j].getPrimaryKey().getColumns(); for (int k = 0; k < cols.length; k++) cols[k].setNotNull(true); } } }
/** * Create the schema using the mapping for the given instance. */ private void buildSchema(Class cls) { if (cls == null) return; MappingRepository repos = getRepository(); repos.setStrategyInstaller(new RuntimeStrategyInstaller(repos)); if (getMapping(repos, cls, true) == null) return; // set any logical pks to non-logical so they get flushed _flushSchema = true; Schema[] schemas = _schema.getSchemas(); Table[] tables; Column[] cols; for (int i = 0; i < schemas.length; i++) { tables = schemas[i].getTables(); for (int j = 0; j < tables.length; j++) { if (tables[j].getPrimaryKey() == null) continue; tables[j].getPrimaryKey().setLogical(false); cols = tables[j].getPrimaryKey().getColumns(); for (int k = 0; k < cols.length; k++) cols[k].setNotNull(true); } } }
/** * Create the schema using the mapping for the given instance. */ private void buildSchema(Class<?> cls) { if (cls == null) return; MappingRepository repos = getRepository(); repos.setStrategyInstaller(new RuntimeStrategyInstaller(repos)); if (getMapping(repos, cls, true) == null) return; // set any logical pks to non-logical so they get flushed _flushSchema = true; Schema[] schemas = _schema.getSchemas(); Table[] tables; Column[] cols; for (int i = 0; i < schemas.length; i++) { tables = schemas[i].getTables(); for (int j = 0; j < tables.length; j++) { if (tables[j].getPrimaryKey() == null) continue; tables[j].getPrimaryKey().setLogical(false); cols = tables[j].getPrimaryKey().getColumns(); for (int k = 0; k < cols.length; k++) cols[k].setNotNull(true); } } }
/** * Create the schema using the mapping for the given instance. */ private void buildSchema(Class<?> cls) { if (cls == null) return; MappingRepository repos = getRepository(); repos.setStrategyInstaller(new RuntimeStrategyInstaller(repos)); if (getMapping(repos, cls, true) == null) return; // set any logical pks to non-logical so they get flushed _flushSchema = true; Schema[] schemas = _schema.getSchemas(); Table[] tables; Column[] cols; for (int i = 0; i < schemas.length; i++) { tables = schemas[i].getTables(); for (int j = 0; j < tables.length; j++) { if (tables[j].getPrimaryKey() == null) continue; tables[j].getPrimaryKey().setLogical(false); cols = tables[j].getPrimaryKey().getColumns(); for (int k = 0; k < cols.length; k++) cols[k].setNotNull(true); } } }