org.richfaces.model.internal

## Class ComponentSortableDataModel

- java.lang.Object
- - javax.faces.model.DataModel
  - - org.ajax4jsf.model.ExtendedDataModel
    - - org.richfaces.model.ScrollableTableDataModel<java.lang.Object>
      - - org.richfaces.model.internal.ComponentSortableDataModel

-     public class ComponentSortableDataModel
      extends org.richfaces.model.ScrollableTableDataModel<java.lang.Object>

  Author:
    Maksim Kaszynski

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.richfaces.model.ScrollableTableDataModel

      `org.richfaces.model.ScrollableTableDataModel.SimpleRowKey`

  - ### Field Summary

    - ### Fields inherited from class org.richfaces.model.ScrollableTableDataModel

      `lastSortOrder`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ComponentSortableDataModel(java.lang.String var, java.lang.Object value, org.richfaces.model.SortOrder sortOrder)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getRowCount()`
    `java.lang.Object` | `getWrappedData()`
    `java.util.List` | `loadData(int startRow, int endRow, org.richfaces.model.SortOrder sortOrder)`
    `protected java.util.List` | `prepareCollection(javax.faces.context.FacesContext context, java.util.List collection, org.richfaces.model.SortOrder sortOrder)` Wrap every list element with reflective sorting object, perform sorting, and then unwrap.
    `void` | `setWrappedData(java.lang.Object value)`

    - ### Methods inherited from class org.richfaces.model.ScrollableTableDataModel

      `getId, getObjectById, getRowData, getRowIndex, getRowKey, isRowAvailable, setRowIndex, setRowKey, walk`

    - ### Methods inherited from class org.ajax4jsf.model.ExtendedDataModel

      `getSerializableModel`

    - ### Methods inherited from class javax.faces.model.DataModel

      `addDataModelListener, getDataModelListeners, removeDataModelListener`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ComponentSortableDataModel

          public ComponentSortableDataModel(java.lang.String var,
                                    java.lang.Object value,
                                    org.richfaces.model.SortOrder sortOrder)

  - ### Method Detail

    - #### prepareCollection

          protected java.util.List prepareCollection(javax.faces.context.FacesContext context,
                                         java.util.List collection,
                                         org.richfaces.model.SortOrder sortOrder)

      Wrap every list element with reflective sorting object, perform sorting, and then unwrap.
      Parameters:
        `context` -
        `collection` -
        `sortOrder` -
      Returns:

    - #### loadData

          public java.util.List loadData(int startRow,
                                int endRow,
                                org.richfaces.model.SortOrder sortOrder)

      Specified by:
        `loadData` in class `org.richfaces.model.ScrollableTableDataModel<java.lang.Object>`

    - #### getRowCount

          public int getRowCount()

      Specified by:
        `getRowCount` in class `javax.faces.model.DataModel`

    - #### getWrappedData

          public java.lang.Object getWrappedData()

      Specified by:
        `getWrappedData` in class `javax.faces.model.DataModel`

    - #### setWrappedData

          public void setWrappedData(java.lang.Object value)

      Specified by:
        `setWrappedData` in class `javax.faces.model.DataModel`

Copyright © 2013. All Rights Reserved.