Class DeleteUserEvent

java.lang.Object
net.solarnetwork.central.common.dao.jdbc.sql.DeleteUserEvent
All Implemented Interfaces:
org.springframework.jdbc.core.PreparedStatementCreator, org.springframework.jdbc.core.SqlProvider

public class DeleteUserEvent extends Object implements org.springframework.jdbc.core.PreparedStatementCreator, org.springframework.jdbc.core.SqlProvider
Delete UserEvent entities matching a filter.
  • Constructor Details

  • Method Details

    • deleteForUserOlderThanDate

      public static DeleteUserEvent deleteForUserOlderThanDate(Long userId, Instant date)
      Create an instance for deleting events for a specific user, older than a given date.
      Parameters:
      userId - the ID of the user to delete events for
      date - the date to delete all events before
      Returns:
      the new instance
    • getSql

      public String getSql()
      Specified by:
      getSql in interface org.springframework.jdbc.core.SqlProvider
    • createPreparedStatement

      public PreparedStatement createPreparedStatement(Connection con) throws SQLException
      Specified by:
      createPreparedStatement in interface org.springframework.jdbc.core.PreparedStatementCreator
      Throws:
      SQLException
    • getFilter

      Get the configured filter.
      Returns:
      the filter