com.amazon.carbonado.repo.jdbc
Class JDBCStorableIntrospector

java.lang.Object
  extended by com.amazon.carbonado.info.StorableIntrospector
      extended by com.amazon.carbonado.repo.jdbc.JDBCStorableIntrospector

public class JDBCStorableIntrospector
extends StorableIntrospector

Provides additional metadata for a Storable type needed by JDBCRepository. The storable type must match to a table in an external database. All examined data is cached, so repeat examinations are fast, unless the examination failed.

Author:
Brian S O'Neill, Adam D Bradley, Tobias Holgers

Constructor Summary
JDBCStorableIntrospector()
           
 
Method Summary
static
<S extends Storable>
JDBCStorableInfo<S>
examine(Class<S> type, DataSource ds, String catalog, String schema)
          Examines the given class and returns a JDBCStorableInfo describing it.
 
Methods inherited from class com.amazon.carbonado.info.StorableIntrospector
examine, inferType, main
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDBCStorableIntrospector

public JDBCStorableIntrospector()
Method Detail

examine

public static <S extends Storable> JDBCStorableInfo<S> examine(Class<S> type,
                                                               DataSource ds,
                                                               String catalog,
                                                               String schema)
                                                    throws SQLException,
                                                           SupportException
Examines the given class and returns a JDBCStorableInfo describing it. A MalformedTypeException is thrown for a variety of reasons if the given class is not a well-defined Storable type or if it can't match up with an entity in the external database.

Parameters:
type - Storable type to examine
ds - source of JDBC connections to use for matching to a table
catalog - optional catalog to search
schema - optional schema to search
Throws:
MalformedTypeException - if Storable type is not well-formed
RepositoryException - if there was a problem in accessing the database
IllegalArgumentException - if type is null
SQLException
SupportException


Copyright © 2006-2009 Amazon Technologies, Inc.. All Rights Reserved.