org.mule.module.db.internal.domain.type
Class StaticDbTypeManager

java.lang.Object
  extended by org.mule.module.db.internal.domain.type.StaticDbTypeManager
All Implemented Interfaces:
DbTypeManager

public class StaticDbTypeManager
extends Object
implements DbTypeManager

Provides a way to statically resolve DbType using a predefined set of types.


Constructor Summary
StaticDbTypeManager(List<DbType> vendorTypes)
           
 
Method Summary
 DbType lookup(DbConnection connection, int id, String name)
          Finds a mapping for a given type ID and name
 DbType lookup(DbConnection connection, String name)
          Finds a mapping for a given type name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StaticDbTypeManager

public StaticDbTypeManager(List<DbType> vendorTypes)
Method Detail

lookup

public DbType lookup(DbConnection connection,
                     int id,
                     String name)
              throws UnknownDbTypeException
Description copied from interface: DbTypeManager
Finds a mapping for a given type ID and name

Specified by:
lookup in interface DbTypeManager
Parameters:
connection - connection used to connect to the database if required
id - type ID
name - type name
Returns:
a type that corresponds to the given ID and name
Throws:
UnknownDbTypeException - when there is no managed type with the given ID and name

lookup

public DbType lookup(DbConnection connection,
                     String name)
              throws UnknownDbTypeException
Description copied from interface: DbTypeManager
Finds a mapping for a given type name

Specified by:
lookup in interface DbTypeManager
Parameters:
connection - connection used to connect to the database if required
name - type name
Returns:
a type that corresponds to the given name
Throws:
UnknownDbTypeException - when there is no managed type with the given name


Copyright © 2003–2014 MuleSoft, Inc.. All rights reserved.