WIMM Labs


com.wimm.framework.provider
Class Calendar.Calendars

java.lang.Object
  extended by com.wimm.framework.provider.Calendar.Calendars
All Implemented Interfaces:
BaseColumns, Calendar.CalendarColumns
Enclosing class:
Calendar

public static final class Calendar.Calendars
extends Object
implements BaseColumns, Calendar.CalendarColumns

This class provides access to the Calendar table.

Since:
WIMM SDK 1.0.0

Field Summary
static Uri CONTENT_URI
          The content:// style URL for this table.
static String DEFAULT_SORT_ORDER
          The default sort order for this table.
 
Fields inherited from interface android.provider.BaseColumns
_COUNT, _ID
 
Fields inherited from interface com.wimm.framework.provider.Calendar.CalendarColumns
COLOR, ID, NAME
 
Constructor Summary
Calendar.Calendars()
           
 
Method Summary
static HashMap<String,Integer> getCalendarColorMap(ContentResolver cr)
          Provides a hash of calendar IDs and colors.
static Cursor query(ContentResolver cr, String[] projection)
          Use this method to query for a Cursor that points to all Calendars in the Calendar App database.
static Cursor query(ContentResolver cr, String[] projection, String where, String[] whereArgs, String orderBy)
          Use this method to query, with arguments for a Cursor that points to specific Calendars in the Calendar App database.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONTENT_URI

public static final Uri CONTENT_URI
The content:// style URL for this table.

Since:
WIMM SDK 1.0.0

DEFAULT_SORT_ORDER

public static final String DEFAULT_SORT_ORDER
The default sort order for this table.

Since:
WIMM SDK 1.0.0
See Also:
Constant Field Values
Constructor Detail

Calendar.Calendars

public Calendar.Calendars()
Method Detail

query

public static final Cursor query(ContentResolver cr,
                                 String[] projection)
Use this method to query for a Cursor that points to all Calendars in the Calendar App database.

For example to query only for ID and Name Calendar.CalendarColumns of all the Calendars in the Calendar database:

Parameters:
cr - The ContentResolver.
projection - The list of columns to put into the Cursor. If null all columns are included.
Returns:
The Cursor.
Since:
WIMM SDK 1.0.0

query

public static final Cursor query(ContentResolver cr,
                                 String[] projection,
                                 String where,
                                 String[] whereArgs,
                                 String orderBy)
Use this method to query, with arguments for a Cursor that points to specific Calendars in the Calendar App database.

For example we can filter our query for all Calendar.CalendarColumns of only the calendars from gmail and google calendar:

Parameters:
cr - The ContentResolver.
projection - The list of columns to put into the Cursor. If null all columns are included.
where - The filter to apply.
whereArgs - The filter arguments.
orderBy - How to sort the cursor rows. If null the provider defines the sort order.
Returns:
The Cursor.
Since:
WIMM SDK 1.0.0

getCalendarColorMap

public static final HashMap<String,Integer> getCalendarColorMap(ContentResolver cr)
Provides a hash of calendar IDs and colors. The color codes returned are reserved for system use at the moment.

Parameters:
cr - The ContentResolver.
Returns:
A hash of calendar IDs and colors.
Since:
WIMM SDK 1.0.0

WIMM Labs