com.aspose.words
Class ResultSetHashMap

java.util.HashMap
    extended by com.aspose.words.ResultSetHashMap

public class ResultSetHashMap 
extends java.util.HashMap

Used by MailMerge.executeWithRegions(com.aspose.words.ResultSetHashMap) to perform mail merge with regions.

MailMerge.executeWithRegions(com.aspose.words.ResultSetHashMap) used instead of MailMerge.executeWithRegions(java.sql.ResultSet[]) in cases when ResultSets can't correctly return its table names or when table names don't match mail merge region names but that names can't be changed.

In fact ResultSetHashMap is just a HashMap<String, ResultSet> and this class is introduced only for compatibility with JDK 1.4.


Constructor Summary
ResultSetHashMap()
           Constructs an empty ResultSetHashMap with the default initial capacity (16).
ResultSetHashMap(int initialCapacity)
           Constructs an empty ResultSetHashMap with the specified initial capacity.
 
Method Summary
java.sql.ResultSetgetByTableName(java.lang.String tableName)
           Gets a table (ResultSet) from the ResultSetHashMap using table name as a key.
java.sql.ResultSetput(java.lang.String tableName, java.sql.ResultSet table)
           Puts tableName-table pair into the ResultSetHashMap.
 

Constructor Detail

ResultSetHashMap

public ResultSetHashMap()
Constructs an empty ResultSetHashMap with the default initial capacity (16).

ResultSetHashMap

public ResultSetHashMap(int initialCapacity)
Constructs an empty ResultSetHashMap with the specified initial capacity.

Method Detail

put

public java.sql.ResultSet put(java.lang.String tableName, java.sql.ResultSet table)
Puts tableName-table pair into the ResultSetHashMap.

If the map previously contained a mapping for this tableName, the old table is replaced.

Parameters:
tableName - table name to be associated with the specified ResultSet.
table - ResultSet to be associated with the specified tableName.
Returns:
previous ResultSet associated with specified tableName, or null if there was no mapping for tableName. A null return can also indicate that the HashMap previously associated null with the specified tableName.

getByTableName

public java.sql.ResultSet getByTableName(java.lang.String tableName)
Gets a table (ResultSet) from the ResultSetHashMap using table name as a key.
Parameters:
tableName - table name associated with the ResultSet.
Returns:
ResultSet associated with specified tableName, or null if there was no mapping for tableName. A null return can also indicate that the HashMap previously associated null with the specified tableName.

See Also:
          Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
          Aspose.Words Support Forum - our preferred method of support.