Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
InstiApp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
RAHUL SHARMA
InstiApp
Commits
31f371cc
Commit
31f371cc
authored
Sep 26, 2018
by
Varun Patil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove column info decorators
parent
91205c38
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
43 additions
and
451 deletions
+43
-451
app/src/main/java/app/insti/data/Body.java
app/src/main/java/app/insti/data/Body.java
+0
-18
app/src/main/java/app/insti/data/Converters.java
app/src/main/java/app/insti/data/Converters.java
+0
-158
app/src/main/java/app/insti/data/DbDao.java
app/src/main/java/app/insti/data/DbDao.java
+0
-165
app/src/main/java/app/insti/data/Event.java
app/src/main/java/app/insti/data/Event.java
+15
-20
app/src/main/java/app/insti/data/HostelMessMenu.java
app/src/main/java/app/insti/data/HostelMessMenu.java
+0
-7
app/src/main/java/app/insti/data/MessMenu.java
app/src/main/java/app/insti/data/MessMenu.java
+0
-1
app/src/main/java/app/insti/data/NewsArticle.java
app/src/main/java/app/insti/data/NewsArticle.java
+0
-9
app/src/main/java/app/insti/data/Notification.java
app/src/main/java/app/insti/data/Notification.java
+1
-8
app/src/main/java/app/insti/data/PlacementBlogPost.java
app/src/main/java/app/insti/data/PlacementBlogPost.java
+0
-8
app/src/main/java/app/insti/data/Role.java
app/src/main/java/app/insti/data/Role.java
+0
-14
app/src/main/java/app/insti/data/TrainingBlogPost.java
app/src/main/java/app/insti/data/TrainingBlogPost.java
+0
-8
app/src/main/java/app/insti/data/User.java
app/src/main/java/app/insti/data/User.java
+16
-21
app/src/main/java/app/insti/data/Venue.java
app/src/main/java/app/insti/data/Venue.java
+11
-14
No files found.
app/src/main/java/app/insti/data/Body.java
View file @
31f371cc
...
@@ -10,54 +10,36 @@ import com.google.gson.annotations.SerializedName;
...
@@ -10,54 +10,36 @@ import com.google.gson.annotations.SerializedName;
import
java.util.List
;
import
java.util.List
;
@Entity
(
tableName
=
"bodies"
)
public
class
Body
{
public
class
Body
{
@NonNull
()
@PrimaryKey
()
@ColumnInfo
(
name
=
"id"
)
@SerializedName
(
"id"
)
@SerializedName
(
"id"
)
String
bodyID
;
String
bodyID
;
@ColumnInfo
(
name
=
"str_id"
)
@SerializedName
(
"str_id"
)
@SerializedName
(
"str_id"
)
String
bodyStrID
;
String
bodyStrID
;
@ColumnInfo
(
name
=
"name"
)
@SerializedName
(
"name"
)
@SerializedName
(
"name"
)
String
bodyName
;
String
bodyName
;
@ColumnInfo
(
name
=
"short_description"
)
@SerializedName
(
"short_description"
)
@SerializedName
(
"short_description"
)
String
bodyShortDescription
;
String
bodyShortDescription
;
@ColumnInfo
(
name
=
"description"
)
@SerializedName
(
"description"
)
@SerializedName
(
"description"
)
String
bodyDescription
;
String
bodyDescription
;
@ColumnInfo
(
name
=
"image_url"
)
@SerializedName
(
"image_url"
)
@SerializedName
(
"image_url"
)
String
bodyImageURL
;
String
bodyImageURL
;
@ColumnInfo
(
name
=
"children"
)
@SerializedName
(
"children"
)
@SerializedName
(
"children"
)
List
<
Body
>
bodyChildren
;
List
<
Body
>
bodyChildren
;
@ColumnInfo
(
name
=
"parents"
)
@SerializedName
(
"parents"
)
@SerializedName
(
"parents"
)
List
<
Body
>
bodyParents
;
List
<
Body
>
bodyParents
;
@ColumnInfo
(
name
=
"events"
)
@SerializedName
(
"events"
)
@SerializedName
(
"events"
)
List
<
Event
>
bodyEvents
;
List
<
Event
>
bodyEvents
;
@ColumnInfo
(
name
=
"followers_count"
)
@SerializedName
(
"followers_count"
)
@SerializedName
(
"followers_count"
)
int
bodyFollowersCount
;
int
bodyFollowersCount
;
@ColumnInfo
(
name
=
"website_url"
)
@SerializedName
(
"website_url"
)
@SerializedName
(
"website_url"
)
String
bodyWebsiteURL
;
String
bodyWebsiteURL
;
@ColumnInfo
(
name
=
"blog_url"
)
@SerializedName
(
"blog_url"
)
@SerializedName
(
"blog_url"
)
String
bodyBlogURL
;
String
bodyBlogURL
;
@ColumnInfo
(
name
=
"user_follows"
)
@SerializedName
(
"user_follows"
)
@SerializedName
(
"user_follows"
)
boolean
bodyUserFollows
;
boolean
bodyUserFollows
;
@ColumnInfo
(
name
=
"roles"
)
@SerializedName
(
"roles"
)
@SerializedName
(
"roles"
)
List
<
Role
>
bodyRoles
;
List
<
Role
>
bodyRoles
;
@Ignore
public
Body
(
@NonNull
String
bodyID
)
{
public
Body
(
@NonNull
String
bodyID
)
{
this
.
bodyID
=
bodyID
;
this
.
bodyID
=
bodyID
;
}
}
...
...
app/src/main/java/app/insti/data/Converters.java
deleted
100644 → 0
View file @
91205c38
package
app.insti.data
;
import
android.arch.persistence.room.TypeConverter
;
import
android.util.Log
;
import
com.google.gson.Gson
;
import
com.google.gson.JsonSyntaxException
;
import
com.google.gson.reflect.TypeToken
;
import
java.lang.reflect.Type
;
import
java.sql.Timestamp
;
import
java.util.List
;
public
class
Converters
{
@TypeConverter
public
static
List
<
Event
>
eventsfromString
(
String
value
)
{
Type
listType
=
new
TypeToken
<
List
<
Event
>>()
{
}.
getType
();
return
new
Gson
().
fromJson
(
value
,
listType
);
}
@TypeConverter
public
static
String
stringfromEvents
(
List
<
Event
>
list
)
{
Gson
gson
=
new
Gson
();
String
json
=
gson
.
toJson
(
list
);
return
json
;
}
@TypeConverter
public
static
List
<
User
>
usersfromString
(
String
value
)
{
Type
listType
=
new
TypeToken
<
List
<
User
>>()
{
}.
getType
();
return
new
Gson
().
fromJson
(
value
,
listType
);
}
@TypeConverter
public
static
String
stringfromUsers
(
List
<
User
>
list
)
{
Gson
gson
=
new
Gson
();
String
json
=
gson
.
toJson
(
list
);
return
json
;
}
@TypeConverter
public
static
List
<
Venue
>
venuesfromString
(
String
value
)
{
Type
listType
=
new
TypeToken
<
List
<
Venue
>>()
{
}.
getType
();
return
new
Gson
().
fromJson
(
value
,
listType
);
}
@TypeConverter
public
static
String
stringfromVenues
(
List
<
Venue
>
list
)
{
Gson
gson
=
new
Gson
();
String
json
=
gson
.
toJson
(
list
);
return
json
;
}
@TypeConverter
public
static
List
<
Body
>
bodiesfromString
(
String
value
)
{
Type
listType
=
new
TypeToken
<
List
<
Body
>>()
{
}.
getType
();
return
new
Gson
().
fromJson
(
value
,
listType
);
}
@TypeConverter
public
static
String
stringfromBodies
(
List
<
Body
>
list
)
{
Gson
gson
=
new
Gson
();
String
json
=
gson
.
toJson
(
list
);
return
json
;
}
@TypeConverter
public
static
List
<
Role
>
rolesfromString
(
String
value
)
{
Type
listType
=
new
TypeToken
<
List
<
Role
>>()
{
}.
getType
();
return
new
Gson
().
fromJson
(
value
,
listType
);
}
@TypeConverter
public
static
String
stringfromRoles
(
List
<
Role
>
list
)
{
Gson
gson
=
new
Gson
();
String
json
=
gson
.
toJson
(
list
);
return
json
;
}
@TypeConverter
public
static
Timestamp
timestampfromString
(
String
value
)
{
try
{
return
new
Gson
().
fromJson
(
value
,
Timestamp
.
class
);
}
catch
(
JsonSyntaxException
e
)
{
Log
.
d
(
"Converters"
,
"timestampfromString: "
+
value
);
e
.
printStackTrace
();
return
null
;
}
}
@TypeConverter
public
static
String
stringfromTimestamp
(
Timestamp
timestamp
)
{
Gson
gson
=
new
Gson
();
String
json
=
gson
.
toJson
(
timestamp
);
return
json
;
}
@TypeConverter
public
static
Body
bodyfromString
(
String
value
)
{
Type
listType
=
new
TypeToken
<
Body
>()
{
}.
getType
();
return
new
Gson
().
fromJson
(
value
,
listType
);
}
@TypeConverter
public
static
String
stringfromBody
(
Body
body
)
{
Gson
gson
=
new
Gson
();
String
json
=
gson
.
toJson
(
body
);
return
json
;
}
@TypeConverter
public
static
Object
objectFromString
(
String
value
)
{
Type
listType
=
new
TypeToken
<
Object
>()
{
}.
getType
();
return
new
Gson
().
fromJson
(
value
,
listType
);
}
@TypeConverter
public
static
String
stringFromObject
(
Object
object
)
{
Gson
gson
=
new
Gson
();
String
json
=
gson
.
toJson
(
object
);
return
json
;
}
@TypeConverter
public
static
List
<
String
>
stringsfromString
(
String
value
)
{
Type
listType
=
new
TypeToken
<
List
<
String
>>()
{
}.
getType
();
return
new
Gson
().
fromJson
(
value
,
listType
);
}
@TypeConverter
public
static
String
stringfromStrings
(
List
<
String
>
list
)
{
Gson
gson
=
new
Gson
();
String
json
=
gson
.
toJson
(
list
);
return
json
;
}
@TypeConverter
public
static
List
<
MessMenu
>
messMenusfromString
(
String
value
)
{
Type
listType
=
new
TypeToken
<
List
<
MessMenu
>>()
{
}.
getType
();
return
new
Gson
().
fromJson
(
value
,
listType
);
}
@TypeConverter
public
static
String
stringfromMessMenus
(
List
<
MessMenu
>
list
)
{
Gson
gson
=
new
Gson
();
String
json
=
gson
.
toJson
(
list
);
return
json
;
}
}
\ No newline at end of file
app/src/main/java/app/insti/data/DbDao.java
deleted
100644 → 0
View file @
91205c38
package
app.insti.data
;
import
android.arch.persistence.room.Dao
;
import
android.arch.persistence.room.Delete
;
import
android.arch.persistence.room.Insert
;
import
android.arch.persistence.room.Query
;
import
android.arch.persistence.room.Update
;
import
java.util.List
;
@Dao
public
interface
DbDao
{
@Query
(
"SELECT * FROM events"
)
List
<
Event
>
getAllEvents
();
@Query
(
"SELECT * FROM events WHERE user_ues <> 0"
)
List
<
Event
>
getFollowingEvents
();
@Query
(
"SELECT * FROM bodies"
)
List
<
Body
>
getAllBodies
();
@Query
(
"SELECT * FROM venues"
)
List
<
Venue
>
getAllVenues
();
@Query
(
"SELECT * FROM users"
)
List
<
User
>
getAllUsers
();
@Query
(
"SELECT * FROM roles"
)
List
<
Role
>
getAllRoles
();
@Query
(
"SELECT * FROM placementBlogPosts"
)
List
<
PlacementBlogPost
>
getAllPlacementBlogPosts
();
@Query
(
"SELECT * FROM trainingBlogPosts"
)
List
<
TrainingBlogPost
>
getAllTrainingBlogPosts
();
@Query
(
"SELECT * FROM hostelMessMenus"
)
List
<
HostelMessMenu
>
getAllHostelMessMenus
();
@Query
(
"SELECT * FROM news"
)
List
<
NewsArticle
>
getAllNewsArticles
();
@Query
(
"SELECT COUNT(*) from events"
)
int
countEvents
();
@Query
(
"SELECT * FROM bodies WHERE id == :id"
)
public
Body
[]
getBody
(
String
id
);
@Query
(
"SELECT COUNT(*) from venues"
)
int
countVenues
();
@Query
(
"SELECT COUNT(*) from bodies"
)
int
countBodies
();
@Query
(
"SELECT COUNT(*) from users"
)
int
countUsers
();
@Query
(
"SELECT COUNT(*) from roles"
)
int
countRoles
();
@Query
(
"SELECT COUNT(*) from hostelMessMenus"
)
int
countHostelMessMenus
();
@Insert
void
insertEvents
(
List
<
Event
>
events
);
@Insert
void
insertEvent
(
Event
event
);
@Update
void
updateEvent
(
Event
event
);
@Insert
void
insertBodies
(
List
<
Body
>
bodies
);
@Insert
void
insertBody
(
Body
body
);
@Update
void
updateBody
(
Body
body
);
@Insert
void
insertVenues
(
List
<
Venue
>
venues
);
@Insert
void
insertVenue
(
Venue
venue
);
@Insert
void
insertUsers
(
List
<
User
>
users
);
@Insert
void
insertUser
(
User
user
);
@Insert
void
insertRoles
(
List
<
Role
>
roles
);
@Insert
void
insertRole
(
Role
role
);
@Insert
void
insertPlacementBlogPost
(
PlacementBlogPost
post
);
@Insert
void
insertPlacementBlogPosts
(
List
<
PlacementBlogPost
>
posts
);
@Insert
void
insertTrainingBlogPost
(
TrainingBlogPost
post
);
@Insert
void
insertTrainingBlogPosts
(
List
<
TrainingBlogPost
>
posts
);
@Insert
void
insertHostelMessMenu
(
HostelMessMenu
hostelMessMenu
);
@Insert
void
insertHostelMessMenus
(
List
<
HostelMessMenu
>
hostelMessMenus
);
@Insert
void
insertNewsArticle
(
NewsArticle
newsArticle
);
@Insert
void
insertNewsArticles
(
List
<
NewsArticle
>
newsArticles
);
@Delete
void
deleteEvent
(
Event
event
);
@Delete
void
deleteVenue
(
Venue
venue
);
@Delete
void
deleteBody
(
Body
body
);
@Delete
void
deleteUser
(
User
user
);
@Delete
void
deleteRole
(
Role
role
);
@Query
(
"DELETE from events"
)
void
deleteEvents
();
@Query
(
"DELETE from venues"
)
void
deleteVenues
();
@Query
(
"DELETE from bodies"
)
void
deleteBodies
();
@Query
(
"DELETE from users"
)
void
deleteUsers
();
@Query
(
"DELETE from roles"
)
void
deleteRoles
();
@Query
(
"DELETE from placementBlogPosts"
)
void
deletePlacementBlogPosts
();
@Query
(
"DELETE from trainingBlogPosts"
)
void
deleteTrainingBlogPosts
();
@Query
(
"DELETE from hostelMessMenus"
)
void
deleteHostelMessMenus
();
@Query
(
"DELETE from news"
)
void
deleteNewsArticles
();
}
app/src/main/java/app/insti/data/Event.java
View file @
31f371cc
...
@@ -12,61 +12,56 @@ import com.google.gson.annotations.SerializedName;
...
@@ -12,61 +12,56 @@ import com.google.gson.annotations.SerializedName;
import
java.sql.Timestamp
;
import
java.sql.Timestamp
;
import
java.util.List
;
import
java.util.List
;
@Entity
(
tableName
=
"events"
)
public
class
Event
{
public
class
Event
{
@NonNull
()
@NonNull
()
@PrimaryKey
()
@ColumnInfo
(
name
=
"id"
)
@SerializedName
(
"id"
)
@SerializedName
(
"id"
)
String
eventID
;
String
eventID
;
@ColumnInfo
(
name
=
"str_id"
)
@SerializedName
(
"str_id"
)
@SerializedName
(
"str_id"
)
String
eventStrID
;
String
eventStrID
;
@ColumnInfo
(
name
=
"name"
)
@SerializedName
(
"name"
)
@SerializedName
(
"name"
)
String
eventName
;
String
eventName
;
@ColumnInfo
(
name
=
"description"
)
@SerializedName
(
"description"
)
@SerializedName
(
"description"
)
String
eventDescription
;
String
eventDescription
;
@ColumnInfo
(
name
=
"image_url"
)
@SerializedName
(
"image_url"
)
@SerializedName
(
"image_url"
)
String
eventImageURL
;
String
eventImageURL
;
@ColumnInfo
(
name
=
"start_time"
)
@SerializedName
(
"start_time"
)
@SerializedName
(
"start_time"
)
Timestamp
eventStartTime
;
Timestamp
eventStartTime
;
@ColumnInfo
(
name
=
"end_time"
)
@SerializedName
(
"end_time"
)
@SerializedName
(
"end_time"
)
Timestamp
eventEndTime
;
Timestamp
eventEndTime
;
@ColumnInfo
(
name
=
"all_day"
)
@SerializedName
(
"all_day"
)
@SerializedName
(
"all_day"
)
boolean
allDayEvent
;
boolean
allDayEvent
;
@ColumnInfo
(
name
=
"venues"
)
@SerializedName
(
"venues"
)
@SerializedName
(
"venues"
)
List
<
Venue
>
eventVenues
;
List
<
Venue
>
eventVenues
;
@ColumnInfo
(
name
=
"bodies"
)
@SerializedName
(
"bodies"
)
@SerializedName
(
"bodies"
)
List
<
Body
>
eventBodies
;
List
<
Body
>
eventBodies
;
@ColumnInfo
(
name
=
"interested_count"
)
@SerializedName
(
"interested_count"
)
@SerializedName
(
"interested_count"
)
int
eventInterestedCount
;
int
eventInterestedCount
;
@ColumnInfo
(
name
=
"going_count"
)
@SerializedName
(
"going_count"
)
@SerializedName
(
"going_count"
)
int
eventGoingCount
;
int
eventGoingCount
;
@ColumnInfo
(
name
=
"interested"
)
@SerializedName
(
"interested"
)
@SerializedName
(
"interested"
)
List
<
User
>
eventInterested
;
List
<
User
>
eventInterested
;
@ColumnInfo
(
name
=
"going"
)
@SerializedName
(
"going"
)
@SerializedName
(
"going"
)
List
<
User
>
eventGoing
;
List
<
User
>
eventGoing
;
@ColumnInfo
(
name
=
"website_url"
)
@SerializedName
(
"website_url"
)
@SerializedName
(
"website_url"
)
String
eventWebsiteURL
;
String
eventWebsiteURL
;
@ColumnInfo
(
name
=
"user_ues"
)
@SerializedName
(
"user_ues"
)
@SerializedName
(
"user_ues"
)
int
eventUserUes
;
int
eventUserUes
;
@Ignore
boolean
eventBigImage
=
false
;
boolean
eventBigImage
=
false
;
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
,
int
eventUserUes
)
{
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
,
int
eventUserUes
)
{
...
...
app/src/main/java/app/insti/data/HostelMessMenu.java
View file @
31f371cc
...
@@ -9,27 +9,20 @@ import com.google.gson.annotations.SerializedName;
...
@@ -9,27 +9,20 @@ import com.google.gson.annotations.SerializedName;
import
java.util.List
;
import
java.util.List
;
@Entity
(
tableName
=
"hostelMessMenus"
)
public
class
HostelMessMenu
{
public
class
HostelMessMenu
{
@NonNull
()
@NonNull
()
@PrimaryKey
()
@ColumnInfo
(
name
=
"id"
)
@SerializedName
(
"id"
)
@SerializedName
(
"id"
)
private
String
menuID
;
private
String
menuID
;
@ColumnInfo
(
name
=
"name"
)
@SerializedName
(
"name"
)
@SerializedName
(
"name"
)
private
String
name
;
private
String
name
;
@ColumnInfo
(
name
=
"short_name"
)
@SerializedName
(
"short_name"
)
@SerializedName
(
"short_name"
)
private
String
shortName
;
private
String
shortName
;
@ColumnInfo
(
name
=
"long_name"
)
@SerializedName
(
"long_name"
)
@SerializedName
(
"long_name"
)
private
String
longName
;
private
String
longName
;
@ColumnInfo
(
name
=
"mess"
)
@SerializedName
(
"mess"
)
@SerializedName
(
"mess"
)
private
List
<
MessMenu
>
messMenus
;
private
List
<
MessMenu
>
messMenus
;
...
...
app/src/main/java/app/insti/data/MessMenu.java
View file @
31f371cc
...
@@ -7,7 +7,6 @@ import com.google.gson.annotations.SerializedName;
...
@@ -7,7 +7,6 @@ import com.google.gson.annotations.SerializedName;
public
class
MessMenu
{
public
class
MessMenu
{
@NonNull
()
@NonNull
()
@PrimaryKey
()
@SerializedName
(
"id"
)
@SerializedName
(
"id"
)
private
String
mealID
;
private
String
mealID
;
...
...
app/src/main/java/app/insti/data/NewsArticle.java
View file @
31f371cc
...
@@ -9,32 +9,23 @@ import com.google.gson.annotations.SerializedName;
...
@@ -9,32 +9,23 @@ import com.google.gson.annotations.SerializedName;
import
java.sql.Timestamp
;
import
java.sql.Timestamp
;
@Entity
(
tableName
=
"news"
)
public
class
NewsArticle
{
public
class
NewsArticle
{
@NonNull
()
@NonNull
()
@PrimaryKey
()
@ColumnInfo
(
name
=
"id"
)
@SerializedName
(
"id"
)
@SerializedName
(
"id"
)
private
String
articleID
;
private
String
articleID
;
@ColumnInfo
(
name
=
"link"
)
@SerializedName
(
"link"
)
@SerializedName
(
"link"
)
private
String
link
;
private
String
link
;
@ColumnInfo
(
name
=
"title"
)
@SerializedName
(
"title"
)
@SerializedName
(
"title"
)
private
String
title
;
private
String
title
;
@ColumnInfo
(
name
=
"content"
)
@SerializedName
(
"content"
)
@SerializedName
(
"content"
)
private
String
content
;
private
String
content
;
@ColumnInfo
(
name
=
"published"
)
@SerializedName
(
"published"
)
@SerializedName
(
"published"
)
private
Timestamp
published
;
private
Timestamp
published
;
@ColumnInfo
(
name
=
"body"
)
@SerializedName
(
"body"
)
@SerializedName
(
"body"
)
private
Body
body
;
private
Body
body
;
...
...
app/src/main/java/app/insti/data/Notification.java
View file @
31f371cc
...
@@ -7,28 +7,21 @@ import android.support.annotation.NonNull;
...
@@ -7,28 +7,21 @@ import android.support.annotation.NonNull;
import
com.google.gson.annotations.SerializedName
;
import
com.google.gson.annotations.SerializedName
;
@Entity
(
tableName
=
"news"
)
public
class
Notification
{
public
class
Notification
{
@NonNull
()
@NonNull
()
@PrimaryKey
()
@ColumnInfo
(
name
=
"id"
)
@SerializedName
(
"id"
)
@SerializedName
(
"id"
)
private
Integer
notificationId
;
private
Integer
notificationId
;
@ColumnInfo
(
name
=
"verb"
)
@SerializedName
(
"verb"
)
@SerializedName
(
"verb"
)
private
String
notificationVerb
;
private
String
notificationVerb
;
@ColumnInfo
(
name
=
"unread"
)
@SerializedName
(
"unread"
)
@SerializedName
(
"unread"
)
private
boolean
notificationUnread
;
private
boolean
notificationUnread
;
@ColumnInfo
(
name
=
"actor_type"
)
@SerializedName
(
"actor_type"
)
@SerializedName
(
"actor_type"
)
private
String
notificationActorType
;
private
String
notificationActorType
;
@ColumnInfo
(
name
=
"actor"
)
@SerializedName
(
"actor"
)
@SerializedName
(
"actor"
)
private
Object
notificationActor
;
private
Object
notificationActor
;
...
...
app/src/main/java/app/insti/data/PlacementBlogPost.java
View file @
31f371cc
...
@@ -9,28 +9,20 @@ import com.google.gson.annotations.SerializedName;
...
@@ -9,28 +9,20 @@ import com.google.gson.annotations.SerializedName;
import
java.sql.Timestamp
;
import
java.sql.Timestamp
;
@Entity
(
tableName
=
"placementBlogPosts"
)
public
class
PlacementBlogPost
{
public
class
PlacementBlogPost
{
@NonNull
()
@NonNull
()
@PrimaryKey
()
@ColumnInfo
(
name
=
"id"
)
@SerializedName
(
"id"
)
@SerializedName
(
"id"
)
private
String
postID
;
private
String
postID
;
@ColumnInfo
(
name
=
"link"
)
@SerializedName
(
"link"
)
@SerializedName
(
"link"
)
private
String
link
;
private
String
link
;
@ColumnInfo
(
name
=
"title"
)
@SerializedName
(
"title"
)
@SerializedName
(
"title"
)
private
String
title
;
private
String
title
;
@ColumnInfo
(
name
=
"content"
)
@SerializedName
(
"content"
)
@SerializedName
(
"content"
)
private
String
content
;
private
String
content
;
@ColumnInfo
(
name
=
"published"
)
@SerializedName
(
"published"
)
@SerializedName
(
"published"
)
private
Timestamp
published
;
private
Timestamp
published
;
...
...
app/src/main/java/app/insti/data/Role.java
View file @
31f371cc
...
@@ -9,46 +9,32 @@ import com.google.gson.annotations.SerializedName;
...
@@ -9,46 +9,32 @@ import com.google.gson.annotations.SerializedName;
import
java.util.List
;
import
java.util.List
;
@Entity
(
tableName
=
"roles"
)
public
class
Role
{
public
class
Role
{
@NonNull
()
@NonNull
()
@PrimaryKey
()
@ColumnInfo
(
name
=
"id"
)
@SerializedName
(
"id"
)
@SerializedName
(
"id"
)
String
roleID
;
String
roleID
;
@ColumnInfo
(
name
=
"name"
)
@SerializedName
(
"name"
)
@SerializedName
(
"name"
)
String
roleName
;
String
roleName
;
@ColumnInfo
(
name
=
"inheritable"
)
@SerializedName
(
"inheritable"
)
@SerializedName
(
"inheritable"
)
boolean
roleInheritable
;
boolean
roleInheritable
;
@ColumnInfo
(
name
=
"body"
)
@SerializedName
(
"body"
)
@SerializedName
(
"body"
)
String
roleBody
;
String
roleBody
;
@ColumnInfo
(
name
=
"body_detail"
)
@SerializedName
(
"body_detail"
)
@SerializedName
(
"body_detail"
)
Body
roleBodyDetails
;
Body
roleBodyDetails
;
@ColumnInfo
(
name
=
"bodies"
)
@SerializedName
(
"bodies"
)
@SerializedName
(
"bodies"
)
List
<
Body
>
roleBodies
;
List
<
Body
>
roleBodies
;
@ColumnInfo
(
name
=
"permissions"
)
@SerializedName
(
"permissions"
)
@SerializedName
(
"permissions"
)
List
<
String
>
rolePermissions
;
List
<
String
>
rolePermissions
;
@ColumnInfo
(
name
=
"users"
)
@SerializedName
(
"users"
)
@SerializedName
(
"users"
)
List
<
String
>
roleUsers
;
List
<
String
>
roleUsers
;
@ColumnInfo
(
name
=
"users_detail"
)
@SerializedName
(
"users_detail"
)
@SerializedName
(
"users_detail"
)
List
<
User
>
roleUsersDetail
;
List
<
User
>
roleUsersDetail
;
...
...
app/src/main/java/app/insti/data/TrainingBlogPost.java
View file @
31f371cc
...
@@ -9,28 +9,20 @@ import com.google.gson.annotations.SerializedName;
...
@@ -9,28 +9,20 @@ import com.google.gson.annotations.SerializedName;
import
java.sql.Timestamp
;
import
java.sql.Timestamp
;
@Entity
(
tableName
=
"trainingBlogPosts"
)
public
class
TrainingBlogPost
{
public
class
TrainingBlogPost
{
@NonNull
()
@NonNull
()
@PrimaryKey
()
@ColumnInfo
(
name
=
"id"
)
@SerializedName
(
"id"
)
@SerializedName
(
"id"
)
private
String
postID
;
private
String
postID
;
@ColumnInfo
(
name
=
"link"
)
@SerializedName
(
"link"
)
@SerializedName
(
"link"
)
private
String
link
;
private
String
link
;
@ColumnInfo
(
name
=
"title"
)
@SerializedName
(
"title"
)
@SerializedName
(
"title"
)
private
String
title
;
private
String
title
;
@ColumnInfo
(
name
=
"content"
)
@SerializedName
(
"content"
)
@SerializedName
(
"content"
)
private
String
content
;
private
String
content
;
@ColumnInfo
(
name
=
"published"
)
@SerializedName
(
"published"
)
@SerializedName
(
"published"
)
private
Timestamp
published
;
private
Timestamp
published
;
...
...
app/src/main/java/app/insti/data/User.java
View file @
31f371cc
...
@@ -11,66 +11,61 @@ import com.google.gson.annotations.SerializedName;
...
@@ -11,66 +11,61 @@ import com.google.gson.annotations.SerializedName;
import
java.util.List
;
import
java.util.List
;
@Entity
(
tableName
=
"users"
)
public
class
User
{
public
class
User
{
@NonNull
()
@NonNull
()
@PrimaryKey
()
@PrimaryKey
()
@ColumnInfo
(
name
=
"id"
)
@SerializedName
(
"id"
)
@SerializedName
(
"id"
)
String
userID
;
String
userID
;
@ColumnInfo
(
name
=
"name"
)
@SerializedName
(
"name"
)
@SerializedName
(
"name"
)
String
userName
;
String
userName
;
@ColumnInfo
(
name
=
"profile_pic"
)
@SerializedName
(
"profile_pic"
)
@SerializedName
(
"profile_pic"
)
String
userProfilePictureUrl
;
String
userProfilePictureUrl
;
@ColumnInfo
(
name
=
"events_interested"
)
@SerializedName
(
"events_interested"
)
@SerializedName
(
"events_interested"
)
List
<
Event
>
userInterestedEvents
;
List
<
Event
>
userInterestedEvents
;
@ColumnInfo
(
name
=
"events_going"
)
@SerializedName
(
"events_going"
)
@SerializedName
(
"events_going"
)
List
<
Event
>
userGoingEvents
;
List
<
Event
>
userGoingEvents
;
@ColumnInfo
(
name
=
"email"
)
@SerializedName
(
"email"
)
@SerializedName
(
"email"
)
String
userEmail
;
String
userEmail
;
@ColumnInfo
(
name
=
"roll_no"
)
@SerializedName
(
"roll_no"
)
@SerializedName
(
"roll_no"
)
String
userRollNumber
;
String
userRollNumber
;
@ColumnInfo
(
name
=
"contact_no"
)
@SerializedName
(
"contact_no"
)
@SerializedName
(
"contact_no"
)
String
userContactNumber
;
String
userContactNumber
;
@ColumnInfo
(
name
=
"about"
)
@SerializedName
(
"about"
)
@SerializedName
(
"about"
)
String
userAbout
;
String
userAbout
;
@ColumnInfo
(
name
=
"followed_bodies"
)
@SerializedName
(
"followed_bodies"
)
@SerializedName
(
"followed_bodies"
)
List
<
Body
>
userFollowedBodies
;
List
<
Body
>
userFollowedBodies
;
@ColumnInfo
(
name
=
"followed_bodies_id"
)
@SerializedName
(
"followed_bodies_id"
)
@SerializedName
(
"followed_bodies_id"
)
List
<
String
>
userFollowedBodiesID
;
List
<
String
>
userFollowedBodiesID
;
@ColumnInfo
(
name
=
"roles"
)
@SerializedName
(
"roles"
)
@SerializedName
(
"roles"
)
List
<
Role
>
userRoles
;
List
<
Role
>
userRoles
;
@ColumnInfo
(
name
=
"institute_roles"
)
@SerializedName
(
"institute_roles"
)
@SerializedName
(
"institute_roles"
)
List
<
Role
>
userInstituteRoles
;
List
<
Role
>
userInstituteRoles
;
@ColumnInfo
(
name
=
"former_roles"
)
@SerializedName
(
"former_roles"
)
@SerializedName
(
"former_roles"
)
List
<
Role
>
userFormerRoles
;
List
<
Role
>
userFormerRoles
;
@ColumnInfo
(
name
=
"website_url"
)
@SerializedName
(
"website_url"
)
@SerializedName
(
"website_url"
)
String
userWebsiteURL
;
String
userWebsiteURL
;
@ColumnInfo
(
name
=
"ldap_id"
)
@SerializedName
(
"ldap_id"
)
@SerializedName
(
"ldap_id"
)
String
userLDAPId
;
String
userLDAPId
;
@ColumnInfo
(
name
=
"hostel"
)
@ColumnInfo
(
name
=
"hostel"
)
@SerializedName
(
"hostel"
)
@SerializedName
(
"hostel"
)
String
hostel
;
String
hostel
;
/**
* Not in database
*/
@Ignore
String
currentRole
;
String
currentRole
;
public
User
(
@NonNull
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
,
List
<
Role
>
userRoles
,
List
<
Role
>
userInstituteRoles
,
List
<
Role
>
userFormerRoles
,
String
userWebsiteURL
,
String
userLDAPId
,
String
hostel
)
{
public
User
(
@NonNull
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
,
List
<
Role
>
userRoles
,
List
<
Role
>
userInstituteRoles
,
List
<
Role
>
userFormerRoles
,
String
userWebsiteURL
,
String
userLDAPId
,
String
hostel
)
{
...
...
app/src/main/java/app/insti/data/Venue.java
View file @
31f371cc
...
@@ -7,44 +7,41 @@ import android.support.annotation.NonNull;
...
@@ -7,44 +7,41 @@ import android.support.annotation.NonNull;
import
com.google.gson.annotations.SerializedName
;
import
com.google.gson.annotations.SerializedName
;
@Entity
(
tableName
=
"venues"
)
public
class
Venue
{
public
class
Venue
{
@NonNull
()
@NonNull
()
@PrimaryKey
()
@ColumnInfo
(
name
=
"id"
)
@SerializedName
(
"id"
)
@SerializedName
(
"id"
)
String
venueID
;
String
venueID
;
@ColumnInfo
(
name
=
"name"
)
@SerializedName
(
"name"
)
@SerializedName
(
"name"
)
String
venueName
;
String
venueName
;
@ColumnInfo
(
name
=
"short_name"
)
@SerializedName
(
"short_name"
)
@SerializedName
(
"short_name"
)
String
venueShortName
;
String
venueShortName
;
@ColumnInfo
(
name
=
"description"
)
@SerializedName
(
"description"
)
@SerializedName
(
"description"
)
String
venueDescripion
;
String
venueDescripion
;
@ColumnInfo
(
name
=
"parent"
)
@SerializedName
(
"parent"
)
@SerializedName
(
"parent"
)
String
venueParentId
;
String
venueParentId
;
@ColumnInfo
(
name
=
"parent_relation"
)
@SerializedName
(
"parent_relation"
)
@SerializedName
(
"parent_relation"
)
String
venueParentRelation
;
String
venueParentRelation
;
@ColumnInfo
(
name
=
"group_id"
)
@SerializedName
(
"group_id"
)
@SerializedName
(
"group_id"
)
Integer
venueGroupId
;
Integer
venueGroupId
;
@ColumnInfo
(
name
=
"pixel_x"
)
@SerializedName
(
"pixel_x"
)
@SerializedName
(
"pixel_x"
)
Integer
venuePixelX
;
Integer
venuePixelX
;
@ColumnInfo
(
name
=
"pixel_y"
)
@SerializedName
(
"pixel_y"
)
@SerializedName
(
"pixel_y"
)
Integer
venuePixelY
;
Integer
venuePixelY
;
@ColumnInfo
(
name
=
"reusable"
)
@SerializedName
(
"reusable"
)
@SerializedName
(
"reusable"
)
Boolean
venueReusable
;
Boolean
venueReusable
;
@ColumnInfo
(
name
=
"lat"
)
@SerializedName
(
"lat"
)
@SerializedName
(
"lat"
)
double
venueLatitude
;
double
venueLatitude
;
@ColumnInfo
(
name
=
"lng"
)
@SerializedName
(
"lng"
)
@SerializedName
(
"lng"
)
double
venueLongitude
;
double
venueLongitude
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment