com.ibatis.db.sqlmap
Class ResultMap

java.lang.Object
  extended bycom.ibatis.db.sqlmap.ResultMap

public class ResultMap
extends java.lang.Object

The ResultMap object is used to map the results of an SQL statement to a bean or collection of beans.

Author:
clinton_begin

Field Summary
private  java.lang.String className
           
private  java.util.List mappedPropertyNames
           
private  java.util.Map mappings
           
private  java.lang.String name
           
static int UNKNOWN_COLUMN_INDEX
           
 
Constructor Summary
ResultMap()
          Default constructor
 
Method Summary
 void addResultMapping(ResultMapping mapping)
          Adds a result mapping to this result map.
 java.lang.String getClassName()
          Getter for the className property
 java.util.Iterator getMappedPropertyNames()
          Returns an iterator that provides acces to all of the names of the mapped properties
 java.lang.String getName()
          Getter for the name property
 ResultMapping getResultMapping(java.lang.String propertyName)
          Returns a result mapping for the provided property name.
 void setClassName(java.lang.String className)
          Setter for the className property
 void setName(java.lang.String name)
          Setter for the name property
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNKNOWN_COLUMN_INDEX

public static final int UNKNOWN_COLUMN_INDEX
See Also:
Constant Field Values

name

private java.lang.String name

className

private java.lang.String className

mappings

private java.util.Map mappings

mappedPropertyNames

private java.util.List mappedPropertyNames
Constructor Detail

ResultMap

public ResultMap()
Default constructor

Method Detail

getName

public java.lang.String getName()
Getter for the name property

Returns:
The name of the ResultMap object

setName

public void setName(java.lang.String name)
Setter for the name property

Parameters:
name - The new name of the object

getClassName

public java.lang.String getClassName()
Getter for the className property

Returns:
The name of the class of objects that this object maps data into

setClassName

public void setClassName(java.lang.String className)
Setter for the className property

Parameters:
className - The new name of the class to map data into

addResultMapping

public void addResultMapping(ResultMapping mapping)
Adds a result mapping to this result map.

Parameters:
mapping - The mapping to add.

getResultMapping

public ResultMapping getResultMapping(java.lang.String propertyName)
Returns a result mapping for the provided property name.

Parameters:
propertyName - The property name for which to look up the result mapping
Returns:
The result mapping for the provided property name

getMappedPropertyNames

public java.util.Iterator getMappedPropertyNames()
Returns an iterator that provides acces to all of the names of the mapped properties

Returns:
The iterator