私は現在、このようにしています。
より良い方法はありますか?
public Cursor selectRostersForTeam(Activity activity, int teamId) {
final String MY_QUERY = "SELECT r." + _ROSTER_ID + ", t." + _TEAM_ID + ", t." + TEAM_NAME + ", t." + TEAM_SEASON_WINS + ", t." + TEAM_SEASON_LOSSES + ", t." + TEAM_CHAMPIONSHIP_WINS + ", j." + _TEAMS_ROSTERS_ID + " FROM " + TABLE_TEAM + " AS p" + " JOIN " + TABLE_TEAMS_ROSTERS + " j ON (r." + _ROSTER_ID + " = j." + TEAMS_ROSTER_ROSTER_ID + ") " + " JOIN " + TABLE_TEAM + " ch ON (j." + TEAMS_ROSTER_TEAM_ID + " = t." + _TEAM_ID + ") WHERE j. " + TEAMS_ROSTER_TEAM_ID + " = " + teamId + ";";
SQLiteDatabase db = getReadableDatabase();
Cursor cursor = db.rawQuery(MY_QUERY, null);
activity.startManagingCursor(cursor);
return cursor;
}