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

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

public class CompositeDbTypeManager
extends Object
implements DbTypeManager

Uses DbTypeManager instances to manage DB types


Constructor Summary
CompositeDbTypeManager(List<DbTypeManager> typeManagers)
          Creates a composed DB type manager
 
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 using each composed DbTypeManager until a type is found or there are no more managers to use.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompositeDbTypeManager

public CompositeDbTypeManager(List<DbTypeManager> typeManagers)
Creates a composed DB type manager

Parameters:
typeManagers - sorted type managers used to resolve DB types.
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
Finds a mapping for a given type name using each composed DbTypeManager until a type is found or there are no more managers to use.

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 ID and name


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