net.mlw.vlh.adapter
Class AbstractValueListAdapter

java.lang.Object
  extended bynet.mlw.vlh.adapter.AbstractValueListAdapter
All Implemented Interfaces:
ValueListAdapter
Direct Known Subclasses:
AbstractJdbcAdapter, FileSystemAdapter, Hibernate20Adapter, HibernateAdapter, MappingSqlQueryAdapter

public abstract class AbstractValueListAdapter
extends Object
implements ValueListAdapter

Default abstract implementation of a ValueListAdapter.

Author:
mwilson

Field Summary
 
Fields inherited from interface net.mlw.vlh.ValueListAdapter
DO_FILTER, DO_FOCUS, DO_NOTHING, DO_PAGE, DO_SORT
 
Constructor Summary
AbstractValueListAdapter()
           
 
Method Summary
 int getAdapterType()
          This method tells the Service what still needs to be done on the Collection before returning the data.
 int getDefaultNumberPerPage()
          Gets the default number of entries per page.
 String getDefaultSortColumn()
           
 Integer getDefaultSortDirectionInteger()
          Gets the sort direction defined as the default.
 void setAdapterType(int adapterType)
          Sets the adatper type.
 void setDefaultNumberPerPage(int defaultNumberPerPage)
          Sets the default number of entries per page.
 void setDefaultSortColumn(String defaultSortColumn)
          Sets the default sortColumn if none is present in the filters.
 void setDefaultSortDirection(String defaultSortDirection)
          Sets the default sort directon is none is supplied in the Map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.mlw.vlh.ValueListAdapter
getValueList
 

Constructor Detail

AbstractValueListAdapter

public AbstractValueListAdapter()
Method Detail

getAdapterType

public int getAdapterType()
Description copied from interface: ValueListAdapter
This method tells the Service what still needs to be done on the Collection before returning the data.

Specified by:
getAdapterType in interface ValueListAdapter
Returns:
A bitwise or combination of DO_NOTHING, DO_SORT, DO_PAGE and DO_FILTER. For example:
           public int getAdapterType()
           {
             return DO_SORT | DO_PAGE;
           }
         
See Also:
ValueListAdapter.getAdapterType()

setAdapterType

public void setAdapterType(int adapterType)
Sets the adatper type.

See Also:
ValueListAdapter.getAdapterType()

setDefaultNumberPerPage

public void setDefaultNumberPerPage(int defaultNumberPerPage)
Sets the default number of entries per page.

Parameters:
defaultNumberPerPage - The default number of entries per page.

getDefaultNumberPerPage

public int getDefaultNumberPerPage()
Gets the default number of entries per page.

Returns:
Returns the defaultNumberPerPage.

setDefaultSortColumn

public void setDefaultSortColumn(String defaultSortColumn)
Sets the default sortColumn if none is present in the filters.

Parameters:
defaultSortColumn - The defaultSortColumn to set.

getDefaultSortColumn

public String getDefaultSortColumn()
Returns:
Returns the defaultSortColumn.

setDefaultSortDirection

public void setDefaultSortDirection(String defaultSortDirection)
Sets the default sort directon is none is supplied in the Map. Valid values: asc|desc

Parameters:
defaultSortDirection - The defaultSortDirection to set.

getDefaultSortDirectionInteger

public Integer getDefaultSortDirectionInteger()
Gets the sort direction defined as the default.

Returns:
Returns the defaultSortDirection.


Copyright © 2003-2006 mlavilson. All Rights Reserved.