Android Open Source - MentorMe Message From Project Back to project page MentorMe .
License The source code is released under:
MIT License
If you think the Android project MentorMe listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code package com.codepath.wwcmentorme.models;
/ / w w w . j a v a 2 s . c o m
import java.util.Date;
import android.util.Pair;
import com.parse.ParseClassName;
import com.parse.ParseObject;
@ParseClassName("Message" )
public class Message extends ParseObject {
public static String GROUP_ID_KEY = "groupId" ;
public static String USER_ID_KEY = "userId" ;
public static String TEXT_KEY = "text" ;
public static Pair<Long, Long> getGroup(final String groupId) {
final String[] userIds = groupId.split("_" );
return new Pair<Long, Long>(Long.valueOf(userIds[0]), Long.valueOf(userIds[1]));
}
public static String getGroup(long userId1, long userId2) {
final StringBuilder sb = new StringBuilder();
if (userId2 < userId1) {
final long temp = userId1;
userId1 = userId2;
userId2 = temp;
}
sb.append(userId1);
sb.append('_' );
sb.append(userId2);
return sb.toString();
}
public String getGroupId() {
return getString(GROUP_ID_KEY);
}
public void setGroupId(final String groupId) {
put(GROUP_ID_KEY, groupId);
}
public long getUserId() {
return getLong(USER_ID_KEY);
}
public void setUserId(final long userId) {
put(USER_ID_KEY, userId);
}
public String getText() {
return getString(TEXT_KEY);
}
public void setText(final String text) {
put(TEXT_KEY, text);
}
}
Java Source Code List com.codepath.wwcmentorme.activities.AppActivity.java com.codepath.wwcmentorme.activities.ChatActivity.java com.codepath.wwcmentorme.activities.EditProfileActivity.java com.codepath.wwcmentorme.activities.HomeActivity.java com.codepath.wwcmentorme.activities.MapActivity.java com.codepath.wwcmentorme.activities.MentorListActivity.java com.codepath.wwcmentorme.activities.ThankMentorActivity.java com.codepath.wwcmentorme.activities.UserListActivity.java com.codepath.wwcmentorme.activities.ViewProfileActivity.java com.codepath.wwcmentorme.adapters.ChatAdapter.java com.codepath.wwcmentorme.adapters.DrawerListAdapter.java com.codepath.wwcmentorme.adapters.MentorListAdapter.java com.codepath.wwcmentorme.app.MentorMeApp.java com.codepath.wwcmentorme.data.DataService.java com.codepath.wwcmentorme.fragments.AbstractEditProfileFragment.java com.codepath.wwcmentorme.fragments.EditProfileExperiencesFragment.java com.codepath.wwcmentorme.fragments.EditProfileLocationFragment.java com.codepath.wwcmentorme.fragments.EditProfileSkillsFragment.java com.codepath.wwcmentorme.fragments.RefineResultsDialogFragment.java com.codepath.wwcmentorme.helpers.Async.java com.codepath.wwcmentorme.helpers.Constants.java com.codepath.wwcmentorme.helpers.MentorMeReceiver.java com.codepath.wwcmentorme.helpers.NotificationCenter.java com.codepath.wwcmentorme.helpers.RoundedImageView.java com.codepath.wwcmentorme.helpers.UIUtils.java com.codepath.wwcmentorme.helpers.Utils.java com.codepath.wwcmentorme.helpers.ViewHolder.java com.codepath.wwcmentorme.models.Message.java com.codepath.wwcmentorme.models.Rating.java com.codepath.wwcmentorme.models.Request.java com.codepath.wwcmentorme.models.User.java