com.informix.jdbc

## Class IfxObject

- java.lang.Object
- - com.informix.jdbc.IfxObject

Direct Known Subclasses:
  IfxBigInt, IfxBlob, IfxBSONObject, IfxChar, IfxComplex, IfxDate, IfxDateTime, IfxDecimal, IfxFloat, IfxInt8, IfxInteger, IfxIntervalDF, IfxIntervalYM, IfxShort, IfxSmallFloat, IfxSmBlob, IfxString, IfxVarChar

    public abstract class IfxObject
    extends java.lang.Object

### Field Summary

Fields
`protected IfxConnection` `conn`
`protected int` `encodedLength`
`protected int` `extendedID`
`protected java.lang.String` `extendedName`
`protected java.lang.String` `extendedOwner`
`protected int` `ifxType`
`protected boolean` `isNull`
`protected int` `jdbcType`
`protected int` `sourceType`
`protected Trace` `trace`
`protected java.util.Map<java.lang.String,java.lang.Class<?>>` `typeMap`
`protected boolean` `used_in_update`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `clear()` Clear the instance states
`void` `clearWarning()` Reset all warnings.
`boolean` `equals(java.lang.Object other)` Find out whether two objects are equal.
`void` `fromAsciiStream(java.io.InputStream fin, int length)`
`void` `fromAsciiStream(java.io.InputStream fin, long length)`
`void` `fromBinaryStream(java.io.InputStream fin, int length)`
`void` `fromBinaryStream(java.io.InputStream fin, long length)`
`void` `fromBlob(java.sql.Blob blob)`
`void` `fromBoolean(boolean b)`
`void` `fromBoolean(java.lang.Boolean b)`
`void` `fromByte(byte b)`
`void` `fromByte(java.lang.Byte B)`
`void` `fromBytes(byte[] b)`
`void` `fromCharacterStream(java.io.Reader reader, int length)`
`void` `fromCharacterStream(java.io.Reader reader, long length)`
`void` `fromClob(java.sql.Clob clob)`
`void` `fromDate(java.sql.Date D)`
`void` `fromDecimal(java.math.BigDecimal B)`
`void` `fromDecimal(java.math.BigDecimal B, int scale)`
`void` `fromDouble(double d)`
`void` `fromDouble(java.lang.Double D)`
`void` `fromFloat(float f)`
`void` `fromFloat(java.lang.Float F)`
`void` `fromIfx(byte[] b)`
`void` `fromIfx(byte[] b, int offset, int length)`
`void` `fromIfx(byte[] b, int offset, int length, short prec)`
`void` `fromIfx(byte[] b, int offset, int length, java.lang.String dbEnc)`
`void` `fromIfx(byte[] b, short prec)`
`void` `fromIfx(byte[] b, java.lang.String dbEnc)`
`void` `fromInputStream(java.io.InputStream fin, int length)`
`void` `fromInputStream(java.io.InputStream fin, long length)`
`void` `fromInt(int i)`
`void` `fromInt(java.lang.Integer I)`
`void` `fromIntervalDF(IntervalDF I)`
`void` `fromIntervalYM(IntervalYM I)`
`void` `fromLong(long l)`
`void` `fromLong(java.lang.Long L)`
`void` `fromNClob(java.sql.NClob nclob)`
`void` `fromObject(java.lang.Object obj)` Initialize IfxObject with the value in obj.
`void` `fromObject(java.lang.Object obj, int scale)` Same as above but for BigDecimal, we can have the additional scale parameter.
`void` `fromObject(java.lang.Object obj, java.lang.String name)` Same as above but for Collections, we can have the additional the collection type definition as a parameter.
`void` `fromRowId(java.sql.RowId rowid)`
`void` `fromShort(short s)`
`void` `fromShort(java.lang.Short S)`
`void` `fromSQLXML(java.sql.SQLXML sqlXML)`
`void` `fromString(java.lang.String newval)`
`void` `fromString(java.lang.String newval, boolean trimSpaces)`
`void` `fromTime(java.sql.Time T)`
`void` `fromTimestamp(java.sql.Timestamp T)`
`boolean` `get_used_in_update()`
`short` `getEncodedLength()` Default method for getting encoded length.
`java.sql.DataTruncation` `getWarning()` IfxXXX() class will set data truncation warning.
`boolean` `isNull()` Finds out whether it is null.
`void` `nullify()` Make the value null.
`void` `set_used_in_update(boolean setval)`
`void` `setConnection(IfxConnection conn)` GENERIC
`void` `setExtendedTypeName(java.lang.String name)` Set the extended type name for this object.
`void` `setIfxType(int ifxType)` Set Informix SQL type for this object
`void` `setTypeMap(java.util.Map<java.lang.String,java.lang.Class<?>> map)`
`java.io.InputStream` `toAsciiStream()`
`java.io.InputStream` `toBinaryStream()`
`java.sql.Blob` `toBlob()`
`boolean` `toBoolean()`
`byte` `toByte()`
`byte[]` `toBytes()`
`java.io.Reader` `toCharacterStream()`
`java.sql.Clob` `toClob()`
`java.sql.Date` `toDate()`
`java.math.BigDecimal` `toDecimal()`
`double` `toDouble()`
`float` `toFloat()`
`byte[]` `toIfx()`
`IfxBSONObject` `toIfxBSONObject()`
`byte[]` `toIfxTuple()`
`java.io.InputStream` `toInputStream()`
`int` `toInt()`
`Interval` `toInterval()`
`IntervalDF` `toIntervalDF()`
`IntervalYM` `toIntervalYM()`
`long` `toLong()`
`java.sql.NClob` `toNClob()`
`java.lang.Object` `toObject()`
`java.lang.Object` `toObject(boolean fromComplexType)`
`java.sql.RowId` `toRowId()`
`short` `toShort()`
`java.sql.SQLXML` `toSQLXML()`
`java.lang.String` `toString()` Convert to string.
`java.sql.Time` `toTime()`
`java.sql.Timestamp` `toTimestamp()`
`java.lang.String` `toUnloadString()` Convert to string format which is compatible with format generated by SQL unload command.
`void` `unnullify()` Mark the value non-null.

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Field Detail

#### conn

    protected IfxConnection conn

#### isNull

    protected boolean isNull

#### trace

    protected Trace trace

#### ifxType

    protected int ifxType

#### extendedName

    protected java.lang.String extendedName

#### extendedOwner

    protected java.lang.String extendedOwner

#### extendedID

    protected int extendedID

#### encodedLength

    protected int encodedLength

#### sourceType

    protected int sourceType

#### typeMap

    protected java.util.Map<java.lang.String,java.lang.Class<?>> typeMap

#### used_in_update

    protected boolean used_in_update

#### jdbcType

    protected int jdbcType

### Method Detail

#### fromObject

    public void fromObject(java.lang.Object obj)
                    throws java.sql.SQLException

Initialize IfxObject with the value in obj. It does the data conversion automatically from the obj type to IfxObject type. For example: In IfxInteger(), fromObject(Object obj) { if (obj instanceof Short) fromShort((Short) obj); }

Parameters:
  `obj` - Convert the data value from obj to IfxObject
Throws:
  `java.sql.SQLException`

#### fromObject

    public void fromObject(java.lang.Object obj,
                           int scale)
                    throws java.sql.SQLException

Same as above but for BigDecimal, we can have the additional scale parameter.

Throws:
  `java.sql.SQLException`

#### fromObject

    public void fromObject(java.lang.Object obj,
                           java.lang.String name)
                    throws java.sql.SQLException

Same as above but for Collections, we can have the additional the collection type definition as a parameter.

Throws:
  `java.sql.SQLException`

#### setConnection

    public void setConnection(IfxConnection conn)
                       throws java.sql.SQLException

GENERIC

Throws:
  `java.sql.SQLException`

#### setTypeMap

    public void setTypeMap(java.util.Map<java.lang.String,java.lang.Class<?>> map)

#### isNull

    public final boolean isNull()

Finds out whether it is null.

Returns:
  true if it is null, false otherwise

#### nullify

    public final void nullify()

Make the value null.

#### unnullify

    public final void unnullify()

Mark the value non-null.

#### setIfxType

    public void setIfxType(int ifxType)

Set Informix SQL type for this object

#### setExtendedTypeName

    public void setExtendedTypeName(java.lang.String name)

Set the extended type name for this object. Applicable only to 9.x extended types

#### clear

    public void clear()

Clear the instance states

#### getEncodedLength

    public short getEncodedLength()

Default method for getting encoded length.

#### getWarning

    public java.sql.DataTruncation getWarning()

IfxXXX() class will set data truncation warning. This is the default method to get the warning.

#### clearWarning

    public void clearWarning()

Reset all warnings.

#### equals

    public boolean equals(java.lang.Object other)

Find out whether two objects are equal.

Overrides:
  `equals` in class `java.lang.Object`
Parameters:
  `other` - the other object to compare with
Returns:
  true if the objects are equal

#### toString

    public java.lang.String toString()

Convert to string.

Overrides:
  `toString` in class `java.lang.Object`
Returns:
  the converted String object, or null on error

#### toUnloadString

    public java.lang.String toUnloadString()
                                    throws java.sql.SQLException

Convert to string format which is compatible with format generated by SQL unload command.

Returns:
  the converted String object, or null on error
Throws:
  `java.sql.SQLException`

#### toInt

    public int toInt()
              throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### toDecimal

    public java.math.BigDecimal toDecimal()
                                   throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### toByte

    public byte toByte()
                throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### toBytes

    public byte[] toBytes()
                   throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### toBoolean

    public boolean toBoolean()
                      throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### toDate

    public java.sql.Date toDate()
                         throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### toFloat

    public float toFloat()
                  throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### toLong

    public long toLong()
                throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### toShort

    public short toShort()
                  throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### toTime

    public java.sql.Time toTime()
                         throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### toDouble

    public double toDouble()
                    throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### toTimestamp

    public java.sql.Timestamp toTimestamp()
                                   throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### toInputStream

    public java.io.InputStream toInputStream()
                                      throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### toAsciiStream

    public java.io.InputStream toAsciiStream()
                                      throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### toBinaryStream

    public java.io.InputStream toBinaryStream()
                                       throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### toCharacterStream

    public java.io.Reader toCharacterStream()
                                     throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### toBlob

    public java.sql.Blob toBlob()
                         throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### toClob

    public java.sql.Clob toClob()
                         throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### toIfx

    public byte[] toIfx()
                 throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### toIfxTuple

    public byte[] toIfxTuple()
                      throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### toObject

    public java.lang.Object toObject()
                              throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### toObject

    public java.lang.Object toObject(boolean fromComplexType)
                              throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### toInterval

    public Interval toInterval()
                        throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### toIntervalYM

    public IntervalYM toIntervalYM()
                            throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### toIntervalDF

    public IntervalDF toIntervalDF()
                            throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### fromIfx

    public void fromIfx(byte[] b,
                        java.lang.String dbEnc)
                 throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### fromIfx

    public void fromIfx(byte[] b)
                 throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### fromIfx

    public void fromIfx(byte[] b,
                        int offset,
                        int length)
                 throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### fromIfx

    public void fromIfx(byte[] b,
                        int offset,
                        int length,
                        java.lang.String dbEnc)
                 throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### fromIfx

    public void fromIfx(byte[] b,
                        short prec)
                 throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### fromIfx

    public void fromIfx(byte[] b,
                        int offset,
                        int length,
                        short prec)
                 throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### fromInt

    public void fromInt(int i)
                 throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### fromInt

    public void fromInt(java.lang.Integer I)
                 throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### fromString

    public void fromString(java.lang.String newval)
                    throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### fromString

    public void fromString(java.lang.String newval,
                           boolean trimSpaces)
                    throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### fromDecimal

    public void fromDecimal(java.math.BigDecimal B)
                     throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### fromDecimal

    public void fromDecimal(java.math.BigDecimal B,
                            int scale)
                     throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### fromByte

    public void fromByte(byte b)
                  throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### fromByte

    public void fromByte(java.lang.Byte B)
                  throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### fromBytes

    public void fromBytes(byte[] b)
                   throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### fromBoolean

    public void fromBoolean(boolean b)
                     throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### fromBoolean

    public void fromBoolean(java.lang.Boolean b)
                     throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### fromDate

    public void fromDate(java.sql.Date D)
                  throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### fromFloat

    public void fromFloat(float f)
                   throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### fromFloat

    public void fromFloat(java.lang.Float F)
                   throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### fromLong

    public void fromLong(long l)
                  throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### fromLong

    public void fromLong(java.lang.Long L)
                  throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### fromShort

    public void fromShort(short s)
                   throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### fromShort

    public void fromShort(java.lang.Short S)
                   throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### fromTime

    public void fromTime(java.sql.Time T)
                  throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### fromDouble

    public void fromDouble(double d)
                    throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### fromDouble

    public void fromDouble(java.lang.Double D)
                    throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### fromTimestamp

    public void fromTimestamp(java.sql.Timestamp T)
                       throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### fromAsciiStream

    public void fromAsciiStream(java.io.InputStream fin,
                                int length)
                         throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### fromAsciiStream

    public void fromAsciiStream(java.io.InputStream fin,
                                long length)
                         throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### fromBinaryStream

    public void fromBinaryStream(java.io.InputStream fin,
                                 int length)
                          throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### fromBinaryStream

    public void fromBinaryStream(java.io.InputStream fin,
                                 long length)
                          throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### fromInputStream

    public void fromInputStream(java.io.InputStream fin,
                                int length)
                         throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### fromInputStream

    public void fromInputStream(java.io.InputStream fin,
                                long length)
                         throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### fromCharacterStream

    public void fromCharacterStream(java.io.Reader reader,
                                    int length)
                             throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### fromCharacterStream

    public void fromCharacterStream(java.io.Reader reader,
                                    long length)
                             throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### fromIntervalYM

    public void fromIntervalYM(IntervalYM I)
                        throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### fromIntervalDF

    public void fromIntervalDF(IntervalDF I)
                        throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### fromClob

    public void fromClob(java.sql.Clob clob)
                  throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### fromBlob

    public void fromBlob(java.sql.Blob blob)
                  throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### set_used_in_update

    public final void set_used_in_update(boolean setval)

#### get_used_in_update

    public final boolean get_used_in_update()

#### toIfxBSONObject

    public IfxBSONObject toIfxBSONObject()
                                  throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### fromRowId

    public void fromRowId(java.sql.RowId rowid)
                   throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### fromNClob

    public void fromNClob(java.sql.NClob nclob)
                   throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### fromSQLXML

    public void fromSQLXML(java.sql.SQLXML sqlXML)
                    throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### toRowId

    public java.sql.RowId toRowId()
                           throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### toNClob

    public java.sql.NClob toNClob()
                           throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

#### toSQLXML

    public java.sql.SQLXML toSQLXML()
                             throws java.sql.SQLException

Throws:
  `java.sql.SQLException`