Commit dfe57452 authored by Sajal Narang's avatar Sajal Narang Committed by GitHub

Merge branch 'master' into master

parents 73c50e7b 12781e40
...@@ -16,6 +16,9 @@ public class Body { ...@@ -16,6 +16,9 @@ public class Body {
@ColumnInfo(name = "id") @ColumnInfo(name = "id")
@SerializedName("id") @SerializedName("id")
String bodyID; String bodyID;
@ColumnInfo(name = "str_id")
@SerializedName("str_id")
String bodyStrID;
@ColumnInfo(name = "name") @ColumnInfo(name = "name")
@SerializedName("name") @SerializedName("name")
String bodyName; String bodyName;
...@@ -40,16 +43,26 @@ public class Body { ...@@ -40,16 +43,26 @@ public class Body {
@ColumnInfo(name = "followers_count") @ColumnInfo(name = "followers_count")
@SerializedName("followers_count") @SerializedName("followers_count")
int bodyFollowersCount; int bodyFollowersCount;
@ColumnInfo(name = "website_url")
public Body(String bodyID, String bodyName, String bodyDescription, String bodyImageURL, List<Body> bodyChildren, List<Body> bodyParents, List<Event> bodyEvents, int bodyFollowersCount) { @SerializedName("website_url")
String bodyWebsiteURL;
@ColumnInfo(name = "blog_url")
@SerializedName("blog_url")
String bodyBlogURL;
public Body(String bodyID, String bodyStrID, String bodyName, String bodyShortDescription, String bodyDescription, String bodyImageURL, List<Body> bodyChildren, List<Body> bodyParents, List<Event> bodyEvents, int bodyFollowersCount, String bodyWebsiteURL, String bodyBlogURL) {
this.bodyID = bodyID; this.bodyID = bodyID;
this.bodyStrID = bodyStrID;
this.bodyName = bodyName; this.bodyName = bodyName;
this.bodyShortDescription = bodyShortDescription;
this.bodyDescription = bodyDescription; this.bodyDescription = bodyDescription;
this.bodyImageURL = bodyImageURL; this.bodyImageURL = bodyImageURL;
this.bodyChildren = bodyChildren; this.bodyChildren = bodyChildren;
this.bodyParents = bodyParents; this.bodyParents = bodyParents;
this.bodyEvents = bodyEvents; this.bodyEvents = bodyEvents;
this.bodyFollowersCount = bodyFollowersCount; this.bodyFollowersCount = bodyFollowersCount;
this.bodyWebsiteURL = bodyWebsiteURL;
this.bodyBlogURL = bodyBlogURL;
} }
public String getBodyID() { public String getBodyID() {
...@@ -60,6 +73,14 @@ public class Body { ...@@ -60,6 +73,14 @@ public class Body {
this.bodyID = bodyID; this.bodyID = bodyID;
} }
public String getBodyStrID() {
return bodyStrID;
}
public void setBodyStrID(String bodyStrID) {
this.bodyStrID = bodyStrID;
}
public String getBodyName() { public String getBodyName() {
return bodyName; return bodyName;
} }
...@@ -123,4 +144,21 @@ public class Body { ...@@ -123,4 +144,21 @@ public class Body {
public void setBodyFollowersCount(int bodyFollowersCount) { public void setBodyFollowersCount(int bodyFollowersCount) {
this.bodyFollowersCount = bodyFollowersCount; this.bodyFollowersCount = bodyFollowersCount;
} }
public String getBodyWebsiteURL() {
return bodyWebsiteURL;
}
public void setBodyWebsiteURL(String bodyWebsiteURL) {
this.bodyWebsiteURL = bodyWebsiteURL;
}
public String getBodyBlogURL() {
return bodyBlogURL;
}
public void setBodyBlogURL(String bodyBlogURL) {
this.bodyBlogURL = bodyBlogURL;
}
} }
\ No newline at end of file
...@@ -60,6 +60,7 @@ public class Event { ...@@ -60,6 +60,7 @@ public class Event {
@ColumnInfo(name = "website_url") @ColumnInfo(name = "website_url")
@SerializedName("website_url") @SerializedName("website_url")
String eventWebsiteURL; String eventWebsiteURL;
public Event(String eventID, String eventStrID, String eventName, String eventDescription, String eventImageURL, Timestamp eventStartTime, Timestamp eventEndTime, boolean allDayEvent, List<Venue> eventVenues, List<Body> eventBodies, int eventInterestedCount, int eventGoingCount, List<User> eventInterested, List<User> eventGoing, String eventWebsiteURL) { public Event(String eventID, String eventStrID, String eventName, String eventDescription, String eventImageURL, Timestamp eventStartTime, Timestamp eventEndTime, boolean allDayEvent, List<Venue> eventVenues, List<Body> eventBodies, int eventInterestedCount, int eventGoingCount, List<User> eventInterested, List<User> eventGoing, String eventWebsiteURL) {
this.eventID = eventID; this.eventID = eventID;
this.eventStrID = eventStrID; this.eventStrID = eventStrID;
......
package in.ac.iitb.gymkhana.iitbapp.data;
import android.arch.persistence.room.ColumnInfo;
import android.arch.persistence.room.Entity;
import android.arch.persistence.room.PrimaryKey;
import com.google.gson.annotations.SerializedName;
import java.util.List;
@Entity(tableName = "roles")
public class Role {
@PrimaryKey(autoGenerate = true)
int db_id;
@ColumnInfo(name="id")
@SerializedName("id")
String roleID;
@ColumnInfo(name="name")
@SerializedName("name")
String roleName;
@ColumnInfo(name="inheritable")
@SerializedName("inheritable")
boolean roleInheritable;
@ColumnInfo(name="body")
@SerializedName("body")
String roleBody;
@ColumnInfo(name="body_detail")
@SerializedName("body_detail")
Body roleBodyDetails;
@ColumnInfo(name="bodies")
@SerializedName("bodies")
List<Body> roleBodies;
@ColumnInfo(name="permissions")
@SerializedName("permissions")
List<String> rolePermissions;
@ColumnInfo(name="users")
@SerializedName("users")
List<String> roleUsers;
@ColumnInfo(name="users_details")
@SerializedName("users_details")
List<User> roleUsersDetails;
public Role(String roleID, String roleName, boolean roleInheritable, String roleBody, Body roleBodyDetails, List<Body> roleBodies, List<String> rolePermissions, List<String> roleUsers, List<User> roleUsersDetails) {
this.roleID = roleID;
this.roleName = roleName;
this.roleInheritable = roleInheritable;
this.roleBody = roleBody;
this.roleBodyDetails = roleBodyDetails;
this.roleBodies = roleBodies;
this.rolePermissions = rolePermissions;
this.roleUsers = roleUsers;
this.roleUsersDetails = roleUsersDetails;
}
public String getRoleID() {
return roleID;
}
public void setRoleID(String roleID) {
this.roleID = roleID;
}
public String getRoleName() {
return roleName;
}
public void setRoleName(String roleName) {
this.roleName = roleName;
}
public boolean isRoleInheritable() {
return roleInheritable;
}
public void setRoleInheritable(boolean roleInheritable) {
this.roleInheritable = roleInheritable;
}
public String getRoleBody() {
return roleBody;
}
public void setRoleBody(String roleBody) {
this.roleBody = roleBody;
}
public Body getRoleBodyDetails() {
return roleBodyDetails;
}
public void setRoleBodyDetails(Body roleBodyDetails) {
this.roleBodyDetails = roleBodyDetails;
}
public List<Body> getRoleBodies() {
return roleBodies;
}
public void setRoleBodies(List<Body> roleBodies) {
this.roleBodies = roleBodies;
}
public List<String> getRolePermissions() {
return rolePermissions;
}
public void setRolePermissions(List<String> rolePermissions) {
this.rolePermissions = rolePermissions;
}
public List<String> getRoleUsers() {
return roleUsers;
}
public void setRoleUsers(List<String> roleUsers) {
this.roleUsers = roleUsers;
}
public List<User> getRoleUsersDetails() {
return roleUsersDetails;
}
public void setRoleUsersDetails(List<User> roleUsersDetails) {
this.roleUsersDetails = roleUsersDetails;
}
}
...@@ -33,9 +33,6 @@ public class User { ...@@ -33,9 +33,6 @@ public class User {
@ColumnInfo(name = "email") @ColumnInfo(name = "email")
@SerializedName("email") @SerializedName("email")
String userEmail; String userEmail;
@ColumnInfo(name = "year")
@SerializedName("year")
int userYear;
@ColumnInfo(name = "roll_no") @ColumnInfo(name = "roll_no")
@SerializedName("roll_no") @SerializedName("roll_no")
String userRollNumber; String userRollNumber;
...@@ -51,20 +48,27 @@ public class User { ...@@ -51,20 +48,27 @@ public class User {
@ColumnInfo(name = "followed_bodies_id") @ColumnInfo(name = "followed_bodies_id")
@SerializedName("followed_bodies_id") @SerializedName("followed_bodies_id")
List<String> userFollowedBodiesID; List<String> userFollowedBodiesID;
@ColumnInfo(name = "website_url")
public User(String userID, String userName, String userProfilePictureUrl, List<Event> userInterestedEvents, List<Event> userGoingEvents, String userEmail, int userYear, String userRollNumber, String userContactNumber, String userAbout, List<Body> userFollowedBodies, List<String> userFollowedBodiesID) { @SerializedName("website_url")
String userWebsiteURL;
@ColumnInfo(name = "ldap_id")
@SerializedName("ldap_id")
String userLDAPId;
public User(String userID, String userName, String userProfilePictureUrl, List<Event> userInterestedEvents, List<Event> userGoingEvents, String userEmail, String userRollNumber, String userContactNumber, String userAbout, List<Body> userFollowedBodies, List<String> userFollowedBodiesID, String userWebsiteURL, String userLDAPID) {
this.userID = userID; this.userID = userID;
this.userName = userName; this.userName = userName;
this.userProfilePictureUrl = userProfilePictureUrl; this.userProfilePictureUrl = userProfilePictureUrl;
this.userInterestedEvents = userInterestedEvents; this.userInterestedEvents = userInterestedEvents;
this.userGoingEvents = userGoingEvents; this.userGoingEvents = userGoingEvents;
this.userEmail = userEmail; this.userEmail = userEmail;
this.userYear = userYear;
this.userRollNumber = userRollNumber; this.userRollNumber = userRollNumber;
this.userContactNumber = userContactNumber; this.userContactNumber = userContactNumber;
this.userAbout = userAbout; this.userAbout = userAbout;
this.userFollowedBodies = userFollowedBodies; this.userFollowedBodies = userFollowedBodies;
this.userFollowedBodiesID = userFollowedBodiesID; this.userFollowedBodiesID = userFollowedBodiesID;
this.userWebsiteURL = userWebsiteURL;
this.userLDAPId = userLDAPID;
} }
public static User fromString(String json) { public static User fromString(String json) {
...@@ -119,14 +123,6 @@ public class User { ...@@ -119,14 +123,6 @@ public class User {
this.userEmail = userEmail; this.userEmail = userEmail;
} }
public int getUserYear() {
return userYear;
}
public void setUserYear(int userYear) {
this.userYear = userYear;
}
public String getUserRollNumber() { public String getUserRollNumber() {
return userRollNumber; return userRollNumber;
} }
...@@ -167,6 +163,22 @@ public class User { ...@@ -167,6 +163,22 @@ public class User {
this.userFollowedBodiesID = userFollowedBodiesID; this.userFollowedBodiesID = userFollowedBodiesID;
} }
public String getUserWebsiteURL() {
return userWebsiteURL;
}
public void setUserWebsiteURL(String userWebsiteURL) {
this.userWebsiteURL = userWebsiteURL;
}
public String getUserLDAPId() {
return userLDAPId;
}
public void setUserLDAPId(String userLDAPId) {
this.userLDAPId = userLDAPId;
}
@Override @Override
public String toString() { public String toString() {
return new Gson().toJson(this); return new Gson().toJson(this);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment