use of org.dbflute.logic.jdbc.metadata.info.DfProcedureMeta in project dbflute-core by dbflute.
the class DfProcedureExtractor method filterByProperty.
// -----------------------------------------------------
// Filter by Property
// ------------------
protected List<DfProcedureMeta> filterByProperty(List<DfProcedureMeta> procedureList) {
if (_suppressFilterByProperty) {
return procedureList;
}
final DfOutsideSqlProperties prop = getOutsideSqlProperties();
final List<DfProcedureMeta> resultList = new ArrayList<DfProcedureMeta>();
log("...Filtering procedures by the property: before=" + procedureList.size());
int passedCount = 0;
for (DfProcedureMeta meta : procedureList) {
if (isTargetByProperty(meta, prop)) {
resultList.add(meta);
} else {
++passedCount;
}
}
if (passedCount == 0) {
log(" -> All procedures are target: count=" + procedureList.size());
}
return resultList;
}
use of org.dbflute.logic.jdbc.metadata.info.DfProcedureMeta in project dbflute-core by dbflute.
the class DfSchemaInitializerJdbc method dropProcedure.
// ===================================================================================
// Drop Procedure
// ==============
protected void dropProcedure(Connection conn, List<DfTableMeta> tableMetaList) {
final DfProcedureExtractor handler = new DfProcedureExtractor();
handler.suppressAdditionalSchema();
handler.suppressLogging();
final List<DfProcedureMeta> procedureList;
try {
procedureList = handler.getPlainProcedureList(_dataSource, _unifiedSchema);
} catch (SQLException e) {
String msg = "Failed to get procedure meta data: " + _unifiedSchema;
throw new SQLFailureException(msg, e);
}
callbackDropProcedureByJdbc(conn, procedureList, createDropProcedureByJdbcCallback());
}
use of org.dbflute.logic.jdbc.metadata.info.DfProcedureMeta in project dbflute-core by dbflute.
the class DfSchemaXmlSerializer method extractProcedureMap.
protected Map<String, DfProcedureMeta> extractProcedureMap() {
final DfProcedureExtractor procedureExtractor = createProcedureExtractor();
Map<String, DfProcedureMeta> procedureMap = null;
try {
procedureMap = procedureExtractor.getAvailableProcedureMap(_dataSource);
} catch (SQLException continued) {
// because of supplement
_log.info("*Failed to get procedure map: " + continued.getMessage());
} catch (RuntimeException continued) {
// because of supplement
_log.info("*Failed to get procedure map: " + continued.getMessage());
}
return procedureMap;
}
use of org.dbflute.logic.jdbc.metadata.info.DfProcedureMeta in project dbflute-core by dbflute.
the class DfSchemaXmlSerializer method processProcedure.
protected void processProcedure(Connection conn, DatabaseMetaData metaData) throws SQLException {
_log.info("...Extracting procedures");
final Map<String, DfProcedureMeta> procedureMap = extractProcedureMap();
if (procedureMap == null) {
return;
}
_log.info("...Processing procedures: " + procedureMap.size());
final Element procedureGroupElement = _doc.createElement("procedureGroup");
for (Entry<String, DfProcedureMeta> entry : procedureMap.entrySet()) {
final DfProcedureMeta procedureMeta = entry.getValue();
doProcessProcedure(procedureGroupElement, procedureMeta);
}
_databaseNode.appendChild(procedureGroupElement);
}
Aggregations