0
以下のコードはなぜ静的ブロックに配置されますか?SQLiteQueryBuilderクラスで内部結合を適用中
private static final SQLiteQueryBuilder sWeatherByLocationSettingQueryBuilder;
//static block:
static{
sWeatherByLocationSettingQueryBuilder = new SQLiteQueryBuilder();
//This is an inner join which looks like
//weather INNER JOIN location ON weather.location_id = location._id
sWeatherByLocationSettingQueryBuilder.setTables(
WeatherContract.WeatherEntry.TABLE_NAME + " INNER JOIN " +
WeatherContract.LocationEntry.TABLE_NAME +
" ON " + WeatherContract.WeatherEntry.TABLE_NAME +
"." + WeatherContract.WeatherEntry.COLUMN_LOC_KEY +
" = " + WeatherContract.LocationEntry.TABLE_NAME +
"." + WeatherContract.LocationEntry._ID);
}
不明。あなたはあなたの質問にいくつかの文脈を提供できますか? –
http://stackoverflow.com/questions/2943556/static-block-in-java – Krish