Class DAContainer

All Implemented Interfaces:
Serializable, overit.geocall.marks.MethodExposer, overit.geocall.marks.NameExposer, Badgeable, Identified, Tool, overit.geocall.ux.configurability.UIConfigurable, overit.geocall.ux.edm.ModelConfigurable
Direct Known Subclasses:
overit.geocallapp.wfm.importexport.ielog.AImportExportMaster, overit.geocallapp.wfm.util.wfmtasklog.AWfmTaskLogRighe, JobContainer, JobQueueContainer, SimpleTable

@Component public class DAContainer extends Container
This class extends Container and implements the logic to populate TableView and ServerTableView through a DABase or DAO.
The children of this container will be all populated via the specified DABase or DAO. The following is an example of how to declare in the xml the DAContainer and to populate via DABase a TableView.

 <DAContainer obj_da="DATUtente" query="SELECT_FILTER" rows="10" maxrows="0" _newpage="EditProfile.xml" _modifypage="EditProfile.xml">
      <TableView event="Modify" name="table" >
          <ColumnLong name="TUSEID" labelInLine="1" key="1" label="ID" />
          <Column name="TUSEDESCRIPTION" inLine="1" label="Description" />
          <Column name="TUSECODE" inLine="1" label="Code" />
          <ColumnLong name="TUSEORDERING" inLine="1" label="Order" />
          <ColumnBoolean name="TUSEISACTIVE" inLine="1" label="Active" />
      </TableView>
 </DAContainer>
 
See Also:
GCApi:
component
  • Field Details

    • _currRow

      protected int _currRow
    • _newPage

      protected String _newPage
    • _modifyPage

      protected String _modifyPage
    • _da

      protected DABase _da
    • _dao

      protected DAO _dao
    • _dao0

      protected DAO0 _dao0
    • _dbvm

      protected DBViewManager _dbvm
    • _maxrows

      protected int _maxrows
    • _query

      protected String _query
    • _queryId

      protected int _queryId
    • _queryCmd

      protected Command _queryCmd
    • _order

      protected String _order
    • _openValues

      protected HashGetter _openValues
  • Constructor Details

    • DAContainer

      public DAContainer()
  • Method Details

    • setNEWPAGE

      public void setNEWPAGE(String s)
      Sets the name of the new page to open.
      Called by the onNew(), no parameters will be passed to the onOpen of the xlm page.
      Parameters:
      s - The string containing the name of the xml
    • setMAXROWS

      public void setMAXROWS(String s)
      Sets the maximum number of records to fetch from the database.
      Parameters:
      s - Maximum number of rows, if 0 no limit will be applied
    • setORDER

      public void setORDER(String s)
      Defines the sorting of the data of the table.
      It is possible to indicate the name of the field used to sort all the records in ascending or descending order and can be obtained even a sorting on multiple fields.
      Parameters:
      s - The name of a single column to obtain an ascending order based on that field (for example "AUSEID").
      The name of a single column preceded by the exclamation mark to obtain a descending order based on that column (for example "!AUSEID").
      A comma separated list of column names to obtain a sorting on multiple fields (for example "AUSESURNAME,!AUSENAME").
      A null value will reset the sorting.
    • setQUERY

      public void setQUERY(String s)
      Sets the string that defines the name of the query that will be used to fetch the data from the database.
      Parameters:
      s - The query used by the table. Pay attention to match with one of the constant's names defined in the DABase set by the method setDA(obj), setDAO(Object) or setDAO0(Object)
    • setMODIFYPAGE

      public void setMODIFYPAGE(String s)
      Sets the name of the page to open to modify the row.
      The parameters of the selected row will be passed to the onOpen of the xml page.
      Parameters:
      s - The string containing the name of the xml
    • setDA

      public void setDA(Object o)
      Sets the DA DABase used to do the queries that fetches the data from the database
      Parameters:
      o - The DA used by the table
    • setDAO

      public void setDAO(Object o)
      Sets the DAO used to do the queries that fetches the data from the database
      Parameters:
      o - The DAO used by the table
    • setDAO0

      public void setDAO0(Object o)
      Sets the DAO0 used to do the queries that fetches the data from the database
      Parameters:
      o - The DAO0 used by the table
    • reload

      public void reload()
    • onNew

      public boolean onNew(Object o)
      Manages the event of adding a new row by opening a new page. No parameters will be passed to the onOpen of the xml page.
      Parameters:
      o - Not used
      Returns:
      true if was able to perform the event, false otherwise
    • onDelete

      public boolean onDelete(Object o)
      Manages the event of deleting a row.
      Parameters:
      o - The row to delete
      Returns:
      true
    • onModify

      public boolean onModify(Object o)
      Manages the event of modifying a row by opening a new page. The parameters of the selected row will be passed to the onOpen of the xml page.
      Parameters:
      o - The row to modify
      Returns:
      true if was able to perform the event, false otherwise
    • onQuery

      public void onQuery(Object o)
      Manages the event of a new query.
      Parameters:
      o - HashGetter containing the queryId
    • getDA

      public DABase getDA()
      Returns the DABase used to do the queries that fetches the data from the database
      Returns:
      The DABase used by the table
    • getDAO

      public DAO getDAO()
      Returns the DAO used to do the queries that fetches the data from the database
      Returns:
      The DAO used by the table
    • getDAO0

      @Deprecated public DAO0 getDAO0()
      Deprecated.
      use DAO instead
      Returns:
      use DAO instead
    • getDBViewManager

      public DBViewManager getDBViewManager()
      Returns the DBView Manager
      Returns:
      The DBViewManager
    • getCurrentRow

      public int getCurrentRow()
      Returns the current row
      Returns:
      The row
    • onOpenChildContainer

      public void onOpenChildContainer(Container c)
      Description copied from class: Container
      Called by the Container.onOpen(java.lang.Object) method and is used to implements some actions on the Contianer's children. This base implementation does nothing.
      Overrides:
      onOpenChildContainer in class Container
      Parameters:
      c - The Container to implement the operations on the children
    • onSave

      public boolean onSave(Object o)
      Manages the event of insert or update a row.
      Parameters:
      o - The row to insert or update
      Returns:
      true
    • onRowUpdate

      public boolean onRowUpdate(Object o)
      Manages the event of updating a row.
      Parameters:
      o - The row to update
      Returns:
      false
    • onDeleteException

      protected void onDeleteException(DAValidateException e)
    • onDeleteException

      protected void onDeleteException(DAException e)
    • onSaveException

      protected void onSaveException(DAValidateException e)
    • onSaveException

      protected void onSaveException(DAException e)
    • onQueryEmpty

      protected void onQueryEmpty()