android.database
Class AbstractCursor

java.lang.Object
  extended by android.database.AbstractCursor
All Implemented Interfaces:
CrossProcessCursor, Cursor
Direct Known Subclasses:
AbstractWindowedCursor, MatrixCursor, MergeCursor

public abstract class AbstractCursor
extends Object
implements CrossProcessCursor


Nested Class Summary
protected static class AbstractCursor.SelfContentObserver
           
 
Field Summary
protected  boolean mClosed
           
protected  ContentResolver mContentResolver
           
protected  Long mCurrentRowID
           
protected  int mPos
           
protected  int mRowIdColumnIndex
           
protected  HashMap<Long,Map<String,Object>> mUpdatedRows
           
 
Fields inherited from interface android.database.Cursor
FIELD_TYPE_BLOB, FIELD_TYPE_FLOAT, FIELD_TYPE_INTEGER, FIELD_TYPE_NULL, FIELD_TYPE_STRING
 
Constructor Summary
AbstractCursor()
           
 
Method Summary
protected  void checkPosition()
           
 void close()
           
 void copyStringToBuffer(int columnIndex, CharArrayBuffer buffer)
           
 void deactivate()
           
 void fillWindow(int position, CursorWindow window)
           
protected  void finalize()
           
 byte[] getBlob(int column)
           
 int getColumnCount()
           
 int getColumnIndex(String columnName)
           
 int getColumnIndexOrThrow(String columnName)
           
 String getColumnName(int columnIndex)
           
abstract  String[] getColumnNames()
           
abstract  int getCount()
           
abstract  double getDouble(int column)
           
 Bundle getExtras()
           
abstract  float getFloat(int column)
           
abstract  int getInt(int column)
           
abstract  long getLong(int column)
           
 Uri getNotificationUri()
           
 int getPosition()
           
abstract  short getShort(int column)
           
abstract  String getString(int column)
           
 int getType(int column)
           
protected  Object getUpdatedField(int columnIndex)
           
 boolean getWantsAllOnMoveCalls()
           
 CursorWindow getWindow()
           
 boolean isAfterLast()
           
 boolean isBeforeFirst()
           
 boolean isClosed()
           
protected  boolean isFieldUpdated(int columnIndex)
           
 boolean isFirst()
           
 boolean isLast()
           
abstract  boolean isNull(int column)
           
 boolean move(int offset)
           
 boolean moveToFirst()
           
 boolean moveToLast()
           
 boolean moveToNext()
           
 boolean moveToPosition(int position)
           
 boolean moveToPrevious()
           
protected  void onChange(boolean selfChange)
           
 boolean onMove(int oldPosition, int newPosition)
           
 void registerContentObserver(ContentObserver observer)
           
 void registerDataSetObserver(DataSetObserver observer)
           
 boolean requery()
           
 Bundle respond(Bundle extras)
           
 void setNotificationUri(ContentResolver cr, Uri notifyUri)
           
 void unregisterContentObserver(ContentObserver observer)
           
 void unregisterDataSetObserver(DataSetObserver observer)
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mUpdatedRows

protected HashMap<Long,Map<String,Object>> mUpdatedRows

mRowIdColumnIndex

protected int mRowIdColumnIndex

mPos

protected int mPos

mCurrentRowID

protected Long mCurrentRowID

mContentResolver

protected ContentResolver mContentResolver

mClosed

protected boolean mClosed
Constructor Detail

AbstractCursor

public AbstractCursor()
Method Detail

getCount

public abstract int getCount()
Specified by:
getCount in interface Cursor

getColumnNames

public abstract String[] getColumnNames()
Specified by:
getColumnNames in interface Cursor

getString

public abstract String getString(int column)
Specified by:
getString in interface Cursor

getShort

public abstract short getShort(int column)
Specified by:
getShort in interface Cursor

getInt

public abstract int getInt(int column)
Specified by:
getInt in interface Cursor

getLong

public abstract long getLong(int column)
Specified by:
getLong in interface Cursor

getFloat

public abstract float getFloat(int column)
Specified by:
getFloat in interface Cursor

getDouble

public abstract double getDouble(int column)
Specified by:
getDouble in interface Cursor

isNull

public abstract boolean isNull(int column)
Specified by:
isNull in interface Cursor

getType

public int getType(int column)
Specified by:
getType in interface Cursor

getBlob

public byte[] getBlob(int column)
Specified by:
getBlob in interface Cursor

getWindow

public CursorWindow getWindow()
Specified by:
getWindow in interface CrossProcessCursor

getColumnCount

public int getColumnCount()
Specified by:
getColumnCount in interface Cursor

deactivate

public void deactivate()
Specified by:
deactivate in interface Cursor

requery

public boolean requery()
Specified by:
requery in interface Cursor

isClosed

public boolean isClosed()
Specified by:
isClosed in interface Cursor

close

public void close()
Specified by:
close in interface Cursor

onMove

public boolean onMove(int oldPosition,
                      int newPosition)
Specified by:
onMove in interface CrossProcessCursor

copyStringToBuffer

public void copyStringToBuffer(int columnIndex,
                               CharArrayBuffer buffer)
Specified by:
copyStringToBuffer in interface Cursor

getPosition

public final int getPosition()
Specified by:
getPosition in interface Cursor

moveToPosition

public final boolean moveToPosition(int position)
Specified by:
moveToPosition in interface Cursor

fillWindow

public void fillWindow(int position,
                       CursorWindow window)
Specified by:
fillWindow in interface CrossProcessCursor

move

public final boolean move(int offset)
Specified by:
move in interface Cursor

moveToFirst

public final boolean moveToFirst()
Specified by:
moveToFirst in interface Cursor

moveToLast

public final boolean moveToLast()
Specified by:
moveToLast in interface Cursor

moveToNext

public final boolean moveToNext()
Specified by:
moveToNext in interface Cursor

moveToPrevious

public final boolean moveToPrevious()
Specified by:
moveToPrevious in interface Cursor

isFirst

public final boolean isFirst()
Specified by:
isFirst in interface Cursor

isLast

public final boolean isLast()
Specified by:
isLast in interface Cursor

isBeforeFirst

public final boolean isBeforeFirst()
Specified by:
isBeforeFirst in interface Cursor

isAfterLast

public final boolean isAfterLast()
Specified by:
isAfterLast in interface Cursor

getColumnIndex

public int getColumnIndex(String columnName)
Specified by:
getColumnIndex in interface Cursor

getColumnIndexOrThrow

public int getColumnIndexOrThrow(String columnName)
Specified by:
getColumnIndexOrThrow in interface Cursor

getColumnName

public String getColumnName(int columnIndex)
Specified by:
getColumnName in interface Cursor

registerContentObserver

public void registerContentObserver(ContentObserver observer)
Specified by:
registerContentObserver in interface Cursor

unregisterContentObserver

public void unregisterContentObserver(ContentObserver observer)
Specified by:
unregisterContentObserver in interface Cursor

registerDataSetObserver

public void registerDataSetObserver(DataSetObserver observer)
Specified by:
registerDataSetObserver in interface Cursor

unregisterDataSetObserver

public void unregisterDataSetObserver(DataSetObserver observer)
Specified by:
unregisterDataSetObserver in interface Cursor

onChange

protected void onChange(boolean selfChange)

setNotificationUri

public void setNotificationUri(ContentResolver cr,
                               Uri notifyUri)
Specified by:
setNotificationUri in interface Cursor

getNotificationUri

public Uri getNotificationUri()

getWantsAllOnMoveCalls

public boolean getWantsAllOnMoveCalls()
Specified by:
getWantsAllOnMoveCalls in interface Cursor

getExtras

public Bundle getExtras()
Specified by:
getExtras in interface Cursor

respond

public Bundle respond(Bundle extras)
Specified by:
respond in interface Cursor

isFieldUpdated

protected boolean isFieldUpdated(int columnIndex)

getUpdatedField

protected Object getUpdatedField(int columnIndex)

checkPosition

protected void checkPosition()

finalize

protected void finalize()
Overrides:
finalize in class Object


Copyright © 2008-2012. All Rights Reserved.