com.edustructures.sifworks.tools.mapping
Interface FieldAdaptor

All Known Implementing Classes:
ObjectMapAdaptor, StringMapAdaptor

public interface FieldAdaptor

An interface definition of a class that can be used to get or set values for fields during a Mapping operation.

Version:
2.0

Method Summary
 SIFSimpleType getSIFValue(java.lang.String fieldName, SIFTypeConverter typeConverter, FieldMapping mapping)
          Gets a value from the underlying data store to be used in an outbound field mapping operation
 java.lang.Object getValue(java.lang.String key)
          Returns the underlying value being stored for the field.
 boolean hasField(java.lang.String fieldName)
          Returns whether the field being requested for mapping has a value that can be mapped to SIF
 void setSIFValue(java.lang.String fieldName, SIFSimpleType value, FieldMapping mapping)
          Sets a value that has been retrieved from a SIF Element in an inbound field mapping operation.
 

Method Detail

hasField

boolean hasField(java.lang.String fieldName)
Returns whether the field being requested for mapping has a value that can be mapped to SIF

Parameters:
fieldName - The field name being mapped to SIF
Returns:
True if there is a value for the specified field that should be mapped to SIF

setSIFValue

void setSIFValue(java.lang.String fieldName,
                 SIFSimpleType value,
                 FieldMapping mapping)
Sets a value that has been retrieved from a SIF Element in an inbound field mapping operation.

Parameters:
fieldName - The field name that is mapped to a SIFElement
value - The value of the SIF element
mapping - The FieldMappings that will be used to set this value or null

getSIFValue

SIFSimpleType getSIFValue(java.lang.String fieldName,
                          SIFTypeConverter typeConverter,
                          FieldMapping mapping)
Gets a value from the underlying data store to be used in an outbound field mapping operation

Parameters:
fieldName - The field name that is mapped to a SIFElement
typeConverter - The converter class for the requested SIF data type
mapping - The FieldMapping this value was generated from or null
Returns:
The value to set to the SIF element. This value must contain the SIFSimpleType subclass represented by the SIFTypeConverter passed in to the method.

getValue

java.lang.Object getValue(java.lang.String key)
Returns the underlying value being stored for the field.

This method is not called during Mappings operations. It may be called by classes such as the ValueBuilder class

Parameters:
key - The field name to retrieve
Returns:
The underlying data object representing the field.


Copyright © 2001-2007 Edustructures LLC. All Rights Reserved. SIFWorks® and ADK® are registered trademarks of Edustructures LLC. SIF™ and Schools Interoperability Framework are trademarks of the Schools Interoperability Framework Association.