Class QueryHistoryDAO

java.lang.Object
ru.bgcrm.dao.CommonDAO
org.bgerp.plugin.svc.dba.dao.QueryHistoryDAO

public class QueryHistoryDAO extends CommonDAO
  • Constructor Details

    • QueryHistoryDAO

      public QueryHistoryDAO(Connection con)
  • Method Details

    • update

      public void update(int userId, String query) throws SQLException
      Inserts query in history log or updates last usage time
      Parameters:
      userId - user ID
      query - the query
      Throws:
      SQLException
    • list

      public List<IdTitle> list(int userId) throws SQLException
      Selects user queries with reverse sort by usage time
      Parameters:
      userId - user ID
      Returns:
      the user queries
      Throws:
      SQLException
    • get

      public String get(int userId, int id) throws SQLException
      Gets user history query
      Parameters:
      userId - user ID
      id - query entity ID
      Returns:
      the query
      Throws:
      SQLException
    • delete

      public void delete(int userId, int id) throws SQLException
      Deletes user history query
      Parameters:
      userId -
      id -
      Throws:
      SQLException