Last active
August 29, 2015 13:57
-
-
Save cleuton/9435139 to your computer and use it in GitHub Desktop.
JSON DAO Interface
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.obomprogramador.discoarq.microblog.persistence; | |
import java.util.List; | |
import org.json.JSONObject; | |
public interface JsonDao { | |
boolean addUser(JSONObject user) throws Exception; | |
JSONObject findUser(String username, String password) throws Exception; | |
List<JSONObject> getMessages(JSONObject user) throws Exception; | |
boolean follow(JSONObject user, String followUserName) throws Exception; | |
boolean postMessage(JSONObject user, String message) throws Exception; | |
boolean abandon(JSONObject user, String followUserName) throws Exception; | |
boolean validateSession(JSONObject session) throws Exception; | |
JSONObject getSession(JSONObject user) throws Exception; | |
boolean updateSession(JSONObject session) throws Exception; | |
JSONObject pullSession(JSONObject session) throws Exception; | |
JSONObject getUserFromSession(JSONObject session) throws Exception; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a Json DAO sample. This Gist is only the interface.