Package 

Class DatabaseAdapter

    • Method Detail

      • addJSON

         int addJSON(JSONObject j, DatabaseAdapter.Table table, String token)

        Adds a JSON string representing an event with properties or a person recordto the SQLiteDatabase.

        Parameters:
        j - the JSON to record
        table - the table to insert into
        token - the token this event belongs to
      • cleanupEvents

         int cleanupEvents(String lastId, DatabaseAdapter.Table table, String token)

        Removes events with an _id less lan last_id from table.

        Parameters:
        lastId - the last id to delete
        table - the table to remove events from
        token - the project token; if null, delete all related events.
      • cleanupEvents

         void cleanupEvents(long time, DatabaseAdapter.Table table)

        Removes events before time.

        Parameters:
        time - the unix epoch in milliseconds to remove events before
        table - the table to remove events from
      • generateDataString

         Array<String> generateDataString(DatabaseAdapter.Table table, String token, int limit)

        Returns the data string to send to the serverand the maximum ID of the row that we are sending,so we know what rows to delete when a track request was successful.

        Parameters:
        table - the table to read the JSON from
        token - the token of the project you want to retrieve the records for
        limit - the maximum number of rows returned.