Class StoreSync

java.lang.Object
org.bgerp.plugin.inventoru.sync1c.service.StoreSync

public class StoreSync extends Object
How a warehouse of the ERP says which warehouse of 1C it is. That used to live only in the mapping table, a row an administrator filled in per warehouse and per instance — a separate piece of setup on top of the parameters the warehouse already carries, and on a company with two dozen warehouses simply a chore. The identity belongs to the warehouse: the connector names the parameters, the warehouse holds the values, and a warehouse with a value in them takes part in that exchange. The mapping row does not go away — the import log and the pending rows point at it — but it is kept by the code from those parameters rather than typed in.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final record 
    Everything one warehouse tells 1C about itself.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    identity(Sync1cConnector instance, int storeId)
    Identity of one warehouse for one instance, read from the parameters the connector names.
    instancesOf(int storeId)
    Instances this warehouse takes part in — those whose GUID parameter it carries a value in.
    mapping(Sync1cConnector instance, int storeId, int userId)
    The mapping row of a warehouse in an instance, created when absent and kept up to date with the parameters — it is a technical record now, not a piece of setup.
    Warehouses taking part in the exchange of this instance: the ones carrying a value in its GUID parameter, plus those a mapping row already names — a warehouse mapped by hand before the parameters existed keeps working.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • identity

      public StoreSync.Identity identity(Sync1cConnector instance, int storeId) throws SQLException
      Identity of one warehouse for one instance, read from the parameters the connector names.
      Throws:
      SQLException
    • storeIds

      public Set<Integer> storeIds(Sync1cConnector instance) throws SQLException
      Warehouses taking part in the exchange of this instance: the ones carrying a value in its GUID parameter, plus those a mapping row already names — a warehouse mapped by hand before the parameters existed keeps working.
      Throws:
      SQLException
    • mapping

      public EngineerWarehouse mapping(Sync1cConnector instance, int storeId, int userId) throws SQLException
      The mapping row of a warehouse in an instance, created when absent and kept up to date with the parameters — it is a technical record now, not a piece of setup.
      Throws:
      SQLException
    • instancesOf

      public List<Sync1cConnector> instancesOf(int storeId) throws SQLException
      Instances this warehouse takes part in — those whose GUID parameter it carries a value in. Used where the instance is not known up front, above all when a closed process puts a write-off into the export queue.
      Throws:
      SQLException