Skip to content

Instantly share code, notes, and snippets.

@simpleton
Created May 21, 2013 10:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simpleton/5618811 to your computer and use it in GitHub Desktop.
Save simpleton/5618811 to your computer and use it in GitHub Desktop.
OrgProvider.java
private enum UriType {
DEPARTMENT( "#/" + DB_Department.TABLE_NAME , DB_Department.TABLE_NAME, DB_Department.TYPE_ELEM_TYPE),
COLLEGUE("#/" + DB_Collegue.TABLE_NAME, DB_Collegue.TABLE_NAME, DB_Collegue.TYPE_ELEM_TYPE),
COLLEGUE_RELATION("#/" + DB_Collegue_relation.TABLE_NAME, DB_Collegue_relation.TABLE_NAME, DB_Collegue_relation.TYPE_ELEM_TYPE),
DEPARTMENT_RELATION("#/" + DB_Department_relation.TABLE_NAME, DB_Department_relation.TABLE_NAME, DB_Department_relation.TYPE_ELEM_TYPE),
DEPARTMENT_UIN( "#/" + DB_Department.TABLE_NAME + "/UIN/#", DB_Department.TABLE_NAME, DB_Department.TYPE_ELEM_TYPE),
COLLEGUE_CorpUIN("#/" + DB_Collegue.TABLE_NAME + "/UIN/#", DB_Collegue.TABLE_NAME, DB_Collegue.TYPE_ELEM_TYPE),
COLLEGUE_RELATION_UIN("#/" + DB_Collegue_relation.TABLE_NAME + "/UIN/#", DB_Collegue_relation.TABLE_NAME, DB_Collegue_relation.TYPE_ELEM_TYPE),
DEPARTMENT_RELATION_CorpUIN("#/" + DB_Department_relation.TABLE_NAME + "/UIN/#", DB_Department_relation.TABLE_NAME, DB_Department_relation.TYPE_ELEM_TYPE);
private String mTableName;
private String mType;
UriType(String matchPath, String tableName, String type) {
mTableName = tableName;
mType = type;
sUriMatcher.addURI(AUTHORITY, matchPath, ordinal());
}
String getTableName() {
return mTableName;
}
String getType() {
return mType;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment