Build 1.0_r1(from source)

android.database
Class BulkCursorToCursorAdaptor

java.lang.Object
  extended by android.database.AbstractCursor
      extended by android.database.AbstractWindowedCursor
          extended by android.database.BulkCursorToCursorAdaptor
All Implemented Interfaces:
CrossProcessCursor, Cursor

public final class BulkCursorToCursorAdaptor
extends AbstractWindowedCursor

Adapts an IBulkCursor to a Cursor for use in the local process.


Nested Class Summary
 
Nested classes/interfaces inherited from class android.database.AbstractCursor
AbstractCursor.SelfContentObserver
 
Field Summary
 
Fields inherited from class android.database.AbstractWindowedCursor
mWindow
 
Fields inherited from class android.database.AbstractCursor
mClosed, mContentObservable, mContentResolver, mCurrentRowID, mDataSetObservable, mPos, mRowIdColumnIndex, mUpdatedRows
 
Constructor Summary
BulkCursorToCursorAdaptor()
           
 
Method Summary
 void close()
          Closes the Cursor, releasing all of its resources and making it completely invalid.
 boolean commitUpdates(Map<? extends Long,? extends Map<String,Object>> additionalValues)
          Deprecated.  
 void deactivate()
          Deactivates the Cursor, making all calls on it fail until Cursor.requery() is called.
 boolean deleteRow()
          Deprecated.  
 String[] getColumnNames()
          Returns a string array holding the names of all of the columns in the result set in the order in which they were listed in the result.
 int getCount()
          Returns the numbers of rows in the cursor.
 Bundle getExtras()
          Returns a bundle of extra values.
 IContentObserver getObserver()
          Gets a SelfDataChangeOberserver that can be sent to a remote process to receive change notifications over IPC.
 boolean onMove(int oldPosition, int newPosition)
          This function is called every time the cursor is successfully scrolled to a new position, giving the subclass a chance to update any state it may have.
 boolean requery()
          Performs the query that created the cursor again, refreshing its contents.
 Bundle respond(Bundle extras)
          This is an out-of-band way for the the user of a cursor to communicate with the cursor.
 void set(IBulkCursor bulkCursor)
           
 
Methods inherited from class android.database.AbstractWindowedCursor
checkPosition, copyStringToBuffer, getBlob, getDouble, getFloat, getInt, getLong, getShort, getString, getWindow, hasWindow, isBlob, isNull, setWindow
 
Methods inherited from class android.database.AbstractCursor
abortUpdates, commitUpdates, deactivateInternal, fillWindow, finalize, getColumnCount, getColumnIndex, getColumnIndexOrThrow, getColumnName, getPosition, getUpdatedField, getWantsAllOnMoveCalls, hasUpdates, isAfterLast, isBeforeFirst, isClosed, isFieldUpdated, isFirst, isLast, move, moveToFirst, moveToLast, moveToNext, moveToPosition, moveToPrevious, onChange, registerContentObserver, registerDataSetObserver, setNotificationUri, supportsUpdates, unregisterContentObserver, unregisterDataSetObserver, update, updateBlob, updateDouble, updateFloat, updateInt, updateLong, updateShort, updateString, updateToNull
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BulkCursorToCursorAdaptor

public BulkCursorToCursorAdaptor()
Method Detail

set

public void set(IBulkCursor bulkCursor)

getObserver

public IContentObserver getObserver()
Gets a SelfDataChangeOberserver that can be sent to a remote process to receive change notifications over IPC.

Returns:
A SelfContentObserver hooked up to this Cursor

getCount

public int getCount()
Description copied from interface: Cursor
Returns the numbers of rows in the cursor.

Specified by:
getCount in interface Cursor
Specified by:
getCount in class AbstractCursor
Returns:
the number of rows in the cursor.

onMove

public boolean onMove(int oldPosition,
                      int newPosition)
Description copied from class: AbstractCursor
This function is called every time the cursor is successfully scrolled to a new position, giving the subclass a chance to update any state it may have. If it returns false the move function will also do so and the cursor will scroll to the beforeFirst position.

Specified by:
onMove in interface CrossProcessCursor
Overrides:
onMove in class AbstractCursor
Parameters:
oldPosition - the position that we're moving from
newPosition - the position that we're moving to
Returns:
true if the move is successful, false otherwise

deactivate

public void deactivate()
Description copied from interface: Cursor
Deactivates the Cursor, making all calls on it fail until Cursor.requery() is called. Inactive Cursors use fewer resources than active Cursors. Calling Cursor.requery() will make the cursor active again.

Specified by:
deactivate in interface Cursor
Overrides:
deactivate in class AbstractCursor

close

public void close()
Description copied from interface: Cursor
Closes the Cursor, releasing all of its resources and making it completely invalid. Unlike Cursor.deactivate() a call to Cursor.requery() will not make the Cursor valid again.

Specified by:
close in interface Cursor
Overrides:
close in class AbstractCursor

requery

public boolean requery()
Description copied from interface: Cursor
Performs the query that created the cursor again, refreshing its contents. This may be done at any time, including after a call to Cursor.deactivate().

Specified by:
requery in interface Cursor
Overrides:
requery in class AbstractCursor
Returns:
true if the requery succeeded, false if not, in which case the cursor becomes invalid.

deleteRow

public boolean deleteRow()
Deprecated. 

Description copied from interface: Cursor
Removes the row at the current cursor position from the underlying data store. After this method returns the cursor will be pointing to the row after the row that is deleted. This has the side effect of decrementing the result of count() by one.

The query must have the row ID column in its selection, otherwise this call will fail.

Specified by:
deleteRow in interface Cursor
Overrides:
deleteRow in class AbstractCursor
Returns:
whether the record was successfully deleted.

getColumnNames

public String[] getColumnNames()
Description copied from interface: Cursor
Returns a string array holding the names of all of the columns in the result set in the order in which they were listed in the result.

Specified by:
getColumnNames in interface Cursor
Specified by:
getColumnNames in class AbstractCursor
Returns:
the names of the columns returned in this query.

commitUpdates

public boolean commitUpdates(Map<? extends Long,? extends Map<String,Object>> additionalValues)
Deprecated. 

Description copied from interface: Cursor
Atomically commits all updates to the backing store, as well as the updates included in values. After completion, this method leaves the data in an inconsistent state and you should call Cursor.requery() before reading data from the cursor again.

Specified by:
commitUpdates in interface Cursor
Overrides:
commitUpdates in class AbstractCursor
Parameters:
additionalValues - A map from row IDs to Maps associating column names with updated values. A null value indicates the field should be removed.
Returns:
whether the operation succeeded.

getExtras

public Bundle getExtras()
Description copied from interface: Cursor
Returns a bundle of extra values. This is an optional way for cursors to provide out-of-band metadata to their users. One use of this is for reporting on the progress of network requests that are required to fetch data for the cursor.

These values may only change when requery is called.

Specified by:
getExtras in interface Cursor
Overrides:
getExtras in class AbstractCursor
Returns:
cursor-defined values, or Bundle.EMTPY if there are no values. Never null.

respond

public Bundle respond(Bundle extras)
Description copied from interface: Cursor
This is an out-of-band way for the the user of a cursor to communicate with the cursor. The structure of each bundle is entirely defined by the cursor.

One use of this is to tell a cursor that it should retry its network request after it reported an error.

Specified by:
respond in interface Cursor
Overrides:
respond in class AbstractCursor
Parameters:
extras - extra values, or Bundle.EMTPY. Never null.
Returns:
extra values, or Bundle.EMTPY. Never null.

Build 1.0_r1(from source)

Please submit a feedback, bug or feature