Package edu.cnm.deepdive.viral.model.dao
Interface ActionTakenDao
-
public interface ActionTakenDao
An interface containing various methods for interacting with the database table for theActionTaken
object.
-
-
Field Summary
Fields Modifier and Type Field Description static String
FEED_ACTIONS_QUERY
static String
FRIEND_MESSAGES_QUERY
static String
FRIEND_POSTS_QUERY
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Single<Integer>
delete(ActionTaken actionTaken)
Deletes a single action taken.Single<Integer>
delete(ActionTaken... actionsTaken)
Deletes several actions taken passed via varargs.Single<Integer>
delete(Collection<ActionTaken> actionsTaken)
Deletes a collection of actions taken.Single<Long>
insert(ActionTaken actionTaken)
Inserts a single action taken.Single<List<Long>>
insert(ActionTaken... actionsTaken)
Inserts several actions taken passed via varargs.Single<List<Long>>
insert(Collection<ActionTaken> actionsTaken)
Inserts a collection of actions taken.LiveData<List<ActionTaken>>
selectFeedActions()
Query to provide the actions taken that make up the user's feed.LiveData<List<ActionTaken>>
selectMessagesByFriend(long friend)
Query to provide the actions taken that are messages by a specific friend.LiveData<List<ActionTaken>>
selectPostsByFriend(long friend)
Query to provide the actions taken that are posts by a specific friend.LiveData<ActionTaken>
selectSpecificActionTaken(long id)
Query to provide a specific action taken.Single<Integer>
update(ActionTaken actionTaken)
Updated a single action taken.Single<Integer>
update(ActionTaken... actionsTaken)
Updates several actions taken passed via varargs.Single<Integer>
update(Collection<ActionTaken> actionsTaken)
Updates a collection of actions taken.
-
-
-
Field Detail
-
FEED_ACTIONS_QUERY
static final String FEED_ACTIONS_QUERY
- See Also:
- Constant Field Values
-
FRIEND_POSTS_QUERY
static final String FRIEND_POSTS_QUERY
- See Also:
- Constant Field Values
-
FRIEND_MESSAGES_QUERY
static final String FRIEND_MESSAGES_QUERY
- See Also:
- Constant Field Values
-
-
Method Detail
-
insert
Single<Long> insert(ActionTaken actionTaken)
Inserts a single action taken.- Parameters:
actionTaken
- TheActionTaken
to be inserted.- Returns:
- A
Single
containing aLong
.
-
insert
Single<List<Long>> insert(ActionTaken... actionsTaken)
Inserts several actions taken passed via varargs.- Parameters:
actionsTaken
- Varargs ofActionTaken
to be inserted.- Returns:
- A
Single
List
ofLong
.
-
insert
Single<List<Long>> insert(Collection<ActionTaken> actionsTaken)
Inserts a collection of actions taken.- Parameters:
actionsTaken
- ACollection
ofActionTaken
to be inserted.- Returns:
- A
Single
List
ofLong
.
-
update
Single<Integer> update(ActionTaken actionTaken)
Updated a single action taken.- Parameters:
actionTaken
- TheActionTaken
to be updated.- Returns:
- A
Single
containing aInteger
.
-
update
Single<Integer> update(ActionTaken... actionsTaken)
Updates several actions taken passed via varargs.- Parameters:
actionsTaken
- Varargs ofActionTaken
to be updated.- Returns:
- A
Single
containing aInteger
.
-
update
Single<Integer> update(Collection<ActionTaken> actionsTaken)
Updates a collection of actions taken.- Parameters:
actionsTaken
- ACollection
ofActionTaken
to be updated.- Returns:
- A
Single
containing aInteger
.
-
delete
Single<Integer> delete(ActionTaken actionTaken)
Deletes a single action taken.- Parameters:
actionTaken
- TheActionTaken
to be deleted.- Returns:
- A
Single
containing aInteger
.
-
delete
Single<Integer> delete(ActionTaken... actionsTaken)
Deletes several actions taken passed via varargs.- Parameters:
actionsTaken
- Varargs ofActionTaken
to be deleted.- Returns:
- A
Single
containing aInteger
.
-
delete
Single<Integer> delete(Collection<ActionTaken> actionsTaken)
Deletes a collection of actions taken.- Parameters:
actionsTaken
- ACollection
ofActionTaken
to be deleted.- Returns:
- A
Single
containing aInteger
.
-
selectSpecificActionTaken
LiveData<ActionTaken> selectSpecificActionTaken(long id)
Query to provide a specific action taken.- Parameters:
id
- The ID of theActionTaken
.- Returns:
- A
LiveData
containing theActionTaken
.
-
selectFeedActions
LiveData<List<ActionTaken>> selectFeedActions()
Query to provide the actions taken that make up the user's feed.- Returns:
- A
LiveData
containing aList
ofActionTaken
objects.
-
selectPostsByFriend
LiveData<List<ActionTaken>> selectPostsByFriend(long friend)
Query to provide the actions taken that are posts by a specific friend.- Parameters:
friend
- The ID of theFriend
.- Returns:
- A
LiveData
containing aList
ofActionTaken
objects.
-
selectMessagesByFriend
LiveData<List<ActionTaken>> selectMessagesByFriend(long friend)
Query to provide the actions taken that are messages by a specific friend.- Parameters:
friend
- The ID of theFriend
.- Returns:
- A
LiveData
containing aList
ofActionTaken
objects.
-
-