public class Unique
extends java.lang.Object
Constructor and Description |
---|
Unique(java.lang.String column,
ErrorReport erReport) |
Unique(Table table,
java.lang.String column,
ErrorReport erReport)
create a Unique object error reporter that received tuples from
table 'table' and verifies that the 'column' of each tuple is unique and
not null.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Tuple t)
register the content of a tuple: get its id col, column value,
and see if the column value has been seen before; if so, register
an error with the error report object.
|
void |
add(Tuple t,
java.lang.String colValue)
add tuple t whose column is "computed" to be colValue
|
public Unique(Table table, java.lang.String column, ErrorReport erReport)
table
- -- table to examinecolumn
- -- name of column in which no duplicates should existerReport
- -- ErrorReport object for accumulating errorspublic Unique(java.lang.String column, ErrorReport erReport)
public void add(Tuple t)
t
- -- tuple whose contents are to be registeredpublic void add(Tuple t, java.lang.String colValue)
t
- -- tuple to addcolValue
- -- value of "computed" attribute