Package nzilbb.labbcat.server.api
Class TableServletBase.DeleteCheck
- java.lang.Object
-
- nzilbb.labbcat.server.api.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.
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}")
-
-
Constructor Summary
Constructors Constructor Description DeleteCheck(String query, String field, String reason)
DeleteCheck(String query, List<String> fields, String reason)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
formatReason(ResultSet rs, TableServletBase servlet)
Formats the reason by including the returned count if included in the error.
-
-
-
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.
-
-