Class TableServletBase.DeleteCheck

  • Enclosing class:
    TableServletBase

    public class TableServletBase.DeleteCheck
    extends Object
    A query used to check each row to determine if there's a reason it can't be deleted. deleteQuery should be a query that
    • Accepts all the specified fields as parameters
    • Returns a numeric column, which is 0 when the row can be deleted.
    • Optionally returns a second column for informational purposes.
    e.g. new DeleteCheck("SELECT COUNT(*), MIN(transcript_id) FROM transcript WHERE corpus_name = ?", "corpus_name", "{0} {0,choice,1#transcript|1<transcripts} use this corpus, e.g. {1}")
    • Method Detail

      • formatReason

        public String formatReason​(ResultSet rs,
                                   TableServletBase servlet)
        Formats the reason by including the returned count if included in the error.
        Parameters:
        rs -
        Returns:
        The formatted message.