org.eclnt.jsfserver.util.fixgridpersistence

## Class DefaultFIXGRIDPersistence

- java.lang.Object
- - org.eclnt.jsfserver.util.fixgridpersistence.DefaultFIXGRIDPersistence

- All Implemented Interfaces:
    IFIXGRIDPersistence2

      public class DefaultFIXGRIDPersistence
      extends java.lang.Object
      implements IFIXGRIDPersistence2

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultFIXGRIDPersistence()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static IFIXGRIDPersistence.PersistentInfo` | `applyPersistentInfoFromGridInfo(FIXGRIDBinding gridBinding, GridInfo gi)`
    `static GridInfo` | `createGridInfo(FIXGRIDBinding gridBinding, IFIXGRIDPersistence.PersistentInfo persistentInfo)` Creates a serialize-able `GridInfo`-object that can be simply persisted by JAXB serialization.
    `static void` | `initStoreSortInfo(boolean value)` You can define if the sort status of the grid should be stored and re-applied as well.
    `protected GridInfo` | `readGridInfo(FacesContext context, FIXGRIDBinding gridBinding, java.lang.String pageName, java.lang.String persistId)` The persistent info is kept in the database as instance of "GridInfo".
    `IFIXGRIDPersistence.PersistentInfo` | `readPersistentInfo(FacesContext context, FIXGRIDBinding gridBinding, java.lang.String pageName, java.lang.String persistId)` Reads and applies persistent info for grid.
    `protected java.lang.String` | `readSerializedPersistentInfo(FacesContext context, FIXGRIDBinding gridBinding, java.lang.String pageName, java.lang.String persistId)` Reads the serialized persistent info - by default the reading is done from the Streamstore - but this can be overriden. - OVerride this method if you only want to change the way the persistent info is stored.
    `protected void` | `saveSerializedPersistentInfo(FacesContext context, FIXGRIDBinding gridBinding, java.lang.String pageName, java.lang.String persistId, IFIXGRIDPersistence.PersistentInfo persistentInfo, java.lang.String xml)` Writes the serialized persistent info - by default the writing is done to the Streamstore - but this can be overriden. - Override this method if you only want to change the way the persistent info is stored.
    `protected void` | `updateGridInfo(FacesContext context, FIXGRIDBinding gridBinding, java.lang.String pageName, java.lang.String persistId, IFIXGRIDPersistence.PersistentInfo persistentInfo, GridInfo gridInfo)`
    `void` | `updatePersistentInfo(FacesContext context, FIXGRIDBinding gridBinding, java.lang.String pageName, java.lang.String persistId, IFIXGRIDPersistence.PersistentInfo persistentInfo)` Implementation of `IFIXGRIDPersistence2#updatePersistentInfo(FacesContext, FIXGRIDBinding, String, String, PersistentInfo)`.

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

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

- - ### Constructor Detail

    - #### DefaultFIXGRIDPersistence

          public DefaultFIXGRIDPersistence()

  - ### Method Detail

    - #### initStoreSortInfo

          public static void initStoreSortInfo(boolean value)

      You can define if the sort status of the grid should be stored and re-applied as well. The defaut is "false" because of compatibility reaons.

    - #### readSerializedPersistentInfo

          protected java.lang.String readSerializedPersistentInfo(FacesContext context,
                                                                  FIXGRIDBinding gridBinding,
                                                                  java.lang.String pageName,
                                                                  java.lang.String persistId)

      Reads the serialized persistent info - by default the reading is done from the Streamstore - but this can be overriden. - OVerride this method if you only want to change the way the persistent info is stored.

    - #### readGridInfo

          protected GridInfo readGridInfo(FacesContext context,
                                          FIXGRIDBinding gridBinding,
                                          java.lang.String pageName,
                                          java.lang.String persistId)

      The persistent info is kept in the database as instance of "GridInfo". This is the method to read the grid info.

    - #### readPersistentInfo

          public IFIXGRIDPersistence.PersistentInfo readPersistentInfo(FacesContext context,
                                                                       FIXGRIDBinding gridBinding,
                                                                       java.lang.String pageName,
                                                                       java.lang.String persistId)

      Reads and applies persistent info for grid.
      Specified by:
        `readPersistentInfo` in interface `IFIXGRIDPersistence2`

    - #### applyPersistentInfoFromGridInfo

          public static IFIXGRIDPersistence.PersistentInfo applyPersistentInfoFromGridInfo(FIXGRIDBinding gridBinding,
                                                                                           GridInfo gi)

    - #### saveSerializedPersistentInfo

          protected void saveSerializedPersistentInfo(FacesContext context,
                                                      FIXGRIDBinding gridBinding,
                                                      java.lang.String pageName,
                                                      java.lang.String persistId,
                                                      IFIXGRIDPersistence.PersistentInfo persistentInfo,
                                                      java.lang.String xml)

      Writes the serialized persistent info - by default the writing is done to the Streamstore - but this can be overriden. - Override this method if you only want to change the way the persistent info is stored.
      THe info to be stored is passed as XML string. All other parameters are passed in order to let you build up the correct access string into your database.

    - #### updatePersistentInfo

          public void updatePersistentInfo(FacesContext context,
                                           FIXGRIDBinding gridBinding,
                                           java.lang.String pageName,
                                           java.lang.String persistId,
                                           IFIXGRIDPersistence.PersistentInfo persistentInfo)

      Implementation of `IFIXGRIDPersistence2#updatePersistentInfo(FacesContext, FIXGRIDBinding, String, String, PersistentInfo)`. The data is internally kept as instance of `GridInfo`, so the GridInfo instance is created with `DefaultFIXGRIDPersistence#createGridInfo(FIXGRIDBinding, PersistentInfo)` and then stored with `#updatePersistentInfo(FacesContext, FIXGRIDBinding, String, String, PersistentInfo)`.
      Specified by:
        `updatePersistentInfo` in interface `IFIXGRIDPersistence2`

    - #### updateGridInfo

          protected void updateGridInfo(FacesContext context,
                                        FIXGRIDBinding gridBinding,
                                        java.lang.String pageName,
                                        java.lang.String persistId,
                                        IFIXGRIDPersistence.PersistentInfo persistentInfo,
                                        GridInfo gridInfo)

      Parameters:
        `persistentInfo` - - just passed for information reason + for compatibility
        `gridInfo` - - this is the data of the grid to be persisted

    - #### createGridInfo

          public static GridInfo createGridInfo(FIXGRIDBinding gridBinding,
                                                IFIXGRIDPersistence.PersistentInfo persistentInfo)

      Creates a serialize-able `GridInfo`-object that can be simply persisted by JAXB serialization.

Copyright © CaptainCasa Gmbh. All Rights Reserved.