com.ibatis.sqlmap.engine.mapping.result
Class ResultObjectFactoryUtil

java.lang.Object
  extended bycom.ibatis.sqlmap.engine.mapping.result.ResultObjectFactoryUtil

public class ResultObjectFactoryUtil
extends java.lang.Object

Author:
Jeff Butler

Method Summary
static java.lang.Object createObjectThroughFactory(ResultObjectFactory factory, java.lang.String statementId, java.lang.Class clazz)
          Algorithm: If factory is null, then create object internally() Otherwise try to create object through factory If null returned from factory, then create object internally This allows the factory to selectively create objects, also allows for the common possibility that a factory is not configured.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createObjectThroughFactory

public static java.lang.Object createObjectThroughFactory(ResultObjectFactory factory,
                                                          java.lang.String statementId,
                                                          java.lang.Class clazz)
                                                   throws java.lang.InstantiationException,
                                                          java.lang.IllegalAccessException
Algorithm: This allows the factory to selectively create objects, also allows for the common possibility that a factory is not configured.

Parameters:
factory - the factory to use. May be null!
statementId - the ID of the statement that generated the call to this method
clazz - the type of object to create
Returns:
a new instance of the specified class. The instance must be castable to the specified class.
Throws:
java.lang.InstantiationException - if the instance cannot be created. If you throw this Exception, iBATIS will throw a runtime exception in response and will end.
java.lang.IllegalAccessException - if the constructor cannot be accessed. If you throw this Exception, iBATIS will throw a runtime exception in response and will end.