Package it.eng.spago.dbaccess.sql.result

Examples of it.eng.spago.dbaccess.sql.result.DataResult


   * @param valueCode  The domain Value Dtring
   * @return  The Domain ID
   */
    private Integer findSBIDomainValueID(String domainCode, String valueCode ){
      SQLCommand cmd = null;
    DataResult dr = null;
    DataConnection dataConnection = null;
    Integer returnValue = null;
    try {
      IDomainDAO domdao = DAOFactory.getDomainDAO();
      Domain dom = domdao.loadDomainByCodeAndValue(domainCode, valueCode);
View Full Code Here


        ResponseContainer responseContainer, String datasource, String statement) throws EMFInternalError {
      Object result = null;
      DataConnectionManager dataConnectionManager = null;
      DataConnection dataConnection = null;
      SQLCommand sqlCommand = null;
      DataResult dataResult = null;
      try {
        //dataConnectionManager = DataConnectionManager.getInstance();
        //dataConnection = dataConnectionManager.getConnection(pool);
        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);
      }
View Full Code Here

   */
  public boolean executeUpdateQuery(Map<String , Object> params, JSONObject metaParams) throws Throwable, Exception{
    boolean toReturn = true;
    DataConnection dataConnection = null;
    SQLCommand sqlCommand = null;
    DataResult dataResult = null;
   
    logger.debug("IN");
   
    try {

View Full Code Here

  private String getLovResult(IEngUserProfile profile,String statement) throws Exception {
    String resStr = null;
    DataConnection dataConnection = null;
    SQLCommand sqlCommand = null;
    DataResult dataResult = null;
    try {
      //gets connection
      DataSourceUtilities dsUtil = new DataSourceUtilities();
      Connection conn = dsUtil.getConnection(profile,dataSource);
      dataConnection = dsUtil.getDataConnection(conn);
      sqlCommand = dataConnection.createSelectCommand(statement, false);
      dataResult = sqlCommand.execute();
      ScrollableDataResult scrollableDataResult = (ScrollableDataResult) dataResult.getDataObject();
      SourceBean result = scrollableDataResult.getSourceBean();
      resStr = result.toXML(false);
      resStr = resStr.trim();
      if(resStr.startsWith("<?")) {
        resStr = resStr.substring(2);
View Full Code Here

    List toReturn = new ArrayList();
    List<String> values = biparam.getParameterValues();
    List parameterValuesDescription = new ArrayList();
    DataConnection dataConnection = null;
    SQLCommand sqlCommand = null;
    DataResult dataResult = null;
    String statement = null;
    SourceBean result = null;
    try {
      statement = getValidationQuery(profile, biparam, values);
      //gets connection
      DataSourceUtilities dsUtil = new DataSourceUtilities();
      Connection conn = dsUtil.getConnection(profile,dataSource);
      dataConnection = dsUtil.getDataConnection(conn);
      sqlCommand = dataConnection.createSelectCommand(statement, false);
      dataResult = sqlCommand.execute();
      ScrollableDataResult scrollableDataResult = (ScrollableDataResult) dataResult.getDataObject();
      result = scrollableDataResult.getSourceBean();
    } finally {
      Utils.releaseResources(dataConnection, sqlCommand, dataResult);
    }
View Full Code Here

      //ResponseContainer responseContainer, String pool, String statement, List columnsNames) throws EMFInternalError {
    Object result = null;
    //DataConnectionManager dataConnectionManager = null;
    DataConnection dataConnection = null;
    SQLCommand sqlCommand = null;
    DataResult dataResult = null;
    try {
      /*dataConnectionManager = DataConnectionManager.getInstance();
      dataConnection = dataConnectionManager.getConnection(pool);
      */
      //gets connection
      DataSourceUtilities dsUtil = new DataSourceUtilities();
      Connection conn = dsUtil.getConnection(requestContainer,datasource);
      dataConnection = dsUtil.getDataConnection(conn);

      sqlCommand = dataConnection.createSelectCommand(statement, false);
      dataResult = sqlCommand.execute();
      ScrollableDataResult scrollableDataResult = (ScrollableDataResult) dataResult
          .getDataObject();
      List temp = Arrays.asList(scrollableDataResult.getColumnNames());
      columnsNames.addAll(temp);
      result = scrollableDataResult.getSourceBean();
    } finally {
View Full Code Here

    // exec CHECKED_QUERY
    ScrollableDataResult scrollableDataResult = null;
    SQLCommand sqlCommand = null;
    DataConnection dataConnection = null;
    DataResult dataResult = null;
    String pool = null;
    try {
      pool = (String) config.getAttribute("POOL");
      dataConnection = DataConnectionManager.getInstance().getConnection(
          pool);
      sqlCommand = dataConnection.createSelectCommand(statement);
      dataResult = sqlCommand.execute();
      scrollableDataResult = (ScrollableDataResult) dataResult
          .getDataObject();
      SourceBean chekedObjectsBean = scrollableDataResult.getSourceBean();
      List checkedObjectsList = chekedObjectsBean
          .getAttributeAsList("ROW");
View Full Code Here

      ResponseContainer responseContainer, String pool, String statement) throws EMFInternalError {
    Object result = null;
    DataConnectionManager dataConnectionManager = null;
    DataConnection dataConnection = null;
    SQLCommand sqlCommand = null;
    DataResult dataResult = null;
    try {
      dataConnectionManager = DataConnectionManager.getInstance();
      dataConnection = dataConnectionManager.getConnection(pool);
      sqlCommand = dataConnection.createSelectCommand(statement);
      dataResult = sqlCommand.execute();
      ScrollableDataResult scrollableDataResult = (ScrollableDataResult) dataResult
          .getDataObject();
      result = scrollableDataResult.getSourceBean();
    } catch (Exception ex) {
      TracerSingleton.log(Constants.NOME_MODULO,
          TracerSingleton.CRITICAL, "executeSelect:", ex);
View Full Code Here

   
    // exec CHECKED_QUERY
    ScrollableDataResult scrollableDataResult = null;
    SQLCommand sqlCommand = null;
    DataConnection dataConnection = null;
    DataResult dataResult = null;
    try {
      aSession = HibernateUtil.currentSession();
      tx = aSession.beginTransaction();
      Connection jdbcConnection = aSession.connection();
      dataConnection = DelegatedHibernateConnectionListService.getDataConnection(jdbcConnection);
          sqlCommand = dataConnection.createSelectCommand(statement);
          dataResult = sqlCommand.execute();
          scrollableDataResult = (ScrollableDataResult) dataResult.getDataObject();
      SourceBean chekedObjectsBean = scrollableDataResult.getSourceBean();
      List checkedObjectsList = chekedObjectsBean
          .getAttributeAsList("ROW");
      for (int i = 0; i < checkedObjectsList.size(); i++) {
        SourceBean objects = (SourceBean) checkedObjectsList.get(i);
View Full Code Here

    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"))
            else {
                InformationDataResult informationDataResult = (InformationDataResult) dataResult
                        .getDataObject();
                result = new Boolean(informationDataResult.getAffectedRows() > 0);
            } // if (type.equalsIgnoreCase("SELECT")) else
            return result;
        } // try
View Full Code Here

TOP

Related Classes of it.eng.spago.dbaccess.sql.result.DataResult

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.