org.hibersap.mapping.model
Class ParameterMapping

java.lang.Object
  extended by org.hibersap.mapping.model.ParameterMapping
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
FieldMapping, StructureMapping, TableMapping

public abstract class ParameterMapping
extends Object
implements Serializable

Author:
Carsten Erker
See Also:
Serialized Form

Nested Class Summary
static class ParameterMapping.ParamType
           
 
Constructor Summary
ParameterMapping(Class<?> associatedType, String sapName, String javaName, Class<? extends Converter> converterClass)
           
 
Method Summary
 boolean equals(Object o)
           
 Class<?> getAssociatedType()
           
protected  Object getConvertedValueToJava(Object value, ConverterCache converterCache)
           
protected  Object getConvertedValueToSap(Object value, ConverterCache converterCache)
           
 Class<? extends Converter> getConverterClass()
           
 String getJavaName()
           
abstract  ParameterMapping.ParamType getParamType()
           
 String getSapName()
           
protected abstract  Object getUnconvertedValueToJava(Object value, ConverterCache converterCache)
           
protected abstract  Object getUnconvertedValueToSap(Object value, ConverterCache converterCache)
           
 boolean hasConverter()
           
 int hashCode()
           
 Object mapToJava(Object fieldMap, ConverterCache converterCache)
           
 Object mapToSap(Object value, ConverterCache converterCache)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParameterMapping

public ParameterMapping(Class<?> associatedType,
                        String sapName,
                        String javaName,
                        Class<? extends Converter> converterClass)
Method Detail

getAssociatedType

public Class<?> getAssociatedType()

getJavaName

public String getJavaName()

getParamType

public abstract ParameterMapping.ParamType getParamType()

getConverterClass

public Class<? extends Converter> getConverterClass()

hasConverter

public boolean hasConverter()

getConvertedValueToJava

protected final Object getConvertedValueToJava(Object value,
                                               ConverterCache converterCache)

getConvertedValueToSap

protected final Object getConvertedValueToSap(Object value,
                                              ConverterCache converterCache)

getUnconvertedValueToJava

protected abstract Object getUnconvertedValueToJava(Object value,
                                                    ConverterCache converterCache)

getUnconvertedValueToSap

protected abstract Object getUnconvertedValueToSap(Object value,
                                                   ConverterCache converterCache)

mapToJava

public final Object mapToJava(Object fieldMap,
                              ConverterCache converterCache)

mapToSap

public Object mapToSap(Object value,
                       ConverterCache converterCache)
Parameters:
value - A plain value if the parameter is a simple one, a bapi structure instance if the parameter is a structure, a list of bapi structure instances if the parameter is a table.
converterCache - Needed for conversion of parameters
Returns:
A plain value if the parameter is a simple one, a Map (SAP structure parameter name to plain values) if the parameter is a structure, a List of Maps (SAP structure parameter name to plain values) if the parameter is a table.

getSapName

public String getSapName()

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2012 akquinet tech@spree GmbH. All Rights Reserved.