package eic.beike.projectx.network.projectXServer;

import eic.beike.projectx.util.ScoreEntry;

/**
 * Used to interact with the database, these are long running network operations and should not be called
 * from the UI thread.
 *
 * Created by alex on 10/1/15.
 */
public interface IDatabase {

    /**
     * Register a name for the given id.
     * @return True if registration succeded, false if it failed.
     */
   boolean register(String id, String name);

    /**
     * @return True if score was recorded correctly, false if it failed.
     */
    boolean recordScore(String playerId, int score, long time, String bus);

    /**
     * @return The best ten scores for all players on all buses.
     */
    ScoreEntry[] getTopTen();

    /**
     * @return The best ten scores for the given player.
     */
    ScoreEntry[] getPlayerTopTen(String playerId);

}

@@ -89,16 +89,40 @@
 Entry;%0A%0A
+import java.util.List;%0A%0A
 /**%0A * U
@@ -256,35 +256,20 @@
 %0A * 
-Created by alex on 10/1/15.
+@Author alex
 %0A */
@@ -711,32 +711,37 @@
 es.%0A     */%0A    
+List%3C
 ScoreEntry%5B%5D get
@@ -730,26 +730,25 @@
 t%3CScoreEntry
-%5B%5D
+%3E
  getTopTen()
@@ -827,16 +827,21 @@
  */%0A    
+List%3C
 ScoreEnt
@@ -846,10 +846,9 @@
 ntry
-%5B%5D
+%3E
  get

Change database interface to return List<>.