com.softwareag.centrasite.appl.framework.persistence.mapper.slots
Interface SlotHandler

All Known Implementing Classes:
AbstractSlotHandler, BooleanSlotHandler, CalendarSlotHandler, CustomDateSlotHandler, DateSlotHandler, EnumSlotHandler, IntegerSlotHandler, LongSlotHandler, StringSlotHandler, TimestampSlotHandler

public interface SlotHandler

Interface of a handler for slot values.


Method Summary
 java.lang.String getQueryFunction(java.lang.Object value, Property property)
          Wraps the result of the toString(Object) in a proper Query Type.This method may only be invoked, if isHandling(Class, Slot) was invoked with the result objects class and returned true.
 boolean isHandling(java.lang.Class<?> pClass, Slot property)
          Returns, whether the slot handler can handle the given Java class.
 java.lang.Object toObject(java.lang.Class<?> pClass, java.lang.String pValue)
          Converts a string into an object.
 java.lang.String toString(java.lang.Object pValue)
          Converts the given object into a string.
 

Method Detail

isHandling

boolean isHandling(java.lang.Class<?> pClass,
                   Slot property)
Returns, whether the slot handler can handle the given Java class.

Parameters:
property -

toString

java.lang.String toString(java.lang.Object pValue)
Converts the given object into a string. This method may only be called, if isHandling(Class, Slot) was invoked with the objects class and returned true.


toObject

java.lang.Object toObject(java.lang.Class<?> pClass,
                          java.lang.String pValue)
Converts a string into an object. This method may only be invoked, if isHandling(Class, Slot) was invoked with the result objects class and returned true.

Parameters:
pClass - The target class
pValue - The value to convert.
Throws:
java.lang.IllegalArgumentException - The value could not be parsed.

getQueryFunction

java.lang.String getQueryFunction(java.lang.Object value,
                                  Property property)
Wraps the result of the toString(Object) in a proper Query Type.This method may only be invoked, if isHandling(Class, Slot) was invoked with the result objects class and returned true.

Parameters:
value -
property - TODO
Returns:
String