net.rim.device.api.database
Class Row

java.lang.Object
  extended by net.rim.device.api.database.Row

public class Row
extends Object

A collection of variables and values, associated by column names, that is used to define cell values in columns and rows.

Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 5.0.0

Field Summary
Category: Signed static int SQL_COL_TYPE_BLOB
          Indicates a blob value.
Category: Signed static int SQL_COL_TYPE_FLOAT
          Indicates a float value (64-bit IEEE floating point number).
Category: Signed static int SQL_COL_TYPE_INTEGER
          Indicates an integer value (64-bit signed integer).
Category: Signed static int SQL_COL_TYPE_NULL
          Indicates a null value.
Category: Signed static int SQL_COL_TYPE_TEXT
          Indicates a text value.
 
Method Summary
Category: Signed  byte[] getBlobBytes(int index)
          Retrieves a blob column value by index as a byte array.
Category: Signed  InputStream getBlobStream(int index)
          Retrieves a blob column value by index as an InputStream.
Category: Signed  boolean getBoolean(int index)
          Retrieves a boolean column value by index.
Category: Signed  byte getByte(int index)
          Retrieves a byte column value by index.
Category: Signed  int getColumnIndex(String name)
          Computes a column index for a given column name.
Category: Signed  String[] getColumnNames()
          Returns all column names in a row.
Category: Signed  int[] getDatabaseColumnTypes()
          Returns the column types in a row.
Category: Signed  double getDouble(int index)
          Retrieves a double column value by index.
Category: Signed  float getFloat(int index)
          Retrieves a float column value by index.
Category: Signed  int getInteger(int index)
          Retrieves an int column value by index.
Category: Signed  long getLong(int index)
          Retrieves a long column value by index.
Category: Signed  Object getObject(int index)
          Retrieves a column value as it is represented in the database.
Category: Signed  short getShort(int index)
          Retrieves a short column value by index.
Category: Signed  String getString(int index)
          Retrieves a String column value by index.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Field Detail

SQL_COL_TYPE_INTEGER

public static final int SQL_COL_TYPE_INTEGER
Indicates an integer value (64-bit signed integer).

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 7.0.0

SQL_COL_TYPE_FLOAT

public static final int SQL_COL_TYPE_FLOAT
Indicates a float value (64-bit IEEE floating point number).

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 7.0.0

SQL_COL_TYPE_TEXT

public static final int SQL_COL_TYPE_TEXT
Indicates a text value.

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 7.0.0

SQL_COL_TYPE_BLOB

public static final int SQL_COL_TYPE_BLOB
Indicates a blob value.

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 7.0.0

SQL_COL_TYPE_NULL

public static final int SQL_COL_TYPE_NULL
Indicates a null value.

See Also:
Constant Field Values
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 7.0.0


Method Detail

getColumnNames

public String[] getColumnNames()
Returns all column names in a row.

Returns:
Enumeration of all column names in the row.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 5.0.0

getDatabaseColumnTypes

public int[] getDatabaseColumnTypes()
Returns the column types in a row.

The values returned by this method are native SQLite database types and may be different from Java types. See the SQLite documentation for information about SQLite types.

Returns:
Array with column types. Each element will correspond to one of SQL_COL_TYPE_INTEGER, SQL_COL_TYPE_FLOAT, SQL_COL_TYPE_BLOB, SQL_COL_TYPE_TEXT, or SQL_COL_TYPE_NULL.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 7.0.0

getColumnIndex

public int getColumnIndex(String name)
Computes a column index for a given column name.

Parameters:
name - Column name.
Returns:
Column index, or -1 if the column name could not be found.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 5.0.0

getInteger

public int getInteger(int index)
               throws DataTypeException
Retrieves an int column value by index.

Parameters:
index - Index of the column.
Returns:
int Value of the column.
Throws:
DataTypeException - if there is a data type mismatch.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 5.0.0

getShort

public short getShort(int index)
               throws DataTypeException
Retrieves a short column value by index.

Parameters:
index - Index of the column.
Returns:
Value of the column.
Throws:
DataTypeException - if there is a data type mismatch.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 5.0.0

getByte

public byte getByte(int index)
             throws DataTypeException
Retrieves a byte column value by index.

Parameters:
index - Index of the column.
Returns:
Value of the column.
Throws:
DataTypeException - if there is a data type mismatch.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 5.0.0

getString

public String getString(int index)
                 throws DataTypeException
Retrieves a String column value by index.

Parameters:
index - Index of the column.
Returns:
Value of the column.
Throws:
DataTypeException - if there is a data type mismatch.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 5.0.0

getLong

public long getLong(int index)
             throws DataTypeException
Retrieves a long column value by index.

Parameters:
index - Index of the column.
Returns:
Value of the column.
Throws:
DataTypeException - if there is a data type mismatch.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 5.0.0

getBoolean

public boolean getBoolean(int index)
                   throws DataTypeException
Retrieves a boolean column value by index.

Parameters:
index - Index of the column.
Returns:
Value of the column.
Throws:
DataTypeException - if there is a data type mismatch.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 5.0.0

getFloat

public float getFloat(int index)
               throws DataTypeException
Retrieves a float column value by index.

Parameters:
index - Index of the column.
Returns:
Value of the column.
Throws:
DataTypeException - if there is a data type mismatch.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 5.0.0

getDouble

public double getDouble(int index)
                 throws DataTypeException
Retrieves a double column value by index.

Parameters:
index - Index of the column.
Returns:
Value of the column.
Throws:
DataTypeException - if there is a data type mismatch.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 5.0.0

getBlobStream

public InputStream getBlobStream(int index)
                          throws DataTypeException
Retrieves a blob column value by index as an InputStream.

Parameters:
index - Index of the column.
Returns:
Value of the column.
Throws:
DataTypeException - if there is a data type mismatch.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 5.0.0

getBlobBytes

public byte[] getBlobBytes(int index)
                    throws DataTypeException
Retrieves a blob column value by index as a byte array.

Parameters:
index - Index of the column.
Returns:
Value of the column.
Throws:
DataTypeException - if there is a data type mismatch.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 5.0.0

getObject

public Object getObject(int index)
                 throws DataTypeException
Retrieves a column value as it is represented in the database.

The element returned is database-dependent. Numeric values may be represented by one or two internal data structures. It is advised to check the class of the returned object through the instanceof directive.

Parameters:
index - The index of the column.
Returns:
Value The column value, as a Java object.
Throws:
DataTypeException
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 5.0.0





Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal