com.healthmarketscience.jackcess.impl
Class RowImpl

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<K,V>
          extended by java.util.LinkedHashMap<String,Object>
              extended by com.healthmarketscience.jackcess.impl.RowImpl
All Implemented Interfaces:
Row, Serializable, Cloneable, Map<String,Object>

public class RowImpl
extends LinkedHashMap<String,Object>
implements Row

A row of data as column->value pairs.

Note that the AbstractMap.equals(java.lang.Object) and AbstractMap.hashCode() methods work on the row contents only (i.e. they ignore the id).

Author:
James Ahlborn
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
RowImpl(Row row)
           
RowImpl(RowIdImpl id)
           
RowImpl(RowIdImpl id, int expectedSize)
           
 
Method Summary
 BigDecimal getBigDecimal(String name)
          Convenience method which gets the value for the row with the given name, casting it to a BigDecimal (DataTypes MONEY, NUMERIC).
 OleBlob getBlob(String name)
          Convenience method which gets the value for the row with the given name, converting it to an OleBlob (DataTypes OLE).
 Boolean getBoolean(String name)
          Convenience method which gets the value for the row with the given name, casting it to a Boolean (DataType BOOLEAN).
 Byte getByte(String name)
          Convenience method which gets the value for the row with the given name, casting it to a Byte (DataType BYTE).
 byte[] getBytes(String name)
          Convenience method which gets the value for the row with the given name, casting it to a byte[] (DataTypes BINARY, OLE).
 Date getDate(String name)
          Convenience method which gets the value for the row with the given name, casting it to a Date (DataType SHORT_DATE_TIME).
 Double getDouble(String name)
          Convenience method which gets the value for the row with the given name, casting it to a Double (DataType DOUBLE).
 Float getFloat(String name)
          Convenience method which gets the value for the row with the given name, casting it to a Float (DataType FLOAT).
 ComplexValueForeignKey getForeignKey(String name)
          Convenience method which gets the value for the row with the given name, casting it to a ComplexValueForeignKey (DataType COMPLEX_TYPE).
 RowIdImpl getId()
           
 Integer getInt(String name)
          Convenience method which gets the value for the row with the given name, casting it to a Integer (DataType LONG).
 Short getShort(String name)
          Convenience method which gets the value for the row with the given name, casting it to a Short (DataType INT).
 String getString(String name)
          Convenience method which gets the value for the row with the given name, casting it to a String (DataTypes TEXT, MEMO, GUID).
 String toString()
           
 
Methods inherited from class java.util.LinkedHashMap
clear, containsValue, get
 
Methods inherited from class java.util.HashMap
clone, containsKey, entrySet, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Constructor Detail

RowImpl

public RowImpl(RowIdImpl id)

RowImpl

public RowImpl(RowIdImpl id,
               int expectedSize)

RowImpl

public RowImpl(Row row)
Method Detail

getId

public RowIdImpl getId()
Specified by:
getId in interface Row
Returns:
the id of this row

getString

public String getString(String name)
Description copied from interface: Row
Convenience method which gets the value for the row with the given name, casting it to a String (DataTypes TEXT, MEMO, GUID).

Specified by:
getString in interface Row

getBoolean

public Boolean getBoolean(String name)
Description copied from interface: Row
Convenience method which gets the value for the row with the given name, casting it to a Boolean (DataType BOOLEAN).

Specified by:
getBoolean in interface Row

getByte

public Byte getByte(String name)
Description copied from interface: Row
Convenience method which gets the value for the row with the given name, casting it to a Byte (DataType BYTE).

Specified by:
getByte in interface Row

getShort

public Short getShort(String name)
Description copied from interface: Row
Convenience method which gets the value for the row with the given name, casting it to a Short (DataType INT).

Specified by:
getShort in interface Row

getInt

public Integer getInt(String name)
Description copied from interface: Row
Convenience method which gets the value for the row with the given name, casting it to a Integer (DataType LONG).

Specified by:
getInt in interface Row

getBigDecimal

public BigDecimal getBigDecimal(String name)
Description copied from interface: Row
Convenience method which gets the value for the row with the given name, casting it to a BigDecimal (DataTypes MONEY, NUMERIC).

Specified by:
getBigDecimal in interface Row

getFloat

public Float getFloat(String name)
Description copied from interface: Row
Convenience method which gets the value for the row with the given name, casting it to a Float (DataType FLOAT).

Specified by:
getFloat in interface Row

getDouble

public Double getDouble(String name)
Description copied from interface: Row
Convenience method which gets the value for the row with the given name, casting it to a Double (DataType DOUBLE).

Specified by:
getDouble in interface Row

getDate

public Date getDate(String name)
Description copied from interface: Row
Convenience method which gets the value for the row with the given name, casting it to a Date (DataType SHORT_DATE_TIME).

Specified by:
getDate in interface Row

getBytes

public byte[] getBytes(String name)
Description copied from interface: Row
Convenience method which gets the value for the row with the given name, casting it to a byte[] (DataTypes BINARY, OLE).

Specified by:
getBytes in interface Row

getForeignKey

public ComplexValueForeignKey getForeignKey(String name)
Description copied from interface: Row
Convenience method which gets the value for the row with the given name, casting it to a ComplexValueForeignKey (DataType COMPLEX_TYPE).

Specified by:
getForeignKey in interface Row

getBlob

public OleBlob getBlob(String name)
                throws IOException
Description copied from interface: Row
Convenience method which gets the value for the row with the given name, converting it to an OleBlob (DataTypes OLE).

Note, the OleBlob should be closed after use.

Specified by:
getBlob in interface Row
Throws:
IOException

toString

public String toString()
Overrides:
toString in class AbstractMap<String,Object>


Copyright © 2005–2017 Health Market Science. All rights reserved.