Examples of ExtendedSqlMapClient


Examples of com.ibatis.sqlmap.engine.impl.ExtendedSqlMapClient

        try {
          // create the object if is it a Collection.  If not a Collection
          // then we will just set the property to the object created
          // in processing the nested result map
          if (Collection.class.isAssignableFrom(type)) {
            ExtendedSqlMapClient client = (ExtendedSqlMapClient) request.getSession().getSqlMapClient();
            obj = ResultObjectFactoryUtil.createObjectThroughFactory(client.getResultObjectFactory(),
                request.getStatement().getId(), type);
            PROBE.setObject(resultObject, propertyName, obj);
          }
        } catch (Exception e) {
          throw new SqlMapException("Error instantiating collection property for mapping '" + mapping.getPropertyName() + "'.  Cause: " + e, e);
View Full Code Here

Examples of com.ibatis.sqlmap.engine.impl.ExtendedSqlMapClient

      throws SQLException {
    try {
      TypeHandlerFactory typeHandlerFactory = getDelegate().getTypeHandlerFactory();

      String statementName = mapping.getStatementName();
      ExtendedSqlMapClient client = (ExtendedSqlMapClient) request.getSession().getSqlMapClient();

      MappedStatement mappedStatement = client.getMappedStatement(statementName);
      Class parameterType = mappedStatement.getParameterClass();
      Object parameterObject = null;

      if (parameterType == null) {
        parameterObject = prepareBeanParameterObject(request, rs, mapping, parameterType);
View Full Code Here

Examples of com.ibatis.sqlmap.engine.impl.ExtendedSqlMapClient

    Object parameterObject;
    if (parameterType == null) {
      parameterObject = new HashMap();
    } else {
      ExtendedSqlMapClient client = (ExtendedSqlMapClient) request.getSession().getSqlMapClient();
      parameterObject = ResultObjectFactoryUtil.createObjectThroughFactory(client.getResultObjectFactory(),
          request.getStatement().getId(), parameterType);
    }
    String complexName = mapping.getColumnName();

    if (complexName.indexOf('=') > -1
View Full Code Here

Examples of com.ibatis.sqlmap.engine.impl.ExtendedSqlMapClient

          ResultMap resultMap;
          if (mapping.getResultMapName() == null) {
            resultMap = request.getResultMap();
            handleOutputParameterResults(request, resultMap, rs, callback);
          } else {
            ExtendedSqlMapClient client = (ExtendedSqlMapClient) request.getSession().getSqlMapClient();
            resultMap = client.getDelegate().getResultMap(mapping.getResultMapName());
            DefaultRowHandler rowHandler = new DefaultRowHandler();
            RowHandlerCallback handlerCallback = new RowHandlerCallback(resultMap, null, rowHandler);
            handleOutputParameterResults(request, resultMap, rs, handlerCallback);
            parameters[i] = rowHandler.getList();
          }
View Full Code Here

Examples of com.ibatis.sqlmap.engine.impl.ExtendedSqlMapClient

      size = 0;
    }
  }

  private void setupResultObjectFactory(RequestScope request) {
    ExtendedSqlMapClient client = (ExtendedSqlMapClient) request.getSession().getSqlMapClient();
    ResultObjectFactoryUtil.setResultObjectFactory(client.getResultObjectFactory());
    ResultObjectFactoryUtil.setStatementId(request.getStatement().getId());
  }
View Full Code Here

Examples of com.ibatis.sqlmap.engine.impl.ExtendedSqlMapClient

      throws SQLException {
    try {
      TypeHandlerFactory typeHandlerFactory = getDelegate().getTypeHandlerFactory();

      String statementName = mapping.getStatementName();
      ExtendedSqlMapClient client = (ExtendedSqlMapClient) request.getSession().getSqlMapClient();

      MappedStatement mappedStatement = client.getMappedStatement(statementName);
      Class parameterType = mappedStatement.getParameterClass();
      Object parameterObject = null;

      if (parameterType == null) {
        parameterObject = prepareBeanParameterObject(request, rs, mapping, parameterType);
View Full Code Here

Examples of com.ibatis.sqlmap.engine.impl.ExtendedSqlMapClient

    if (!(sqlMapClient instanceof ExtendedSqlMapClient)) {
      throw new IllegalArgumentException(
          "Cannot set TransactionConfig with DataSource for SqlMapClient if not of type " +
          "ExtendedSqlMapClient: " + sqlMapClient);
    }
    ExtendedSqlMapClient extendedClient = (ExtendedSqlMapClient) sqlMapClient;
    transactionConfig.setMaximumConcurrentTransactions(extendedClient.getDelegate().getMaxTransactions());
    extendedClient.getDelegate().setTxManager(new TransactionManager(transactionConfig));
  }
View Full Code Here

Examples of com.ibatis.sqlmap.engine.impl.ExtendedSqlMapClient

        transactionConfig.setDataSource(DataSourceFactory.getDataSource());

        ((ExternalTransactionConfig) transactionConfig).setDefaultAutoCommit(true);

        ExtendedSqlMapClient extendedClient = (ExtendedSqlMapClient) sqlMapper;
        transactionConfig.setMaximumConcurrentTransactions(extendedClient.getDelegate().getMaxTransactions());
        extendedClient.getDelegate().setTxManager(new TransactionManager(transactionConfig));

        //sqlMapper = extendedClient;

        transactionConfig = (TransactionConfig) transactionConfigClass.newInstance();

        transactionConfig.setDataSource(DataSourceFactory.getDataSource());

        ((ExternalTransactionConfig) transactionConfig).setDefaultAutoCommit(true);

        extendedClient = (ExtendedSqlMapClient) sqlMapper2;
        transactionConfig.setMaximumConcurrentTransactions(extendedClient.getDelegate().getMaxTransactions());
        extendedClient.getDelegate().setTxManager(new TransactionManager(transactionConfig));

        //sqlMapper2 = extendedClient;

        //*/

 
View Full Code Here

Examples of org.g4studio.core.orm.xibatis.sqlmap.engine.impl.ExtendedSqlMapClient

    if (!(sqlMapClient instanceof ExtendedSqlMapClient)) {
      throw new IllegalArgumentException(
          "Cannot set TransactionConfig with DataSource for SqlMapClient if not of type "
              + "ExtendedSqlMapClient: " + sqlMapClient);
    }
    ExtendedSqlMapClient extendedClient = (ExtendedSqlMapClient) sqlMapClient;
    transactionConfig.setMaximumConcurrentTransactions(extendedClient.getDelegate().getMaxTransactions());
    extendedClient.getDelegate().setTxManager(new TransactionManager(transactionConfig));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.