net.mlw.vlh.adapter.util
Interface ObjectWrapper


public interface ObjectWrapper

This class is used in net.mlw.vlh.adapter.jdbc.objectWrapper.DefaultWrapperAdapter Using this wrapper you can replace record in valuelist with your record. Normally you select only ids and valulist is populated with the wrapped objects, that has selected id.

  • Using wrappers is recommended in cases, when your hibernate hql is too complex, and you cannot controll all composite joins. Then you would appreciate jdbc with the cunjuction of wrappers that allow you to call third party managers, that return you wanted object.
  • To pass additional parameters to the object wrapper, adapter will always set actuall ValueListInfo before calling getWrappedRecord method.

    The ObjectToBeWrapped is determined in adapter. It this time it could be a ResultSet or one column of the record.

    Version:
    $Revision: 1.4 $ $Date: 2005/04/01 09:15:22 $
    Author:
    Andrej Zachar
    See Also:
    DefaultWrapperAdapter.setWrapper(ObjectWrapper), DefaultWrapperAdapter, ObjectValidator

    Method Summary
     Object getWrappedRecord(Object objectToBeWrapped)
              This method wrap passed record,the type of this record you can specify in adpater's settings.
     void setValueListInfo(ValueListInfo info)
               
     

    Method Detail

    getWrappedRecord

    public Object getWrappedRecord(Object objectToBeWrapped)
    This method wrap passed record,the type of this record you can specify in adpater's settings. Default adapter that use this interface is net.mlw.vlh.adapter.jdbc.objectWrapper.DefaultWrapperAdapter

    Parameters:
    objectToBeWrapped - represent original object
      It could be a
    1. whole ResultSet
    2. or
    3. one column of the record from the ResultSet.
    Returns:
    object that represent the final "substituted" record in your valuelist.
    See Also:
    DefaultWrapperAdapter.setWrapResultSet(boolean)

    setValueListInfo

    public void setValueListInfo(ValueListInfo info)
    Parameters:
    info - ValueListInfo used to pass additional parameter to the wrapper from your controler.


    Copyright © 2003-2006 mlavilson. All Rights Reserved.