Class StoreAccessDAO

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

public class StoreAccessDAO extends CommonDAO
DAO for inventory_store_access — engineer access periods to warehouses.
  • Constructor Details

    • StoreAccessDAO

      public StoreAccessDAO(Connection con)
  • Method Details

    • getList

      public List<StoreAccess> getList(int storeId) throws SQLException
      Returns all access records for a given store (for admin UI).
      Throws:
      SQLException
    • getActiveStoreIds

      public Set<Integer> getActiveStoreIds(int userId, Date date) throws SQLException
      Returns store IDs accessible to a user on a given date. A null date_to means indefinite access.
      Throws:
      SQLException
    • add

      public void add(int storeId, int userId, Date dateFrom, Date dateTo) throws SQLException
      Inserts an access record.
      Throws:
      SQLException
    • delete

      public void delete(int id) throws SQLException
      Deletes an access record by id.
      Throws:
      SQLException
    • closePeriod

      public void closePeriod(int id, Date closeTo) throws SQLException
      Closes the open period (sets date_to) for the record identified by id.
      Throws:
      SQLException