| java.lang.Object org.apache.derby.iapi.types.DataType org.apache.derby.iapi.types.NumberDataType org.apache.derby.iapi.types.SQLInteger
SQLInteger | final public class SQLInteger extends NumberDataType (Code) | | SQLInteger satisfies the DataValueDescriptor
interfaces (i.e., OrderableDataType). It implements an integer column,
e.g. for * storing a column value; it can be specified
when constructed to not allow nulls. Nullability cannot be changed
after construction, as it affects the storage size and mechanism.
Because OrderableDataType is a subtype of DataType,
SQLInteger can play a role in either a DataType/Row
or a OrderableDataType/Row, interchangeably.
We assume the store has a flag for nullness of the value,
and simply return a 0-length array for the stored form
when the value is null.
PERFORMANCE: There are likely alot of performance improvements
possible for this implementation -- it new's Integer
more than it probably wants to.
|
Method Summary | |
public BooleanDataValue | equals(DataValueDescriptor left, DataValueDescriptor right) The = operator as called from the language module, as opposed to
the storage module. | public int | estimateMemoryUsage() | public boolean | getBoolean() | public byte | getByte() | public DataValueDescriptor | getClone() | public double | getDouble() | public float | getFloat() | public int | getInt() | public int | getLength() | public long | getLong() | public DataValueDescriptor | getNewNull() | public Object | getObject() | public short | getShort() | public String | getString() | public int | getTypeFormatId() Return my format identifier. | public String | getTypeName() | public BooleanDataValue | greaterOrEquals(DataValueDescriptor left, DataValueDescriptor right) The >= operator as called from the language module, as opposed to
the storage module. | public BooleanDataValue | greaterThan(DataValueDescriptor left, DataValueDescriptor right) The > operator as called from the language module, as opposed to
the storage module. | public int | hashCode() | protected boolean | isNegative() This method implements the isNegative method.
A boolean. | public boolean | isNull() | public BooleanDataValue | lessOrEquals(DataValueDescriptor left, DataValueDescriptor right) The <= operator as called from the language module, as opposed to
the storage module. | public BooleanDataValue | lessThan(DataValueDescriptor left, DataValueDescriptor right) The < operator as called from the language module, as opposed to
the storage module. | public NumberDataValue | minus(NumberDataValue result) This method implements the unary minus operator for int. | public NumberDataValue | mod(NumberDataValue dividend, NumberDataValue divisor, NumberDataValue result) | public BooleanDataValue | notEquals(DataValueDescriptor left, DataValueDescriptor right) The <> operator as called from the language module, as opposed to
the storage module. | final public void | readExternal(ObjectInput in) | final public void | readExternalFromArray(ArrayInputStream in) | public void | restoreToNull() | protected void | setFrom(DataValueDescriptor theValue) | final public void | setInto(PreparedStatement ps, int position) Set the value into a PreparedStatement. | final public void | setInto(ResultSet rs, int position) Set this value into a ResultSet for a subsequent ResultSet.insertRow
or ResultSet.updateRow. | public void | setValue(String theValue) | public void | setValue(int theValue) | public void | setValue(long theValue) | public void | setValue(float theValue) | public void | setValue(double theValue) | public void | setValue(boolean theValue) | public void | setValueFromResultSet(ResultSet resultSet, int colNumber, boolean isNullable) | public NumberDataValue | times(NumberDataValue left, NumberDataValue right, NumberDataValue result) This method implements the * operator for "int * int". | public String | toString() | protected int | typeCompare(DataValueDescriptor arg) | public int | typePrecedence() | public void | writeExternal(ObjectOutput out) |
INTEGER_LENGTH | final static int INTEGER_LENGTH(Code) | | |
SQLInteger | public SQLInteger()(Code) | | no-arg constructor, required by Formattable
|
SQLInteger | public SQLInteger(int val)(Code) | | |
SQLInteger | public SQLInteger(char val)(Code) | | |
estimateMemoryUsage | public int estimateMemoryUsage()(Code) | | |
getBoolean | public boolean getBoolean()(Code) | | |
getDouble | public double getDouble()(Code) | | |
getFloat | public float getFloat()(Code) | | |
getInt | public int getInt()(Code) | | |
getLength | public int getLength()(Code) | | |
getLong | public long getLong()(Code) | | |
greaterOrEquals | public BooleanDataValue greaterOrEquals(DataValueDescriptor left, DataValueDescriptor right) throws StandardException(Code) | | The >= operator as called from the language module, as opposed to
the storage module.
Parameters: left - The value on the left side of the >= Parameters: right - The value on the right side of the >= A SQL boolean value telling whether the first operand is greaterthan or equal to the second operand exception: StandardException - Thrown on error |
hashCode | public int hashCode()(Code) | | |
isNegative | protected boolean isNegative()(Code) | | This method implements the isNegative method.
A boolean. If this.value is negative, return true.For positive values or null, return false. |
lessOrEquals | public BooleanDataValue lessOrEquals(DataValueDescriptor left, DataValueDescriptor right) throws StandardException(Code) | | The <= operator as called from the language module, as opposed to
the storage module.
Parameters: left - The value on the left side of the <= Parameters: right - The value on the right side of the <= A SQL boolean value telling whether the first operand is lessthan or equal to the second operand exception: StandardException - Thrown on error |
setInto | final public void setInto(ResultSet rs, int position) throws SQLException(Code) | | Set this value into a ResultSet for a subsequent ResultSet.insertRow
or ResultSet.updateRow. This method will only be called for non-null values.
exception: SQLException - thrown by the ResultSet object |
setValue | public void setValue(int theValue)(Code) | | |
setValue | public void setValue(boolean theValue)(Code) | | |
Methods inherited from org.apache.derby.iapi.types.NumberDataType | final public NumberDataValue absolute(NumberDataValue result) throws StandardException(Code)(Java Doc) final public int compare(DataValueDescriptor arg) throws StandardException(Code)(Java Doc) final public boolean compare(int op, DataValueDescriptor other, boolean orderedNulls, boolean unknownRV) throws StandardException(Code)(Java Doc) public NumberDataValue divide(NumberDataValue dividend, NumberDataValue divisor, NumberDataValue result) throws StandardException(Code)(Java Doc) public NumberDataValue divide(NumberDataValue dividend, NumberDataValue divisor, NumberDataValue result, int scale) throws StandardException(Code)(Java Doc) public int getDecimalValuePrecision()(Code)(Java Doc) public int getDecimalValueScale()(Code)(Java Doc) abstract protected boolean isNegative()(Code)(Java Doc) public NumberDataValue minus(NumberDataValue left, NumberDataValue right, NumberDataValue result) throws StandardException(Code)(Java Doc) public NumberDataValue mod(NumberDataValue dividend, NumberDataValue divisor, NumberDataValue result) throws StandardException(Code)(Java Doc) public static double normalizeDOUBLE(double v) throws StandardException(Code)(Java Doc) public static float normalizeREAL(float v) throws StandardException(Code)(Java Doc) public static float normalizeREAL(double v) throws StandardException(Code)(Java Doc) final protected boolean objectNull(Object o)(Code)(Java Doc) public NumberDataValue plus(NumberDataValue addend1, NumberDataValue addend2, NumberDataValue result) throws StandardException(Code)(Java Doc) public void setBigDecimal(Number bigDecimal) throws StandardException(Code)(Java Doc) void setObject(Object theValue) throws StandardException(Code)(Java Doc) public void setValue(short theValue) throws StandardException(Code)(Java Doc) public void setValue(byte theValue) throws StandardException(Code)(Java Doc) public void setValue(Number theValue) throws StandardException(Code)(Java Doc) public NumberDataValue sqrt(NumberDataValue result) throws StandardException(Code)(Java Doc) abstract protected int typeCompare(DataValueDescriptor arg) throws StandardException(Code)(Java Doc) public int typeToBigDecimal()(Code)(Java Doc)
|
Methods inherited from org.apache.derby.iapi.types.DataType | public void checkHostVariable(int declaredLength) throws StandardException(Code)(Java Doc) public Object cloneObject()(Code)(Java Doc) public DataValueDescriptor coalesce(DataValueDescriptor[] argumentsList, DataValueDescriptor returnValue) throws StandardException(Code)(Java Doc) public boolean compare(int op, DataValueDescriptor other, boolean orderedNulls, boolean unknownRV) throws StandardException(Code)(Java Doc) final protected StandardException dataTypeConversion(String targetType)(Code)(Java Doc) public BooleanDataValue equals(DataValueDescriptor left, DataValueDescriptor right) throws StandardException(Code)(Java Doc) public boolean equals(Object other)(Code)(Java Doc) protected static int flip(int operator)(Code)(Java Doc) void genericSetObject(Object theValue) throws StandardException(Code)(Java Doc) public boolean getBoolean() throws StandardException(Code)(Java Doc) public byte getByte() throws StandardException(Code)(Java Doc) public byte[] getBytes() throws StandardException(Code)(Java Doc) public Date getDate(Calendar cal) throws StandardException(Code)(Java Doc) public double getDouble() throws StandardException(Code)(Java Doc) public float getFloat() throws StandardException(Code)(Java Doc) public int getInt() throws StandardException(Code)(Java Doc) public long getLong() throws StandardException(Code)(Java Doc) protected String getNationalString(LocaleFinder localeFinder) throws StandardException(Code)(Java Doc) public Object getObject() throws StandardException(Code)(Java Doc) public short getShort() throws StandardException(Code)(Java Doc) public InputStream getStream() throws StandardException(Code)(Java Doc) public Time getTime(Calendar cal) throws StandardException(Code)(Java Doc) public Timestamp getTimestamp(Calendar cal) throws StandardException(Code)(Java Doc) public String getTraceString() throws StandardException(Code)(Java Doc) String getTypeName(String className)(Code)(Java Doc) public BooleanDataValue greaterOrEquals(DataValueDescriptor left, DataValueDescriptor right) throws StandardException(Code)(Java Doc) public BooleanDataValue greaterThan(DataValueDescriptor left, DataValueDescriptor right) throws StandardException(Code)(Java Doc) public BooleanDataValue in(DataValueDescriptor left, DataValueDescriptor[] inList, boolean orderedList) throws StandardException(Code)(Java Doc) final protected StandardException invalidFormat()(Code)(Java Doc) final public BooleanDataValue isNotNull()(Code)(Java Doc) final public BooleanDataValue isNullOp()(Code)(Java Doc) public BooleanDataValue lessOrEquals(DataValueDescriptor left, DataValueDescriptor right) throws StandardException(Code)(Java Doc) public BooleanDataValue lessThan(DataValueDescriptor left, DataValueDescriptor right) throws StandardException(Code)(Java Doc) public void normalize(DataTypeDescriptor desiredType, DataValueDescriptor source) throws StandardException(Code)(Java Doc) public BooleanDataValue notEquals(DataValueDescriptor left, DataValueDescriptor right) throws StandardException(Code)(Java Doc) final protected StandardException outOfRange()(Code)(Java Doc) public void setBigDecimal(Number bigDecimal) throws StandardException(Code)(Java Doc) protected void setFrom(DataValueDescriptor dvd) throws StandardException(Code)(Java Doc) public void setInto(PreparedStatement ps, int position) throws SQLException, StandardException(Code)(Java Doc) public void setInto(ResultSet rs, int position) throws SQLException, StandardException(Code)(Java Doc) void setObject(Object theValue) throws StandardException(Code)(Java Doc) public void setObjectForCast(Object theValue, boolean instanceOfResultType, String resultTypeClassName) throws StandardException(Code)(Java Doc) public void setToNull()(Code)(Java Doc) public void setValue(Time theValue) throws StandardException(Code)(Java Doc) public void setValue(Time theValue, Calendar cal) throws StandardException(Code)(Java Doc) public void setValue(Timestamp theValue) throws StandardException(Code)(Java Doc) public void setValue(Timestamp theValue, Calendar cal) throws StandardException(Code)(Java Doc) public void setValue(Date theValue) throws StandardException(Code)(Java Doc) public void setValue(Date theValue, Calendar cal) throws StandardException(Code)(Java Doc) public void setValue(String theValue) throws StandardException(Code)(Java Doc) public void setValue(int theValue) throws StandardException(Code)(Java Doc) public void setValue(double theValue) throws StandardException(Code)(Java Doc) public void setValue(float theValue) throws StandardException(Code)(Java Doc) public void setValue(short theValue) throws StandardException(Code)(Java Doc) public void setValue(long theValue) throws StandardException(Code)(Java Doc) public void setValue(byte theValue) throws StandardException(Code)(Java Doc) public void setValue(boolean theValue) throws StandardException(Code)(Java Doc) public void setValue(byte[] theValue) throws StandardException(Code)(Java Doc) final public void setValue(DataValueDescriptor dvd) throws StandardException(Code)(Java Doc) public void setValue(InputStream theStream, int valueLength) throws StandardException(Code)(Java Doc) public void throwLangSetMismatch(Object value) throws StandardException(Code)(Java Doc) void throwLangSetMismatch(String argTypeName) throws StandardException(Code)(Java Doc) public int typePrecedence()(Code)(Java Doc) public int typeToBigDecimal() throws StandardException(Code)(Java Doc)
|
|
|