|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.sapjcosupport.SapJcoInterface
Abstract superclass for all SAP data access objects.
Field Summary | |
protected SapDataSource |
dataSource
|
protected int |
maxParallelCalls
|
Constructor Summary | |
SapJcoInterface()
|
Method Summary | |
protected void |
checkReturnStructure(com.sap.mw.jco.JCO.Function function)
|
protected void |
convertMap(com.sap.mw.jco.JCO.Table table,
Object entity,
SapStructureMapping sapStructureMapping,
Class persistentObject)
|
protected com.sap.mw.jco.JCO.Function |
getFunction(String name)
This method will resolve the FunctionTemplate for the given name. |
protected void |
mapOneField(Class entityDef,
Object entity,
com.sap.mw.jco.JCO.Record record,
SapFieldMapping sapFieldMapping)
|
protected void |
mapRecordToEntity(Class entityDef,
Object entity,
com.sap.mw.jco.JCO.Record record,
SapStructureMapping structureMapping)
|
Object |
performSapCall(SapMapping sapMapping,
Map input,
Class persistentObject,
String profile)
Actually calls a BAPI. |
protected List |
retrieve(Class persistentObject,
List inputMaps)
|
protected List |
retrieve(Class persistentObject,
List inputMaps,
String profile)
|
protected Object |
retrieve(Class persistentObject,
Map input)
|
protected Object |
retrieve(Class persistentObject,
Map input,
String profile)
Retrieves value objects of type persistentObject .
|
void |
setDataSource(SapDataSource source)
Sets the SAP data source this data access object is working on. |
void |
setMaxParallelCalls(int calls)
Sets the maximum number of parallel calls to SAP. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected SapDataSource dataSource
protected int maxParallelCalls
Constructor Detail |
public SapJcoInterface()
Method Detail |
public void setMaxParallelCalls(int calls)
calls
- maximum number of parallel SAP callspublic void setDataSource(SapDataSource source)
source
- SAP data sourceprotected com.sap.mw.jco.JCO.Function getFunction(String name)
This method NEVER returns null! An exception is thrown when the function can not be resolved.
name
- the name of the function to find
SapJcoMappingException
- when the requested function can not be found in the configured repositoriespublic Object performSapCall(SapMapping sapMapping, Map input, Class persistentObject, String profile)
protected List retrieve(Class persistentObject, List inputMaps)
protected List retrieve(Class persistentObject, List inputMaps, String profile)
protected Object retrieve(Class persistentObject, Map input)
protected Object retrieve(Class persistentObject, Map input, String profile)
persistentObject
.
The input
parameter specifies the input paramters that should be passed to SAP.
If the result of this call will be one value object, the entries in the Map will be mapped to SAP call import parameters.
If the result of this call is a List of value Objects, and a SAP input table is used rather than import parameters,
the Map contains a Collection as well. The key of this Collection is the same as the SAP input table.
This Collection can contain two types of values.
JCO.Table
row
JCO.Table
row.
Here is an example of the second situation: a Collection of Maps
.
Each map can contain a different number of field/value pairs to process.
Collection 0 - Map * DOCUMENT_NUMBER -> value 1 - Map * DOCUMENT_NUMBER -> value * DOCUMENT_TYPE -> value 2 - Map * MATERIAL -> value * DOCUMENT_NUMBER -> value * DOCUMENT_TYPE -> value etc.
persistentObject
- type of the value objectinput
- input mapprofile
- name to retrieve fields for
persistentObject
persistentObject
if the SAP call supports input/output tablesprotected void checkReturnStructure(com.sap.mw.jco.JCO.Function function) throws org.springframework.dao.DataRetrievalFailureException
org.springframework.dao.DataRetrievalFailureException
protected void mapRecordToEntity(Class entityDef, Object entity, com.sap.mw.jco.JCO.Record record, SapStructureMapping structureMapping)
protected void mapOneField(Class entityDef, Object entity, com.sap.mw.jco.JCO.Record record, SapFieldMapping sapFieldMapping)
protected void convertMap(com.sap.mw.jco.JCO.Table table, Object entity, SapStructureMapping sapStructureMapping, Class persistentObject)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |