sf logo

sf.qof.mapping
Interface ResultMapping

All Superinterfaces:
Mapping
All Known Implementing Classes:
AbstractBaseMapping, AbstractCharacterMapping, AbstractCharacterMapping.CharacterMapping, AbstractCharacterMapping.StringMapping, AbstractDateTimeMapping, AbstractDateTimeMapping.DateMapping, AbstractDateTimeMapping.TimeMapping, AbstractDateTimeMapping.TimestampMapping, AbstractNumberMapping, AbstractNumberMapping.BooleanMapping, AbstractNumberMapping.ByteMapping, AbstractNumberMapping.DoubleMapping, AbstractNumberMapping.FloatMapping, AbstractNumberMapping.IntegerMapping, AbstractNumberMapping.LongMapping, AbstractNumberMapping.ShortMapping, AdapterMapping

public interface ResultMapping
extends Mapping

Mapping interface for result mappings.


Method Summary
 MappingAdapter getAdapter()
          Returns a custom mapping adapter.
 Class<?> getBeanType()
          Returns the type of the method return result Java Bean or null.
 Class<?> getCollectionType()
          Returns the collection type of the method return result or null.
 Constructor<?> getConstructor()
          Returns the constructor or null.
 Integer getConstructorParameter()
          Returns the index of a parameter in the constructor or null.
 Class<?> getMapKeyType()
          Returns the type of the method return map key or null.
 Method getSetter()
          Returns the setter of the Java Bean or null.
 String[] getSqlColumns()
          Returns an array with the column names in the SQL statement.
 int[] getSqlIndexes()
          Returns an array with the indexes in the SQL statement.
 Class<?> getType()
          Returns mapping type.
 boolean isMapKey()
          True if mapping is a key for a Map.
 void setParameters(Class<?> type, Class<?> collectionType, Class<?> beanType, Method setter, int[] sqlIndexes, String[] sqlColumns, MappingAdapter adapter, Class<?> mapKeyType, Integer constructorParameter, Constructor<?> constructor)
          Initializer.
 boolean usesAtomic()
          True if the method return result is either a primitive or an atomic value (like String).
 boolean usesCollection()
          True if the method return result is a collection type.
 
Methods inherited from interface sf.qof.mapping.Mapping
accept, parameterMappingInfo, resultMappingInfo
 

Method Detail

setParameters

void setParameters(Class<?> type,
                   Class<?> collectionType,
                   Class<?> beanType,
                   Method setter,
                   int[] sqlIndexes,
                   String[] sqlColumns,
                   MappingAdapter adapter,
                   Class<?> mapKeyType,
                   Integer constructorParameter,
                   Constructor<?> constructor)
Initializer.

Parameters:
type - mapping type
collectionType - collection type of method return result
beanType - Java Bean object type of method return result
setter - setter form Java Bean object
sqlIndexes - array of SQL indexes
sqlColumns - array of SQL column names
adapter - custom mapping adapter
mapKeyType - map key type
constructorParameter - index of a parameter in the constructor
constructor - constructor

getType

Class<?> getType()
Returns mapping type.

Returns:
mapping type

getCollectionType

Class<?> getCollectionType()
Returns the collection type of the method return result or null. This needs to implement Collection.

Returns:
collection type of the method return result

getBeanType

Class<?> getBeanType()
Returns the type of the method return result Java Bean or null.

Returns:
bean type

getSetter

Method getSetter()
Returns the setter of the Java Bean or null.

Returns:
setter

getSqlColumns

String[] getSqlColumns()
Returns an array with the column names in the SQL statement.

Returns:
array of SQL colum names

getSqlIndexes

int[] getSqlIndexes()
Returns an array with the indexes in the SQL statement.

Returns:
array of SQL indexes

getAdapter

MappingAdapter getAdapter()
Returns a custom mapping adapter.

Returns:
mapping adapter

usesCollection

boolean usesCollection()
True if the method return result is a collection type.

Returns:
uses collection type

usesAtomic

boolean usesAtomic()
True if the method return result is either a primitive or an atomic value (like String).

Returns:
uses an atomic value

isMapKey

boolean isMapKey()
True if mapping is a key for a Map.

Returns:
is a map key

getMapKeyType

Class<?> getMapKeyType()
Returns the type of the method return map key or null.

Returns:
map key type

getConstructorParameter

Integer getConstructorParameter()
Returns the index of a parameter in the constructor or null.

Returns:
constructor parameter index

getConstructor

Constructor<?> getConstructor()
Returns the constructor or null.

Returns:
constructor

sf logo

Copyright © 2007 brunella ltd. All Rights Reserved.