Package it.eng.spago.dbaccess.sql

Examples of it.eng.spago.dbaccess.sql.SQLCommand


    protected static Object executeQuery(DataConnection dataConnection, final String statement,
            final String type, final ArrayList inputParameters) throws Exception {
       
      logger.debug("IN");
        SQLCommand sqlCommand = null;
        DataResult dataResult = null;
        Object result = null;
        try {
            // Create the command to execute
            sqlCommand = createStatementSql(dataConnection, statement, type);
            if ((inputParameters != null) && (inputParameters.size() != 0)) {
                dataResult = sqlCommand.execute(inputParameters);
            } else
                dataResult = sqlCommand.execute();
            if (type.equalsIgnoreCase("SELECT")) {
                ScrollableDataResult scrollableDataResult = (ScrollableDataResult) dataResult
                        .getDataObject();
                result = scrollableDataResult.getSourceBean();
            } // if (type.equalsIgnoreCase("SELECT"))
View Full Code Here


    public static Object executeSelect(RequestContainer requestContainer, ResponseContainer responseContainer,
      String datasource, String statement) throws EMFInternalError {
  logger.debug("IN");
  Object result = null;
  DataConnection dataConnection = null;
  SQLCommand sqlCommand = null;
  DataResult dataResult = null;
  try {
      DataSourceUtilities dsUtil = new DataSourceUtilities();
      Connection conn = dsUtil.getConnection(requestContainer,datasource);
      dataConnection = dsUtil.getDataConnection(conn);
      sqlCommand = dataConnection.createSelectCommand(statement);
      dataResult = sqlCommand.execute();
      ScrollableDataResult scrollableDataResult = (ScrollableDataResult) dataResult.getDataObject();
      result = scrollableDataResult.getSourceBean();
  } finally {
      Utils.releaseResources(dataConnection, sqlCommand, dataResult);
      logger.debug("OUT");
View Full Code Here

TOP

Related Classes of it.eng.spago.dbaccess.sql.SQLCommand

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.