private void processStartProcedure(Attributes attributes) throws SAXException { String name = attributes.getValue("", "name"); if (null == name) { throw new SAXException("MapLoader::processStartProcedure()," + " no procedure name."); } String schema = attributes.getValue("", "schema"); String catalog = attributes.getValue("", "catalog"); String returningValue = attributes.getValue("", "returningValue"); procedure = new Procedure(name); procedure.setReturningValue(returningValue != null && returningValue.equalsIgnoreCase(TRUE)); procedure.setSchema(schema); procedure.setCatalog(catalog); dataMap.addProcedure(procedure); }
private void processStartProcedure(Attributes attributes) throws SAXException { String name = attributes.getValue("", "name"); if (null == name) { throw new SAXException("MapLoader::processStartProcedure()," + " no procedure name."); } String schema = attributes.getValue("", "schema"); String catalog = attributes.getValue("", "catalog"); String returningValue = attributes.getValue("", "returningValue"); procedure = new Procedure(name); procedure.setReturningValue(returningValue != null && returningValue.equalsIgnoreCase(TRUE)); procedure.setSchema(schema); procedure.setCatalog(catalog); dataMap.addProcedure(procedure); }
void setSchema(String text) { if (text != null && text.trim().length() == 0) { text = null; } Procedure procedure = eventController.getCurrentProcedure(); if (procedure != null && !Util.nullSafeEquals(procedure.getSchema(), text)) { procedure.setSchema(text); eventController.fireProcedureEvent(new ProcedureEvent(this, procedure)); } }
@Override protected void processResultSetRow(CatalogFilter catalog, SchemaFilter schema, DbLoadDataStore map, ResultSet rs) throws SQLException { PatternFilter filter = config.getFiltersConfig().proceduresFilter(catalog.name, schema.name); String name = rs.getString("PROCEDURE_NAME"); if (!filter.isIncluded(name)) { LOGGER.info("skipping Cayenne PK procedure: " + name); return; } Procedure procedure = new Procedure(name); procedure.setCatalog(rs.getString("PROCEDURE_CAT")); procedure.setSchema(rs.getString("PROCEDURE_SCHEM")); switch (rs.getShort("PROCEDURE_TYPE")) { case DatabaseMetaData.procedureNoResult: case DatabaseMetaData.procedureResultUnknown: procedure.setReturningValue(false); break; case DatabaseMetaData.procedureReturnsResult: procedure.setReturningValue(true); break; } map.addProcedureSafe(procedure); } }
public void createProcedure(DataMap map, Procedure procedure) { ProjectController mediator = getProjectController(); procedure.setSchema(map.getDefaultSchema()); procedure.setCatalog(map.getDefaultCatalog()); map.addProcedure(procedure); fireProcedureEvent(this, mediator, map, procedure); }
procedure.setSchema(schema);
if (doAll || Util.isEmptyString(procedure.getSchema())) { if (!Util.nullSafeEquals(defaultSchema, procedure.getSchema())) { procedure.setSchema(defaultSchema);