Skip to content

Instantly share code, notes, and snippets.

@cleuton
Last active Aug 29, 2015
Embed
What would you like to do?
JSON DAO Interface
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;
}
@cleuton
Copy link
Author

cleuton commented Mar 8, 2014

This is a Json DAO sample. This Gist is only the interface.

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment