org.lsc.service
Class AbstractJdbcService

java.lang.Object
  extended by org.lsc.service.AbstractJdbcService
All Implemented Interfaces:
ISrcService
Direct Known Subclasses:
SimpleJdbcSrcService

public abstract class AbstractJdbcService
extends Object
implements ISrcService

Generic JDBC iBatis Service Manage retrieving of list and object according t Can be override by a specific implementation in the final class if needed : Get a look at org.lsc.service.StructureJdbcService class

Author:
Sebastien Bahloul

Constructor Summary
AbstractJdbcService()
           
 
Method Summary
 IBean getBean(IBean nonUsed, Map.Entry<String,LscAttributes> ids)
          The simple object getter according to its identifier.
 Map<String,LscAttributes> getListPivots()
          Execute a database request to get a list of object identifiers.
abstract  String getRequestNameForList()
           
abstract  String getRequestNameForObject()
           
 void setCallback(DataSchemaProvider cb)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractJdbcService

public AbstractJdbcService()
Method Detail

getRequestNameForList

public abstract String getRequestNameForList()

getRequestNameForObject

public abstract String getRequestNameForObject()

setCallback

public void setCallback(DataSchemaProvider cb)

getBean

public IBean getBean(IBean nonUsed,
                     Map.Entry<String,LscAttributes> ids)
              throws NamingException
Description copied from interface: ISrcService
The simple object getter according to its identifier.

Specified by:
getBean in interface ISrcService
Parameters:
nonUsed - Base object to fill
ids - The data identifier in the source such as returned by getListPivots(). It must identify a unique entry in the source.
Returns:
The bean, or null if not found
Throws:
NamingException - May throw a NamingException if the object is not found in the directory, or if more than one object would be returned.

getListPivots

public Map<String,LscAttributes> getListPivots()
Execute a database request to get a list of object identifiers. This request must be a very simple and efficient request because it will get all the requested identifiers.

Specified by:
getListPivots in interface ISrcService
Returns:
Map of DNs of all entries that are returned by the directory with an associated map of attribute names and values (never null)


Copyright © 2005-2010 LSC project. All Rights Reserved.