Class ExportQueueDAO

java.lang.Object
ru.bgcrm.dao.CommonDAO
org.bgerp.plugin.inventory.sync1c.dao.ExportQueueDAO

public class ExportQueueDAO extends CommonDAO
DAO for ExportQueue (inventory_sync1c_export_queue table).
  • Constructor Details

    • ExportQueueDAO

      public ExportQueueDAO(Connection con)
  • Method Details

    • add

      public void add(int processId, int instanceId, String warehouseId) throws SQLException
      Inserts or resets a pending queue entry for the given process/instance pair. If a record already exists (from a previous export), it is reset to pending so the process can be re-exported after status is reverted and re-applied.
      Throws:
      SQLException
    • getPending

      public List<ExportQueue> getPending(int maxAttempts) throws SQLException
      Returns pending queue entries with attempts less than maxAttempts.
      Throws:
      SQLException
    • updateStatus

      public void updateStatus(int id, String status, int attempts, String error) throws SQLException
      Updates status, attempts count and error text for a queue entry.
      Throws:
      SQLException
    • getListByInstance

      public List<ExportQueue> getListByInstance(int instanceId) throws SQLException
      Returns queue entries for a given instance (latest 100, newest first).
      Throws:
      SQLException
    • delete

      public void delete(int id) throws SQLException
      Throws:
      SQLException
    • fromRs

      public static ExportQueue fromRs(ResultSet rs) throws SQLException
      Throws:
      SQLException