ca.sqlpower.wabit.dao.session
Class SessionPersisterSuperConverter

java.lang.Object
  extended by ca.sqlpower.wabit.dao.session.SessionPersisterSuperConverter

public class SessionPersisterSuperConverter
extends java.lang.Object

Converts any known object in Wabit into a simple type of object that can be pushed through an HTTP request and persisted on the server. This also contains a way to get the object back based on the simple type that can be passed and stored.


Constructor Summary
SessionPersisterSuperConverter(WabitSession session, WabitObject root)
          This converter will allow changes between any complex object in the session's workspace and a simple type that can be passed between persisters.
 
Method Summary
 java.lang.Object convertToBasicType(java.lang.Object convertFrom, java.lang.Object... additionalInfo)
          Converts a complex object to a basic type or reference value that can then be passed on to other persisters.
 java.lang.Object convertToComplexType(java.lang.Object o, java.lang.Class<? extends java.lang.Object> type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SessionPersisterSuperConverter

public SessionPersisterSuperConverter(WabitSession session,
                                      WabitObject root)
This converter will allow changes between any complex object in the session's workspace and a simple type that can be passed between persisters.

Parameters:
session - The session used to find necessary parts for converting between simple and complex types. The session may be used to look up connections, cubes, and WabitObjects in the workspace.
Method Detail

convertToBasicType

public java.lang.Object convertToBasicType(java.lang.Object convertFrom,
                                           java.lang.Object... additionalInfo)
Converts a complex object to a basic type or reference value that can then be passed on to other persisters. To reverse this process see convertToComplexType(java.lang.Object, java.lang.Class). If a basic object is given to this method it will be returned without modification.

Parameters:
convertFrom - The value to convert to a basic type
fromType - the type that the basic type will be defined as
additionalInfo - any additional information that is required by the converters for specific object types. The ONLY class that currently requires an additional type is the cube converter. If we can remove the need to pass the data source type with the cube then this value can go away.

convertToComplexType

public java.lang.Object convertToComplexType(java.lang.Object o,
                                             java.lang.Class<? extends java.lang.Object> type)


Copyright © 2009. All Rights Reserved.