package com.garpr.android.data2;


import android.database.sqlite.SQLiteDatabase;

import com.garpr.android.misc.Constants;


public final class Rankings {


    static final String TAG = "Rankings";




    static void createTable(final SQLiteDatabase db) {
        final String sql = "CREATE TABLE IF NOT EXISTS " + TAG + " (" +
                Constants.PLAYER_ID + " TEXT NOT NULL, " +
                Constants.RANK + " INTEGER NOT NULL, " +
                Constants.RATING + " REAL NOT NULL, " +
                Constants.REGION_ID + " TEXT NOT NULL, " +
                "FOREIGN KEY (" + Constants.PLAYER_ID + ") REFERENCES " + Players.TAG + '(' + Constants.ID + "), " +
                "FOREIGN KEY (" + Constants.REGION_ID + ") REFERENCES " + Regions.TAG + '(' + Constants.ID + "));";

        db.execSQL(sql);
    }


}

@@ -91,36 +91,218 @@
 com.
-garpr.android.misc.Constants
+android.volley.toolbox.JsonObjectRequest;%0Aimport com.garpr.android.misc.Constants;%0Aimport com.garpr.android.models.Player;%0A%0Aimport org.json.JSONException;%0Aimport org.json.JSONObject;%0A%0Aimport java.util.ArrayList
 ;%0A%0A%0A
@@ -971,16 +971,16 @@
 %22));%22;%0A%0A
-
         
@@ -1004,10 +1004,1296 @@
     %7D%0A%0A%0A
+    public static void get(final Response%3CArrayList%3CPlayer%3E%3E response, final boolean clear) %7B%0A        new RankingsCall(response, clear).start();%0A    %7D%0A%0A%0A    public static void get(final Response%3CArrayList%3CPlayer%3E%3E response, final String regionId,%0A            final boolean clear) %7B%0A        new RankingsCall(response, regionId, clear).start();%0A    %7D%0A%0A%0A%0A%0A    private static final class RankingsCall extends RegionBasedCall%3CArrayList%3CPlayer%3E%3E %7B%0A%0A%0A        private static final String TAG = %22RankingsCall%22;%0A%0A        private final boolean mClear;%0A%0A%0A        private RankingsCall(final Response%3CArrayList%3CPlayer%3E%3E response, final boolean clear)%0A                throws IllegalArgumentException %7B%0A            super(response);%0A            mClear = clear;%0A        %7D%0A%0A%0A        private RankingsCall(final Response%3CArrayList%3CPlayer%3E%3E response, final String regionId,%0A                final boolean clear) throws IllegalArgumentException %7B%0A            super(response);%0A            mClear = clear;%0A        %7D%0A%0A%0A        @Override%0A        String getCallName() %7B%0A            return TAG;%0A        %7D%0A%0A%0A        @Override%0A        JsonObjectRequest getRequest() %7B%0A            return null;%0A        %7D%0A%0A%0A        @Override%0A        void onJSONResponse(final JSONObject json) throws JSONException %7B%0A%0A        %7D%0A%0A%0A    %7D%0A%0A%0A
 %7D%0A

put in place boilerplate for retrieving rankings