WIMM Labs


com.wimm.framework.provider
Class WorldClock

java.lang.Object
  extended by com.wimm.framework.provider.WorldClock

public final class WorldClock
extends Object

This class exposes constants and methods for accessing the world clock data. These data will be updated everytime the device sync with the WIMM server.

See Android Content Providers Dev Guide for more information on using ContentProvider.

Since:
WIMM SDK 1.0.0

Nested Class Summary
static interface WorldClock.Columns
          Columns for the WorldClock table.
static class WorldClock.Location
          This class represents a named location on a map.
 
Field Summary
static String AUTHORITY
          The authority.
static String CONTENT_AUTHORITY
          The content:// style URL for this provider.
static Uri CONTENT_URI
          The content:// style URL for this provider.
static String DEFAULT_SORT_ORDER
          The default sort order for this table.
 
Constructor Summary
WorldClock()
           
 
Method Summary
static WorldClock.Location getLocationFromCursor(Cursor c)
          Retrieves a WorldClock.Location object from a Cursor at the current row.
static List<WorldClock.Location> getLocations(ContentResolver cr)
          Retrieves all WorldClock.Location information for all the cities that the user have added in the WorldClock web preference settings.
static Cursor query(ContentResolver cr, String[] projection)
          Use this method to query for a Cursor that points to all WorldClock data in the WorldClock database.
static Cursor query(ContentResolver cr, String[] projection, String where, String[] whereArgs, String orderBy)
           Here's an example that query for specifics WorldClock.Columns of all WorldClocks that are in the "Asia/Tokyo" timezone.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AUTHORITY

public static final String AUTHORITY
The authority.

Constant Value: "com.wimm.worldclock"

Since:
WIMM SDK 1.0.0
See Also:
Constant Field Values

CONTENT_AUTHORITY

public static final String CONTENT_AUTHORITY
The content:// style URL for this provider.

Since:
WIMM SDK 1.0.0
See Also:
Constant Field Values

CONTENT_URI

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

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

WorldClock

public WorldClock()
Method Detail

query

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

Here's an example:

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)

Here's an example that query for specifics WorldClock.Columns of all WorldClocks that are in the "Asia/Tokyo" timezone.

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

getLocationFromCursor

public static final WorldClock.Location getLocationFromCursor(Cursor c)
Retrieves a WorldClock.Location object from a Cursor at the current row.

Returns null if no more rows exist.

See query(android.content.ContentResolver, java.lang.String[]) sample code for usage example.

Parameters:
c - The Cursor.
Returns:
The WorldClock.Location.
Since:
WIMM SDK 1.0.0

getLocations

public static final List<WorldClock.Location> getLocations(ContentResolver cr)
Retrieves all WorldClock.Location information for all the cities that the user have added in the WorldClock web preference settings.

Returns null if no data exists.

Parameters:
cr - The ContentResolver.
Returns:
A list of WorldClock.Location.
Since:
WIMM SDK 1.0.0

WIMM Labs