--- a/src/com/beem/project/beem/provider/Beem.java Thu Oct 08 10:41:57 2009 +0200
+++ b/src/com/beem/project/beem/provider/Beem.java Thu Oct 08 13:59:04 2009 +0200
@@ -4,165 +4,186 @@
import android.provider.BaseColumns;
/**
- * Convenience definitions for BEEM's providers
+ * Convenience definitions for BEEM's providers.
*/
public final class Beem {
/**
- * Contacts table
+ * Contacts table.
*/
public static final class Contacts implements BaseColumns {
/**
- * The query used to create the table
+ * The query used to create the table.
*/
- public final static String QUERY_CREATE = "CREATE TABLE " + Beem.CONTACTS_TABLE_NAME + " ("
- + BaseColumns._ID + " INTEGER PRIMARY KEY AUTOINCREMENT,"
- + Contacts.UID + " INTEGER, " + Contacts.JID
- + " INTEGER," + Contacts.NICKNAME + " TEXT,"
- + Contacts.ALIAS + " TEXT," + Contacts.DATE_CREATED
- + " INTEGER," + Contacts.DATE_MODIFIED + " INTEGER"
- + ");";
+ public static final String QUERY_CREATE = "CREATE TABLE " + Beem.CONTACTS_TABLE_NAME + " (" + BaseColumns._ID
+ + " INTEGER PRIMARY KEY AUTOINCREMENT," + Contacts.UID + " INTEGER, " + Contacts.JID + " INTEGER,"
+ + Contacts.NICKNAME + " TEXT," + Contacts.ALIAS + " TEXT," + Contacts.DATE_CREATED + " INTEGER,"
+ + Contacts.DATE_MODIFIED + " INTEGER" + ");";
/**
- * The content:// style URL for Contacts table
+ * The content:// style URL for Contacts table.
*/
- public final static Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/contacts");
+ public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/contacts");
/**
* The MIME type of {@link #CONTENT_URI} providing a directory of contacts.
*/
- public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.beem.project.contact";
+ public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.beem.project.contact";
/**
* The MIME type of a {@link #CONTENT_URI} sub-directory of a single contact.
*/
- public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.beem.project.contact";
+ public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.beem.project.contact";
/**
- * The default sort order for this table
+ * The default sort order for this table.
*/
- public final static String DEFAULT_SORT_ORDER = "nickname ASC";
+ public static final String DEFAULT_SORT_ORDER = "nickname ASC";
/**
* The user id having the contact
* <P>
* Type: INTEGER
* </P>
+ * .
*/
- public final static String UID = "uid";
+ public static final String UID = "uid";
/**
* The JabberID of the contact
* <P>
* Type: INTEGER
* </P>
+ * .
*/
- public final static String JID = "jid";
+ public static final String JID = "jid";
/**
* The nickname of the contact
* <P>
* Type: TEXT
* </P>
+ * .
*/
- public final static String NICKNAME = "nickname";
+ public static final String NICKNAME = "nickname";
/**
* The alias of the contact
* <P>
* Type: TEXT
* </P>
+ * .
*/
- public final static String ALIAS = "alias";
+ public static final String ALIAS = "alias";
/**
* The timestamp for when the contact was created
* <P>
* Type: INTEGER (long from System.curentTimeMillis())
* </P>
+ * .
*/
- public final static String DATE_CREATED = "created";
+ public static final String DATE_CREATED = "created";
/**
* The timestamp for when the contact was last modified
* <P>
* Type: INTEGER (long from System.curentTimeMillis())
* </P>
+ * .
*/
- public final static String DATE_MODIFIED = "modified";
+ public static final String DATE_MODIFIED = "modified";
}
/**
- * Users table
+ * Users table.
*/
public static final class Users implements BaseColumns {
/**
- * The query used to create the table
+ * The query used to create the table.
*/
- public final static String QUERY_CREATE = "CREATE TABLE " + Beem.USERS_TABLE_NAME + " ("
- + BaseColumns._ID + " INTEGER PRIMARY KEY AUTOINCREMENT,"
- + Users.JUSERNAME + " TEXT," + Users.DATE_CREATED
- + " INTEGER," + Users.DATE_MODIFIED + " INTEGER" + ");";
+ public static final String QUERY_CREATE = "CREATE TABLE " + Beem.USERS_TABLE_NAME + " (" + BaseColumns._ID
+ + " INTEGER PRIMARY KEY AUTOINCREMENT," + Users.JUSERNAME + " TEXT," + Users.DATE_CREATED + " INTEGER,"
+ + Users.DATE_MODIFIED + " INTEGER" + ");";
/**
- * The content:// style URL for Contacts table
+ * The content:// style URL for Contacts table.
*/
- public final static Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/users");
+ public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/users");
/**
* The MIME type of {@link #CONTENT_URI} providing a directory of users.
*/
- public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.beem.project.user";
+ public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.beem.project.user";
/**
* The MIME type of a {@link #CONTENT_URI} sub-directory of a single user.
*/
- public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.beem.project.user";
+ public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.beem.project.user";
/**
- * The default sort order for this table
+ * The default sort order for this table.
*/
- public final static String DEFAULT_SORT_ORDER = "_id ASC";
+ public static final String DEFAULT_SORT_ORDER = "_id ASC";
/**
* The Jabber username of the user
* <P>
* Type: TEXT
* </P>
+ * .
*/
- public final static String JUSERNAME = "username";
+ public static final String JUSERNAME = "username";
/**
* The timestamp for when the user was created
* <P>
* Type: INTEGER (long from System.curentTimeMillis())
* </P>
+ * .
*/
- public final static String DATE_CREATED = "created";
+ public static final String DATE_CREATED = "created";
/**
* The timestamp for when the user was last modified
* <P>
* Type: INTEGER (long from System.curentTimeMillis())
* </P>
+ * .
*/
- public final static String DATE_MODIFIED = "modified";
+ public static final String DATE_MODIFIED = "modified";
}
- public final static String AUTHORITY = "com.beem.project.provider";
+ /**
+ * AUTHORITY.
+ */
+ public static final String AUTHORITY = "com.beem.project.provider";
- public final static String DB_NAME = "beem.db";
- public final static int DB_VERSION = 2;
-
- public final static String USERS_TABLE_NAME = "users";
-
- public final static String CONTACTS_TABLE_NAME = "contacts";
+ /**
+ * DB Name.
+ */
+ public static final String DB_NAME = "beem.db";
/**
- * Constructor
+ * DB Version.
+ */
+ public static final int DB_VERSION = 2;
+
+ /**
+ * Name of the users table.
+ */
+ public static final String USERS_TABLE_NAME = "users";
+
+ /**
+ * Name of the contacts table.
+ */
+ public static final String CONTACTS_TABLE_NAME = "contacts";
+
+ /**
+ * Constructor.
*/
private Beem() {
}