public void mergeInto (MetadataStore store) { store.addSchema(this.schema); store.addDataTypes(this.dataTypes); if (this.grants != null) { store.addGrants(this.grants.values()); } }
public void merge(MetadataStore store) { if (store != null) { for (Schema s:store.getSchemaList()) { addSchema(s); } addDataTypes(store.getDatatypes()); addGrants(store.grants.values()); roles.putAll(store.roles); } }
public MetadataStore load(Collection<Datatype> systemDatatypes, VDBResources vdbResources) throws IOException { MetadataStore store = new MetadataStore(); loadAll(systemDatatypes, vdbResources.getEntriesPlusVisibilities()); // the index map below is keyed by uuid not modelname, so map lookup is not possible Collection<AbstractMetadataRecord> modelRecords = getByType(MetadataConstants.RECORD_TYPE.MODEL).values(); for (AbstractMetadataRecord modelRecord:modelRecords) { Schema s = (Schema) modelRecord; store.addSchema(s); getTables(s); getProcedures(s); } return store; }
public MetadataStore load(Collection<Datatype> systemDatatypes, VDBResources vdbResources) throws IOException { MetadataStore store = new MetadataStore(); loadAll(systemDatatypes, vdbResources.getEntriesPlusVisibilities()); // the index map below is keyed by uuid not modelname, so map lookup is not possible Collection<AbstractMetadataRecord> modelRecords = getByType(MetadataConstants.RECORD_TYPE.MODEL).values(); for (AbstractMetadataRecord modelRecord:modelRecords) { Schema s = (Schema) modelRecord; store.addSchema(s); getTables(s); getProcedures(s); } return store; }
/** * Create a physical model with default settings. */ public static Schema createPhysicalModel(String name, MetadataStore metadataStore) { Schema schema = new Schema(); schema.setName(name); metadataStore.addSchema(schema); return schema; }
public void addSchema(Schema schema) { Schema s = this.store.getSchema(schema.getName()); if ( s != null) { throw new DuplicateRecordException(DataPlugin.Event.TEIID60021, DataPlugin.Util.gs(DataPlugin.Event.TEIID60021, schema.getName())); } else { this.store.addSchema(schema); } }
/** * Create a virtual model with default settings. */ public static Schema createVirtualModel(String name, MetadataStore metadataStore) { Schema schema = new Schema(); schema.setName(name); schema.setPhysical(false); metadataStore.addSchema(schema); return schema; }
schema.setPhysical(m.isSource()); schema.setProperties(m.getPropertiesMap()); metadataStore.addSchema(schema);