Class com.ibm.db.selector.CellSelector
java.lang.Object
|
+----com.ibm.db.selector.Selector
|
+----com.ibm.db.selector.SingleColumnSelector
|
+----com.ibm.db.selector.CellSelector
- public class CellSelector
- extends SingleColumnSelector
This class provides
access to a scalar subset of data contained
within an implementation of the TableModel interface.
It provides the means to
change the selected cell, and to coerce the scalar value identified by
the cell
to an alternative data type. Data coercion maximizes the opportunity
for connecting a selector bean to other beans.
To control the cell within the source TableModel that is of interest,
use the
setColumnNumber(int)
and setRowNumber(int)
methods.
- See Also:
- setColumnNumber
- setRowNumber
- Selector
- SingleColumnSelector
Constructor Index
- CellSelector()
- Create a CellSelector.
- CellSelector(TableModel)
- Create a CellSelector using the supplied
TableModel
.
Method Index
- deserialize()
- Return an object that has been deserialized from the current
selection, or
null
if the current selection
cannot be deserialized.
- getBigDecimal()
- Return the current selection from the source TableModel
as a
java.math.BigDecimal
.
- getBigInteger()
- Return the current selection from the source TableModel
as a
java.math.BigInteger
.
- getBoolean()
- Return the current selection from the source TableModel
as a
boolean
.
- getByte()
- Return the current selection from the source TableModel
as a
byte
.
- getByteArray()
- Return the current selection from the source TableModel
as a
byte[]
.
- getDate()
- Return the current selection from the source TableModel
as a
java.sql.Date
.
- getDouble()
- Return the current selection from the source TableModel
as a
double
.
- getFloat()
- Return the current selection from the source TableModel
as a
float
.
- getInt()
- Return the current selection from the source TableModel
as a
int
.
- getLong()
- Return the current selection from the source TableModel
as a
long
.
- getObject()
- Return the current selection from the source TableModel
as an
Object
.
- getRowNumber()
- Return the index number of the row for the currently selected cell,
adjusted according to the current value of
getIndexFromOne()
.
- getShort()
- Return the current selection from the source TableModel
as a
short
.
- getString()
- Return the current selection from the source TableModel
as a
String
.
- getTime()
- Return the current selection from the source TableModel
as a
java.sql.Time
.
- getTimestamp()
- Return the current selection from the source TableModel
as a
java.sql.Timestamp
.
- isCellEditable()
- Return
true
if the cell identified by the
CellSelector may be updated.
- serialize(Serializable)
- Store the serialized form of the supplied serializable object
as the current selection.
- setBigDecimal(BigDecimal)
- Update the current selection using the supplied
BigDecimal
.
- setBigInteger(BigInteger)
- Update the current selection using the supplied
BigInteger
.
- setBoolean(boolean)
- Update the current selection using the supplied
boolean
.
- setByte(byte)
- Update the current selection using the supplied
byte
.
- setByteArray(byte[])
- Update the current selection using the supplied
byte[]
.
- setDate(Date)
- Update the current selection using the supplied
java.sql.Date
.
- setDouble(double)
- Update the current selection using the supplied
double
.
- setFloat(float)
- Update the current selection using the supplied
float
.
- setInt(int)
- Update the current selection using the supplied
int
.
- setLong(long)
- Update the current selection using the supplied
long
.
- setObject(Object)
- Update the current selection using the supplied
Object
.
- setRowNumber(int)
- Specify the index number of the row for the currently selected cell.
- setShort(short)
- Update the current selection using the supplied
short
.
- setString(String)
- Update the current selection using the supplied
String
.
- setTime(Time)
- Update the current selection using the supplied
java.sql.Time
.
- setTimestamp(Timestamp)
- Update the current selection using the supplied
java.sql.Timestamp
.
Constructors
CellSelector
public CellSelector()
- Create a CellSelector. The CellSelector has no data until
setModel
is called.
- See Also:
- setModel
CellSelector
public CellSelector(TableModel model)
- Create a CellSelector using the supplied
TableModel
.
- Parameters:
- model - the TableModel to be used as the source and target
for data for this CellSelector.
- See Also:
- setModel
Methods
deserialize
public Serializable deserialize()
- Return an object that has been deserialized from the current
selection, or
null
if the current selection
cannot be deserialized.
- Returns:
- the deserialized object.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- ROW_NUMBER
getBigDecimal
public BigDecimal getBigDecimal()
- Return the current selection from the source TableModel
as a
java.math.BigDecimal
.
- Returns:
- the BigDecimal representation of the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- if current selection cannot be coerced to a BigDecimal
and is not null.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- ROW_NUMBER
- COERCION
- getBigDecimal
getBigInteger
public BigInteger getBigInteger()
- Return the current selection from the source TableModel
as a
java.math.BigInteger
.
- Returns:
- the BigInteger representation of the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- if current selection cannot be coerced to a BigInteger
and is not null.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- ROW_NUMBER
- COERCION
- getBigInteger
getBoolean
public boolean getBoolean()
- Return the current selection from the source TableModel
as a
boolean
.
- Returns:
- the boolean representation of the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- if current selection cannot be coerced to a boolean.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- ROW_NUMBER
- COERCION
- getBoolean
getByte
public byte getByte()
- Return the current selection from the source TableModel
as a
byte
.
- Returns:
- the byte representation of the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- if current selection cannot be coerced to a byte.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- ROW_NUMBER
- COERCION
- getByte
getByteArray
public byte[] getByteArray()
- Return the current selection from the source TableModel
as a
byte[]
.
- Returns:
- the byte[] representation of the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- if current selection cannot be coerced to a byte[]
and is not null.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- ROW_NUMBER
- COERCION
- getByteArray
getDate
public Date getDate()
- Return the current selection from the source TableModel
as a
java.sql.Date
.
- Returns:
- the Date representation of the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- if current selection cannot be coerced to a Date
and is not null.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- ROW_NUMBER
- COERCION
- getDate
getDouble
public double getDouble()
- Return the current selection from the source TableModel
as a
double
.
- Returns:
- the double representation of the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- if current selection cannot be coerced to a double.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- ROW_NUMBER
- COERCION
- getDouble
getFloat
public float getFloat()
- Return the current selection from the source TableModel
as a
float
.
- Returns:
- the float representation of the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- if current selection cannot be coerced to a float.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- ROW_NUMBER
- COERCION
- getFloat
getInt
public int getInt()
- Return the current selection from the source TableModel
as a
int
.
- Returns:
- the int representation of the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- if current selection cannot be coerced to an int.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- ROW_NUMBER
- COERCION
- getInt
getLong
public long getLong()
- Return the current selection from the source TableModel
as a
long
.
- Returns:
- the long representation of the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- if current selection cannot be coerced to a long.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- ROW_NUMBER
- COERCION
- getLong
getObject
public Object getObject()
- Return the current selection from the source TableModel
as an
Object
.
Some beans accept objects and test their class to
detect objects that they understand.
- Returns:
- the Object representation of the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- ROW_NUMBER
getRowNumber
public int getRowNumber()
- Return the index number of the row for the currently selected cell,
adjusted according to the current value of
getIndexFromOne()
.
- Returns:
- the adjusted row index number for the currently selected cell.
- See Also:
- setRowNumber
- setIndexFromOne
getShort
public short getShort()
- Return the current selection from the source TableModel
as a
short
.
- Returns:
- the short representation of the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- if current selection cannot be coerced to a short.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- ROW_NUMBER
- COERCION
- getShort
getString
public String getString()
- Return the current selection from the source TableModel
as a
String
.
- Returns:
- the String representation of the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- ROW_NUMBER
- getString
getTime
public Time getTime()
- Return the current selection from the source TableModel
as a
java.sql.Time
.
- Returns:
- the Time representation of the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- if current selection cannot be coerced to a Time
and is not null.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- ROW_NUMBER
- COERCION
- getTime
getTimestamp
public Timestamp getTimestamp()
- Return the current selection from the source TableModel
as a
java.sql.Timestamp
.
- Returns:
- the Timestamp representation of the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- if current selection cannot be coerced to a Timestamp
and is not null.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- ROW_NUMBER
- COERCION
- getTimestamp
isCellEditable
public boolean isCellEditable()
- Return
true
if the cell identified by the
CellSelector may be updated.
- Returns:
true
if the cell identified by the
CellSelector may be updated, otherwise false
.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- ROW_NUMBER
serialize
public void serialize(Serializable serializable)
- Store the serialized form of the supplied serializable object
as the current selection.
- Parameters:
- serializable - the object to be serialized.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- when the current selection does not identify a byte[] cell.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- ROW_NUMBER
- COERCION
setBigDecimal
public void setBigDecimal(BigDecimal value)
- Update the current selection using the supplied
BigDecimal
.
If the supplied value cannot be interpreted as the type of the
current selection, a SelectorException is thrown.
- Parameters:
- value - the BigDecimal used to update the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- when the supplied value cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- ROW_NUMBER
- COERCION
setBigInteger
public void setBigInteger(BigInteger value)
- Update the current selection using the supplied
BigInteger
.
If the supplied value cannot be interpreted as the type of the
current selection, a SelectorException is thrown.
- Parameters:
- value - the BigInteger used to update the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- when the supplied value cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- ROW_NUMBER
- COERCION
setBoolean
public void setBoolean(boolean value)
- Update the current selection using the supplied
boolean
.
If the supplied value cannot be interpreted as the type of the
current selection, a SelectorException is thrown.
- Parameters:
- value - the boolean used to update the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- when the supplied value cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- ROW_NUMBER
- COERCION
setByte
public void setByte(byte value)
- Update the current selection using the supplied
byte
.
If the supplied value cannot be interpreted as the type of the
current selection, a SelectorException is thrown.
- Parameters:
- value - the byte used to update the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- when the supplied value cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- ROW_NUMBER
- COERCION
setByteArray
public void setByteArray(byte[] value)
- Update the current selection using the supplied
byte[]
.
If the supplied value cannot be interpreted as the type of the
current selection, a SelectorException is thrown.
- Parameters:
- value - the byte[] used to update the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- when the supplied value cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- ROW_NUMBER
- COERCION
setDate
public void setDate(Date value)
- Update the current selection using the supplied
java.sql.Date
.
If the supplied value cannot be interpreted as the type of the
current selection, a SelectorException is thrown.
- Parameters:
- value - the Date used to update the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- when the supplied value cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- ROW_NUMBER
- COERCION
setDouble
public void setDouble(double value)
- Update the current selection using the supplied
double
.
If the supplied value cannot be interpreted as the type of the
current selection, a SelectorException is thrown.
- Parameters:
- value - the double used to update the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- when the supplied value cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- ROW_NUMBER
- COERCION
- getDouble
setFloat
public void setFloat(float value)
- Update the current selection using the supplied
float
.
If the supplied value cannot be interpreted as the type of the
current selection, a SelectorException is thrown.
- Parameters:
- value - the float used to update the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- when the supplied value cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- ROW_NUMBER
- COERCION
setInt
public void setInt(int value)
- Update the current selection using the supplied
int
.
If the supplied value cannot be interpreted as the type of the
current selection, a SelectorException is thrown.
- Parameters:
- value - the int used to update the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- when the supplied value cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- ROW_NUMBER
- COERCION
setLong
public void setLong(long value)
- Update the current selection using the supplied
long
.
If the supplied value cannot be interpreted as the type of the
current selection, a SelectorException is thrown.
- Parameters:
- value - the long used to update the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- when the supplied value cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- ROW_NUMBER
- COERCION
setObject
public void setObject(Object value)
- Update the current selection using the supplied
Object
.
If the supplied value cannot be interpreted as the type of the
current selection, a SelectorException is thrown.
- Parameters:
- value - the Object used to update the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- when the supplied value cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- ROW_NUMBER
- COERCION
setRowNumber
public void setRowNumber(int rowNumber)
- Specify the index number of the row for the currently selected cell.
If
getIndexFromOne()
returns true
, then
rowNumber should be specified as 1
to indicate the
first row in the source TableModel.
After the source TableModel has been set for the selector,
if rows are inserted or deleted into the source TableModel prior to the
rowNumber, the rowNumber is automatically adjusted so the
selected data is not changed.
If the source TableModel is reset or the source TableModel triggers an
event that the table has completely changed, then no attempt is made to
modify the rowNumber and the selected data may change.
The value specified for rowNumber is not validated until an attempt is
made to retrieve/set data through the selector. If the source TableModel does
not contain the specified row, the rowNumber is set to the last
row in the source TableModel and an exception is thrown.
- Parameters:
- rowNumber - the row index number for the currently selected cell.
- See Also:
- setIndexFromOne
setShort
public void setShort(short value)
- Update the current selection using the supplied
short
.
If the supplied value cannot be interpreted as the type of the
current selection, a SelectorException is thrown.
- Parameters:
- value - the short used to update the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- when the supplied value cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- ROW_NUMBER
- COERCION
setString
public void setString(String value)
- Update the current selection using the supplied
String
.
If the supplied value cannot be interpreted as the type of the
current selection, a SelectorException is thrown.
- Parameters:
- value - the String used to update the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- when the supplied value cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- ROW_NUMBER
- COERCION
setTime
public void setTime(Time value)
- Update the current selection using the supplied
java.sql.Time
.
If the supplied value cannot be interpreted as the type of the
current selection, a SelectorException is thrown.
- Parameters:
- value - the Time used to update the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- when the supplied value cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- ROW_NUMBER
- COERCION
setTimestamp
public void setTimestamp(Timestamp value)
- Update the current selection using the supplied
java.sql.Timestamp
.
If the supplied value cannot be interpreted as the type of the
current selection, a SelectorException is thrown.
- Parameters:
- value - the Timestamp used to update the current selection.
- Throws: SelectorException
- NO_MODEL
- when there is no TableModel associated with this selector.
- Throws: SelectorException
- COLUMN_NAME
- when the current selection identifies the selected column by
name, and the specified column name cannot be found in the
associated TableModel.
- Throws: SelectorException
- COLUMN_NUMBER
- when the current selection column number is outside of the
range of column numbers in the associated TableModel.
- Throws: SelectorException
- ROW_NUMBER
- when the current selection row number is outside of the
range of row numbers in the associated TableModel.
- Throws: SelectorException
- COERCION
- when the supplied value cannot be coerced to the type required
by the current selection.
- See Also:
- NO_MODEL
- COLUMN_NAME
- COLUMN_NUMBER
- ROW_NUMBER
- COERCION
