public void bindSubMaps() { if (subMaps != null) { Iterator keys = subMaps.keySet().iterator(); while (keys.hasNext()) { Object key = keys.next(); Object id = subMaps.get(key); if(id instanceof String) { subMaps.put(key, delegate.getResultMap((String)id)); } } } }
private void bindResultMapDiscriminators() { // Bind discriminators Iterator names = delegate.getResultMapNames(); while (names.hasNext()) { String name = (String) names.next(); ResultMap rm = delegate.getResultMap(name); Discriminator disc = rm.getDiscriminator(); if (disc != null) { disc.bindSubMaps(); } } }
public void bindSubMaps() { if (subMaps != null) { Iterator keys = subMaps.keySet().iterator(); while (keys.hasNext()) { Object key = keys.next(); Object id = subMaps.get(key); if(id instanceof String) { subMaps.put(key, delegate.getResultMap((String)id)); } } } }
private void bindResultMapDiscriminators() { // Bind discriminators Iterator names = delegate.getResultMapNames(); while (names.hasNext()) { String name = (String) names.next(); ResultMap rm = delegate.getResultMap(name); Discriminator disc = rm.getDiscriminator(); if (disc != null) { disc.bindSubMaps(); } } }
errorContext.setMoreInfo("Check the extended result map."); if (extendsResultMap != null) { ResultMap extendedResultMap = (ResultMap) client.getDelegate().getResultMap(extendsResultMap); ResultMapping[] resultMappings = extendedResultMap.getResultMappings(); for (int i = 0; i < resultMappings.length; i++) {
errorContext.setMoreInfo("Check the extended result map."); if (extendsResultMap != null) { ResultMap extendedResultMap = (ResultMap) client.getDelegate().getResultMap(extendsResultMap); ResultMapping[] resultMappings = extendedResultMap.getResultMappings(); for (int i = 0; i < resultMappings.length; i++) {
private void retrieveOutputParameters(StatementScope statementScope, CallableStatement cs, ParameterMapping[] mappings, Object[] parameters, RowHandlerCallback callback) throws SQLException { for (int i = 0; i < mappings.length; i++) { ParameterMapping mapping = ((ParameterMapping) mappings[i]); if (mapping.isOutputAllowed()) { if ("java.sql.ResultSet".equalsIgnoreCase(mapping.getJavaTypeName())) { ResultSet rs = (ResultSet) cs.getObject(i + 1); ResultMap resultMap; if (mapping.getResultMapName() == null) { resultMap = statementScope.getResultMap(); handleOutputParameterResults(statementScope, resultMap, rs, callback); } else { SqlMapClientImpl client = (SqlMapClientImpl) statementScope.getSession().getSqlMapClient(); resultMap = client.getDelegate().getResultMap(mapping.getResultMapName()); DefaultRowHandler rowHandler = new DefaultRowHandler(); RowHandlerCallback handlerCallback = new RowHandlerCallback(resultMap, null, rowHandler); handleOutputParameterResults(statementScope, resultMap, rs, handlerCallback); parameters[i] = rowHandler.getList(); } rs.close(); } else { parameters[i] = mapping.getTypeHandler().getResult(cs, i + 1); } } } }
private void retrieveOutputParameters(StatementScope statementScope, CallableStatement cs, ParameterMapping[] mappings, Object[] parameters, RowHandlerCallback callback) throws SQLException { for (int i = 0; i < mappings.length; i++) { ParameterMapping mapping = ((ParameterMapping) mappings[i]); if (mapping.isOutputAllowed()) { if ("java.sql.ResultSet".equalsIgnoreCase(mapping.getJavaTypeName())) { ResultSet rs = (ResultSet) cs.getObject(i + 1); ResultMap resultMap; if (mapping.getResultMapName() == null) { resultMap = statementScope.getResultMap(); handleOutputParameterResults(statementScope, resultMap, rs, callback); } else { SqlMapClientImpl client = (SqlMapClientImpl) statementScope.getSession().getSqlMapClient(); resultMap = client.getDelegate().getResultMap(mapping.getResultMapName()); DefaultRowHandler rowHandler = new DefaultRowHandler(); RowHandlerCallback handlerCallback = new RowHandlerCallback(resultMap, null, rowHandler); handleOutputParameterResults(statementScope, resultMap, rs, handlerCallback); parameters[i] = rowHandler.getList(); } rs.close(); } else { parameters[i] = mapping.getTypeHandler().getResult(cs, i + 1); } } } }
ResultMap resultMap = getDelegate().getResultMap(resultMapName);
ResultMap resultMap = getDelegate().getResultMap(resultMapName);
errorContext.setMoreInfo("Check the result map name."); if (resultMapName != null) { statement.setResultMap(client.getDelegate().getResultMap(resultMapName)); if (additionalResultMapNames != null) { for (int i = 0; i < additionalResultMapNames.length; i++) { statement.addResultMap(client.getDelegate().getResultMap(additionalResultMapNames[i]));
errorContext.setMoreInfo("Check the result map name."); if (resultMapName != null) { statement.setResultMap(client.getDelegate().getResultMap(resultMapName)); if (additionalResultMapNames != null) { for (int i = 0; i < additionalResultMapNames.length; i++) { statement.addResultMap(client.getDelegate().getResultMap(additionalResultMapNames[i]));