本文整理汇总了Java中oracle.jdbc.OracleCallableStatement类的典型用法代码示例。如果您正苦于以下问题:Java OracleCallableStatement类的具体用法?Java OracleCallableStatement怎么用?Java OracleCallableStatement使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
OracleCallableStatement类属于oracle.jdbc包,在下文中一共展示了OracleCallableStatement类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getFile
import oracle.jdbc.OracleCallableStatement; //导入依赖的package包/类
/**
* Método responsável pela extração de aplicação
*
* @since APEX 3 Parcial
* @since APEX 4 Parcial
* @since APEX 5
* @return Aplicação
* @throws java.sql.SQLException
* @throws java.io.IOException
*/
private CLOB getFile() throws SQLException, IOException {
CLOB vClob;
Connection vConn = getConn();
try (OracleCallableStatement vOCS = (OracleCallableStatement) vConn.prepareCall(getStmt(EXPORT_APPLICATION))) {
vOCS.registerOutParameter(1, 2005);
vOCS.setBigDecimal(2, getApplicationId());
if (getApexVersion() >= APEX_VERSION_4) {
vOCS.setString(3, isExpPubReports() ? "Y" : "N");
vOCS.setString(4, isExpSavedReports() ? "Y" : "N");
vOCS.setString(5, isExpIRNotifications() ? "Y" : "N");
vOCS.setString(6, isExpTranslations() ? "Y" : "N");
}
if (getApexVersion() >= APEX_VERSION_5) {
vOCS.setString(7, isExpAppMapping() ? "Y" : "N");
vOCS.setString(8, isExpOriginalIds() ? "Y" : "N");
}
vOCS.execute();
vClob = vOCS.getCLOB(1);
}
return vClob;
}
示例2: getFeedback
import oracle.jdbc.OracleCallableStatement; //导入依赖的package包/类
/**
* Método getFeedback
*
* @since APEX 4
* @return oralce.sql.CLOB
* @throws java.sql.SQLException
* @throws java.io.IOException
*/
private CLOB getFeedback() throws SQLException, IOException {
CLOB vClob;
Connection vConn = getConn();
try (OracleCallableStatement vOCS = (OracleCallableStatement) vConn.prepareCall(getStmt(getDeploymentSystem() == null ? EXPORT_FEEDBACK_DEVELOPMENT : EXPORT_FEEDBACK_DEPLOYMENT))) {
vOCS.registerOutParameter(1, 2005);
vOCS.setBigDecimal(2, getWorkspaceId());
if (getDeploymentSystem() == null) {
vOCS.setDate(3, getExpFeedbackSince());
} else {
vOCS.setString(3, getDeploymentSystem());
vOCS.setDate(4, getExpFeedbackSince());
}
vOCS.execute();
vClob = vOCS.getCLOB(1);
}
return vClob;
}
示例3: updatePropByIds
import oracle.jdbc.OracleCallableStatement; //导入依赖的package包/类
/**
* 依据ID值批量更新数据库
* @param oldPname
* @param oldContent
* @param newPname
* @param newContent
* @param ids
* @return
* @throws SQLException
* ;
*/
public boolean updatePropByIds(String oldPname, String oldContent, String newPname, String newContent,
List<Integer> ids) throws SQLException {
if (null == ids || ids.isEmpty()) {
return false;
}
String updateSql = dbConfig.getOperateDbSQL("update-mprop-by-content-ids");
List<List<Integer>> list = groupIds(ids);
boolean flag = false;
for (List<Integer> t : list) {
updateSql = updateSql.replaceAll("_SET_", converList2SetString(t));
OracleCallableStatement prepareCall = (OracleCallableStatement) conn.prepareCall(updateSql);
prepareCall.setString(1, newPname);
prepareCall.setStringForClob(2, newContent);
prepareCall.setString(3, oldPname);
prepareCall.setString(4, oldContent);
int executeUpdate = prepareCall.executeUpdate();
if (executeUpdate > 0) {
flag = true;
}
prepareCall.close();
}
return flag;
}
示例4: updateAllProp
import oracle.jdbc.OracleCallableStatement; //导入依赖的package包/类
/**
* 批量更新整个数据库
* @param oldPname
* @param oldContent
* @param newPname
* @param newContent
* @return
* @throws SQLException
* ;
*/
public boolean updateAllProp(String oldPname, String oldContent, String newPname, String newContent)
throws SQLException {
String updateSql = dbConfig.getOperateDbSQL("update-mprop-by-content");
OracleCallableStatement prepareCall = (OracleCallableStatement) conn.prepareCall(updateSql);
prepareCall.setString(1, newPname);
prepareCall.setStringForClob(2, newContent);
prepareCall.setString(3, oldPname);
prepareCall.setString(4, oldContent);
int executeUpdate = prepareCall.executeUpdate();
prepareCall.close();
if (executeUpdate > 0) {
return true;
}
return false;
}
示例5: wrapCallableStatement
import oracle.jdbc.OracleCallableStatement; //导入依赖的package包/类
@Override
protected WrappedCallableStatement wrapCallableStatement(String sql,
String ref, CallableStatement prepareCall) {
if (prepareCall instanceof OracleCallableStatement) {
return new WrappedOracleCallableStatement(prepareCall, sql, ref,
getTransactionIdentifier(), this);
}
return super.wrapCallableStatement(sql, ref, prepareCall);
}
示例6: getWorkspace
import oracle.jdbc.OracleCallableStatement; //导入依赖的package包/类
/**
* Método responsável pela extração de espaços de trabalho
*
* @since APEX 4
* @return Espaço de trabalho
* @throws java.sql.SQLException
* @throws java.io.IOException
*/
private CLOB getWorkspace() throws SQLException, IOException {
CLOB vClob;
Connection vConn = getConn();
try (OracleCallableStatement vOCS = (OracleCallableStatement) vConn.prepareCall(getStmt(EXPORT_WORKSPACE))) {
vOCS.registerOutParameter(1, 2005);
vOCS.setBigDecimal(2, getWorkspaceId());
vOCS.setBoolean(3, isExpTeamdevdata());
vOCS.setBoolean(4, isExpTeamdevdata() ? isExpMinimal() : false);
vOCS.execute();
vClob = vOCS.getCLOB(1);
}
return vClob;
}
示例7: getStaticFiles
import oracle.jdbc.OracleCallableStatement; //导入依赖的package包/类
/**
* Método responsável pela exportação de arquivos estáticos
*
* @since APEX 4
* @return Arquivos estáticos
* @throws java.sql.SQLException
* @throws java.io.IOException
*/
private CLOB getStaticFiles() throws SQLException, IOException {
CLOB vClob;
Connection vConn = getConn();
try (OracleCallableStatement vOCS = (OracleCallableStatement) vConn.prepareCall(getStmt(EXPORT_STATIC_FILES))) {
vOCS.registerOutParameter(1, 2005);
vOCS.setBigDecimal(2, getWorkspaceId());
vOCS.execute();
vClob = vOCS.getCLOB(1);
}
return vClob;
}
示例8: WrappedOracleCallableStatement
import oracle.jdbc.OracleCallableStatement; //导入依赖的package包/类
public WrappedOracleCallableStatement(CallableStatement preparedStatement,
String sql, String ref, String transaction, Connection connection) {
super(preparedStatement, sql, ref, transaction, connection);
oraclePs = (OracleCallableStatement) preparedStatement;
}