Class DAArtificialIntelligence

java.lang.Object
overit.geocall.da.DABase
overit.geocallapp.replicator.basic.base.DataSource.DABaseReplicator
overit.geocallapp.wfm.replicator.datasource.DAReplicatorWfmBase
overit.geocallapp.wfm.ai.replicator.meterreading.data.DAArtificialIntelligence
All Implemented Interfaces:
Serializable, DataAttributesHolder, EDMConfigurableBean, overit.geocall.marks.FieldExposer, overit.geocall.marks.NameExposer, DBFieldMapper, DBObjectMapper, Identified, Tool, overit.geocallapp.replicator.basic.base.DataSource.IDSDABase

public class DAArtificialIntelligence extends overit.geocallapp.wfm.replicator.datasource.DAReplicatorWfmBase
Data extraction queries for AI Module
Since:
12.0
See Also:
  • Field Details

    • SELECT_METER_TEMPLATES

      public static final int SELECT_METER_TEMPLATES
      See Also:
    • SELECT_METER_PREDICTIONS

      public static final int SELECT_METER_PREDICTIONS
      See Also:
  • Constructor Details

    • DAArtificialIntelligence

      public DAArtificialIntelligence()
  • Method Details

    • giveQueries

      protected DBView giveQueries(int i, PooledConnection conn, DBStatement stmt, HashGetter filter, int maxrows, int skiprows) throws SQLException
      Description copied from class: DABase
      Implements new specific queries that are different from the standard ones.
      For all the queries implemented with this method we must set, in the DBStatement, the SQL (setSql()), the parameters (available as filters and settable using set()) and any map (setDBObjectMap(), setDBFieldMap()) to use on the DBStatement.
      The execution is done when we call one of the query() methods, so we can do here only the statement setup.
      It is fundamental that the method return null if the query id is not recognized.
      Overrides:
      giveQueries in class overit.geocallapp.wfm.replicator.datasource.DAReplicatorWfmBase
      Parameters:
      i - The id of the query
      conn - Connection from which we have extracted the DBStatement; it can be used to extract other DBStatement
      stmt - DBStatement used to set the SQL code and the parameters
      filter - Parameters to set in the DBStatement
      maxrows - Maximum rows number extracted with the query
      skiprows - Number of initial lines that you do not want to be returned. Even these lines, although skipped, are counted in the maxrows parameter.
      Returns:
      If the query id is valid we must return the DBStatement passed as parameter; if the is is not valid, or we don't want to add specific queries to the standard ones we must return null
      Throws:
      SQLException - If there is an error in the SQL SQLException is thrown
    • giveCommands

      protected int giveCommands(int i, PooledConnection conn, DBStatement stmt, HashGetter oKeys, HashGetter oParams) throws SQLException
      Description copied from class: DABase
      Implements new specific commands that are different from the standard ones.
      For all the commands implemented with this method we must set, in the DBStatement, the SQL (setSql()), (setDBObjectMap(), setDBFieldMap()) to use on the DBStatement.
      The execution is done when we call one of the command() methods, so we can do here only the statement setup.
      It is fundamental that the method return null if the command id is not recognized.
      Overrides:
      giveCommands in class overit.geocallapp.wfm.replicator.datasource.DAReplicatorWfmBase
      Parameters:
      i - The id of the command
      conn - Connection from which we have extracted the DBStatement; it can be used to extract other DBStatement
      stmt - DBStatement used to set the SQL code and the parameters
      oKeys - Values used as filters to set for the update commands
      oParams - Values to set as parameters in the DBStatement
      Returns:
      If the command id is valid we must return the DBStatement passed as parameter; if the id is not valid, or we don't want to add specific commands to the standard ones we must return null
      Throws:
      SQLException - If there is an error in the SQL SQLException is thrown
    • appendCustomTombstone

      protected void appendCustomTombstone(ArrayList<String> alTombstones, HashGetter filter, Date lastSync, Long idPda, PooledConnection conn, PooledConnection externalConn) throws DAException
      Overrides:
      appendCustomTombstone in class overit.geocallapp.wfm.replicator.datasource.DAReplicatorWfmBase
      Throws:
      DAException