org.equanda.ymport
Class DatabaseMapAdapter

java.lang.Object
  extended by org.equanda.ymport.DatabaseMapAdapter
All Implemented Interfaces:
DatabaseMap

public class DatabaseMapAdapter
extends Object
implements DatabaseMap

Adapter for DatabaseMap objects. Only needs initialisation of static variables.

Author:
Joachim Van der Auwera

Field Summary
protected static HashMap<String,FieldMap> FIELDS_MAP
          map object, for quick and easy retrieval of FieldMap
protected static HashMap<String,TableHandler> SELECTORS_MAP
          map object, for quick retrieval of selector TableHandler
protected static HashMap<String,TableHandler> TABLES_MAP
          map object, for quick and easy retrieval of TableHandler
 
Constructor Summary
DatabaseMapAdapter()
           
 
Method Summary
 FieldMap getFieldMap(String table)
          Get the FieldMap for a specific table
 TableHandler getSelector(String table)
          Get the handler for a specific selector which needs parameters.
 TableHandler getTableHandler(String table)
          Get the table handler for a specific table/selector combination
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TABLES_MAP

protected static final HashMap<String,TableHandler> TABLES_MAP
map object, for quick and easy retrieval of TableHandler


FIELDS_MAP

protected static final HashMap<String,FieldMap> FIELDS_MAP
map object, for quick and easy retrieval of FieldMap


SELECTORS_MAP

protected static final HashMap<String,TableHandler> SELECTORS_MAP
map object, for quick retrieval of selector TableHandler

Constructor Detail

DatabaseMapAdapter

public DatabaseMapAdapter()
Method Detail

getTableHandler

public TableHandler getTableHandler(String table)
                             throws ImportHandlerException
Get the table handler for a specific table/selector combination

Specified by:
getTableHandler in interface DatabaseMap
Parameters:
table - combination table/selector name
Returns:
TableHandler for table/selector combination
Throws:
ImportHandlerException

getFieldMap

public FieldMap getFieldMap(String table)
                     throws ImportHandlerException
Get the FieldMap for a specific table

Specified by:
getFieldMap in interface DatabaseMap
Parameters:
table - table name, may contain a selector in it
Returns:
a FieldMap object
Throws:
ImportHandlerException

getSelector

public TableHandler getSelector(String table)
                         throws ImportHandlerException
Get the handler for a specific selector which needs parameters. This only selects records.

Specified by:
getSelector in interface DatabaseMap
Parameters:
table - table name
Returns:
TableHandler for this
Throws:
ImportHandlerException


Copyright © 2007-2009. All Rights Reserved.