Back to project page Android.Parse.
The source code is released under:
MIT License
If you think the Android project Android.Parse listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.iamnbty.android.parse.parse; //from w ww.j a va 2 s . c o m import com.parse.ParseObject; public class FriendParse { public static final String PARSE_CLASS_NAME = "Friend"; public String name; public String nickName; public ParseObject toParseObject() { ParseObject parseObject = new ParseObject(PARSE_CLASS_NAME); parseObject.put("name", name); parseObject.put("nickname", nickName); return parseObject; } public static FriendParse fromParseObject(ParseObject parseObject) { FriendParse friendParse = new FriendParse(); if (parseObject.has("name")) { friendParse.name = parseObject.getString("name"); } if (parseObject.has("nickname")) { friendParse.nickName = parseObject.getString("nickname"); } return friendParse; } }