// Path: RadarApp/app/src/main/java/bg/mentormate/academy/radarapp/Constants.java
// public class Constants {
// 
//     public final static String INACTIVE_STATE = "INACTIVE";
// 
//     public final static String CATEGORY = "CATEGORY";
//     public final static String FOLLOWER = "FOLLOWER";
//     public final static String FOLLOWING = "FOLLOWING";
//     public final static String SEARCH = "SEARCH";
// 
//     public final static String ROOM_ID = "ROOM_ID";
// 
//     /**
//      * Parse.com common cols
//      */
//     public final static String PARSE_COL_CREATED_AT = "createdAt";
//     public final static String PARSE_COL_OBJECT_ID = "objectId";
// 
//     /**
//      * Parse.com Follow table constants
//      */
//     public final static String FOLLOW_TABLE = "Follow";
//     public final static String FOLLOW_COL_FOLLOWERS = "followers";
//     public final static String FOLLOW_COL_FOLLOWINGS = "followings";
// 
//     /**
//      * Parse.com UserDetail table constants
//      */
//     public final static String USER_DETAIL_TABLE = "CurrentLocation";
//     public final static String USER_DETAIL_COL_LOCATION = "location";
//     public final static String USER_DETAIL_COL_PROVIDER = "provider";
//     public final static String USER_DETAIL_COL_ACTIVE = "active";
//     public static final String USER_DETAIL_COL_STATUS = "status";
// 
//     /**
//      * Parse.com Room table constants
//      */
//     public final static String ROOM_TABLE = "Room";
//     public final static String ROOM_COL_NAME = "name";
//     public final static String ROOM_COL_PASSKEY = "passKey";
//     public final static String ROOM_COL_CREATED_BY = "createdBy";
//     public final static String ROOM_COL_USERS = "users";
// 
//     /**
//      * Parse.com _User table constants
//      */
//     public final static String USER_TABLE = "_User";
//     public final static String USER_COL_USER_DETAIL = "currentLocation";
//     public final static String USER_COL_ROOM = "room";
//     public final static String USER_COL_AVATAR = "avatar";
//     public final static String USER_COL_FOLLOW = "follow";
//     public final static String USER_COL_USERNAME = "username";
// 
//     /***
//      * Constants for working with the camera
//      */
//     public static final int ACTION_TAKE_PHOTO = 0;
//     public static final String CAMERA_DIR = "/DCIM/";
//     public static final String JPEG_FILE_PREFIX = "IMG_";
//     public static final String JPEG_FILE_SUFFIX = ".jpg";
//     public static final String ALBUM_NAME = "CameraSample";
// }
// 
// Path: RadarApp/app/src/main/java/bg/mentormate/academy/radarapp/models/Room.java
// @ParseClassName(Constants.ROOM_TABLE)
// public class Room extends ParseObject{
//     public String getName() {
//         return getString(Constants.ROOM_COL_NAME);
//     }
// 
//     public void setName(String name) {
//         put(Constants.ROOM_COL_NAME, name);
//     }
// 
//     public String getPassKey() {
//         return getString(Constants.ROOM_COL_PASSKEY);
//     }
// 
//     public void setPassKey(String passKey) {
//         put(Constants.ROOM_COL_PASSKEY, passKey);
//     }
// 
//     public User getCreatedBy() {
//         return (User) getParseUser(Constants.ROOM_COL_CREATED_BY);
//     }
// 
//     public void setCreatedBy(User createdBy) {
//         put(Constants.ROOM_COL_CREATED_BY, createdBy);
//     }
// 
//     public List<User> getUsers() {
//         return getList(Constants.ROOM_COL_USERS);
//     }
// 
//     public void setUsers(List<User> users) {
//         put(Constants.ROOM_COL_USERS, users);
//     }
// }
// 
// Path: RadarApp/app/src/main/java/bg/mentormate/academy/radarapp/models/User.java
// @ParseClassName(Constants.USER_TABLE)
// public class User extends ParseUser{
// 
//     public UserDetail getUserDetail() {
//         return (UserDetail) getParseObject(Constants.USER_COL_USER_DETAIL);
//     }
// 
//     public void setUserDetail(UserDetail userDetail) {
//         put(Constants.USER_COL_USER_DETAIL, userDetail);
//     }
// 
//     public Room getRoom() {
//         return (Room) getParseObject(Constants.USER_COL_ROOM);
//     }
// 
//     public void setRoom(Room room) {
//         put(Constants.USER_COL_ROOM, room);
//     }
// 
//     public ParseFile getAvatar() {
//         return getParseFile(Constants.USER_COL_AVATAR);
//     }
// 
//     public void setAvatar(ParseFile avatar) {
//         put(Constants.USER_COL_AVATAR, avatar);
//     }
// 
//     public Follow getFollow() {
//         return (Follow) getParseObject(Constants.USER_COL_FOLLOW);
//     }
// 
//     public void setFollow(Follow follow) {
//         put(Constants.USER_COL_FOLLOW, follow);
//     }
// }


import com.parse.GetCallback;
import com.parse.ParseQuery;
import bg.mentormate.academy.radarapp.Constants;
import bg.mentormate.academy.radarapp.models.Room;
import bg.mentormate.academy.radarapp.models.User;
package bg.mentormate.academy.radarapp.tools;



/**
 * Created by tl on 25.02.15.
 */
public class QueryHelper {

    public static void getRoomById(String roomId, GetCallback<Room> callback) {
        ParseQuery<Room> query = new ParseQuery<>(Constants.ROOM_TABLE);

        query.getInBackground(roomId, callback);
    }

    public static void getUserById(String userId, GetCallback<User> callback) {
// Path: RadarApp/app/src/main/java/bg/mentormate/academy/radarapp/Constants.java
// public class Constants {
// 
//     public final static String INACTIVE_STATE = "INACTIVE";
// 
//     public final static String CATEGORY = "CATEGORY";
//     public final static String FOLLOWER = "FOLLOWER";
//     public final static String FOLLOWING = "FOLLOWING";
//     public final static String SEARCH = "SEARCH";
// 
//     public final static String ROOM_ID = "ROOM_ID";
// 
//     /**
//      * Parse.com common cols
//      */
//     public final static String PARSE_COL_CREATED_AT = "createdAt";
//     public final static String PARSE_COL_OBJECT_ID = "objectId";
// 
//     /**
//      * Parse.com Follow table constants
//      */
//     public final static String FOLLOW_TABLE = "Follow";
//     public final static String FOLLOW_COL_FOLLOWERS = "followers";
//     public final static String FOLLOW_COL_FOLLOWINGS = "followings";
// 
//     /**
//      * Parse.com UserDetail table constants
//      */
//     public final static String USER_DETAIL_TABLE = "CurrentLocation";
//     public final static String USER_DETAIL_COL_LOCATION = "location";
//     public final static String USER_DETAIL_COL_PROVIDER = "provider";
//     public final static String USER_DETAIL_COL_ACTIVE = "active";
//     public static final String USER_DETAIL_COL_STATUS = "status";
// 
//     /**
//      * Parse.com Room table constants
//      */
//     public final static String ROOM_TABLE = "Room";
//     public final static String ROOM_COL_NAME = "name";
//     public final static String ROOM_COL_PASSKEY = "passKey";
//     public final static String ROOM_COL_CREATED_BY = "createdBy";
//     public final static String ROOM_COL_USERS = "users";
// 
//     /**
//      * Parse.com _User table constants
//      */
//     public final static String USER_TABLE = "_User";
//     public final static String USER_COL_USER_DETAIL = "currentLocation";
//     public final static String USER_COL_ROOM = "room";
//     public final static String USER_COL_AVATAR = "avatar";
//     public final static String USER_COL_FOLLOW = "follow";
//     public final static String USER_COL_USERNAME = "username";
// 
//     /***
//      * Constants for working with the camera
//      */
//     public static final int ACTION_TAKE_PHOTO = 0;
//     public static final String CAMERA_DIR = "/DCIM/";
//     public static final String JPEG_FILE_PREFIX = "IMG_";
//     public static final String JPEG_FILE_SUFFIX = ".jpg";
//     public static final String ALBUM_NAME = "CameraSample";
// }
// 
// Path: RadarApp/app/src/main/java/bg/mentormate/academy/radarapp/models/Room.java
// @ParseClassName(Constants.ROOM_TABLE)
// public class Room extends ParseObject{
//     public String getName() {
//         return getString(Constants.ROOM_COL_NAME);
//     }
// 
//     public void setName(String name) {
//         put(Constants.ROOM_COL_NAME, name);
//     }
// 
//     public String getPassKey() {
//         return getString(Constants.ROOM_COL_PASSKEY);
//     }
// 
//     public void setPassKey(String passKey) {
//         put(Constants.ROOM_COL_PASSKEY, passKey);
//     }
// 
//     public User getCreatedBy() {
//         return (User) getParseUser(Constants.ROOM_COL_CREATED_BY);
//     }
// 
//     public void setCreatedBy(User createdBy) {
//         put(Constants.ROOM_COL_CREATED_BY, createdBy);
//     }
// 
//     public List<User> getUsers() {
//         return getList(Constants.ROOM_COL_USERS);
//     }
// 
//     public void setUsers(List<User> users) {
//         put(Constants.ROOM_COL_USERS, users);
//     }
// }
// 
// Path: RadarApp/app/src/main/java/bg/mentormate/academy/radarapp/models/User.java
// @ParseClassName(Constants.USER_TABLE)
// public class User extends ParseUser{
// 
//     public UserDetail getUserDetail() {
//         return (UserDetail) getParseObject(Constants.USER_COL_USER_DETAIL);
//     }
// 
//     public void setUserDetail(UserDetail userDetail) {
//         put(Constants.USER_COL_USER_DETAIL, userDetail);
//     }
// 
//     public Room getRoom() {
//         return (Room) getParseObject(Constants.USER_COL_ROOM);
//     }
// 
//     public void setRoom(Room room) {
//         put(Constants.USER_COL_ROOM, room);
//     }
// 
//     public ParseFile getAvatar() {
//         return getParseFile(Constants.USER_COL_AVATAR);
//     }
// 
//     public void setAvatar(ParseFile avatar) {
//         put(Constants.USER_COL_AVATAR, avatar);
//     }
// 
//     public Follow getFollow() {
//         return (Follow) getParseObject(Constants.USER_COL_FOLLOW);
//     }
// 
//     public void setFollow(Follow follow) {
//         put(Constants.USER_COL_FOLLOW, follow);
//     }
// }


// Path: RadarApp/app/src/main/java/bg/mentormate/academy/radarapp/tools/QueryHelper.java
import com.parse.GetCallback;
import com.parse.ParseQuery;
import bg.mentormate.academy.radarapp.Constants;
import bg.mentormate.academy.radarapp.models.Room;
import bg.mentormate.academy.radarapp.models.User;

package bg.mentormate.academy.radarapp.tools;



/**
 * Created by tl on 25.02.15.
 */
public class QueryHelper {

    public static void getRoomById(String roomId, GetCallback<Room> callback) {
        ParseQuery<Room> query = new ParseQuery<>(Constants.ROOM_TABLE);

        query.getInBackground(roomId, callback);
    }

    public static void getUserById(String userId, GetCallback<User> callback) {
        ParseQuery<User> query = new ParseQuery<>(Constants.USER_TABLE);