sf logo

sf.qof.mapping
Interface ParameterMapping

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 ParameterMapping
extends Mapping

Mapping interface for parameter mappings.


Method Summary
 MappingAdapter getAdapter()
          Returns a custom mapping adapter.
 Class<?> getBeanType()
          Returns the type of the method parameter Java Bean or null.
 Class<?> getCollectionType()
          Returns the collection type of the method parameter or null.
 Method getGetter()
          Returns the getter of the Java Bean or null.
 int getIndex()
          Returns the method parameter index.
 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.
 void setParameters(int index, Class<?> type, Class<?> collectionType, Class<?> beanType, Method getter, int[] sqlIndexes, String[] sqlColumns, MappingAdapter adapter, boolean usesArray)
          Initializer.
 boolean usesArray()
          True if the parameter is an array.
 boolean usesAtomic()
          True if the method parameter is either a primitive or an atomic value (like String).
 boolean usesCollection()
          True if the method parameter is a collection type.
 
Methods inherited from interface sf.qof.mapping.Mapping
accept, parameterMappingInfo, resultMappingInfo
 

Method Detail

setParameters

void setParameters(int index,
                   Class<?> type,
                   Class<?> collectionType,
                   Class<?> beanType,
                   Method getter,
                   int[] sqlIndexes,
                   String[] sqlColumns,
                   MappingAdapter adapter,
                   boolean usesArray)
Initializer.

Parameters:
index - method parameter index
type - mapping type
collectionType - collection type of method parameter
beanType - Java Bean object type of method parameter
getter - getter form Java Bean object
sqlIndexes - array of SQL indexes
sqlColumns - array of SQL column names
adapter - custom mapping adapter
usesArray - parameter is an array

getIndex

int getIndex()
Returns the method parameter index.

Returns:
method parameter index

getType

Class<?> getType()
Returns mapping type.

Returns:
mapping type

getCollectionType

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

Returns:
collection type of the method parameter

getBeanType

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

Returns:
bean type

getGetter

Method getGetter()
Returns the getter of the Java Bean or null.

Returns:
getter

getSqlColumns

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

Returns:
array of SQL column 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 parameter is a collection type.

Returns:
uses collection type

usesAtomic

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

Returns:
uses an atomic value

usesArray

boolean usesArray()
True if the parameter is an array.

Returns:
uses an array

sf logo

Copyright © 2007 brunella ltd. All Rights Reserved.