@Singleton public class JPAActivityStore extends Object implements ActivityStore
Constructor and Description |
---|
JPAActivityStore()
Constructor.
|
JPAActivityStore(JpaStore jpaStore)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
List<ActivityType> |
getActivityTypes(Context context)
This method retrieves a set of activity events associated
with the supplied context value.
|
List<ActivityType> |
getActivityTypes(Context context,
long from,
long to)
This method retrieves a set of activity events associated
with the supplied context value and date/time range.
|
ActivityUnit |
getActivityUnit(String id)
This method queries the persistent store for an activity unit
with the supplied id.
|
List<ActivityType> |
query(QuerySpec query)
This method queries the persistent store for activity events
that satisfy the supplied query.
|
List<ActivityType> |
query(String query)
This method performs the query associated with the supplied query
expression, returning the results as a list of activity types.
|
void |
remove(ActivityUnit au)
This method removes the supplied activity unit.
|
void |
store(List<ActivityUnit> activities)
This method stores the list of activity events.
|
public JPAActivityStore()
public JPAActivityStore(JpaStore jpaStore)
jpaStore
- Explicit JpaStore to usepublic void store(List<ActivityUnit> activities) throws Exception
store
in interface ActivityStore
activities
- The list of activity events to storeException
- Failed to store eventspublic ActivityUnit getActivityUnit(String id) throws Exception
getActivityUnit
in interface ActivityStore
id
- The activity unit idException
- Failed to query activity unitpublic List<ActivityType> getActivityTypes(Context context, long from, long to) throws Exception
getActivityTypes
in interface ActivityStore
context
- The context valuefrom
- The 'from' timestampto
- The 'to' timestampException
- Failed to retrieve the activitiespublic List<ActivityType> getActivityTypes(Context context) throws Exception
getActivityTypes
in interface ActivityStore
context
- The context valueException
- Failed to retrieve the activitiespublic List<ActivityType> query(QuerySpec query) throws Exception
query
in interface ActivityStore
query
- The queryException
- Failed to query eventspublic List<ActivityType> query(String query) throws Exception
query
- The query expressionException
- Failed to perform querypublic void remove(ActivityUnit au) throws Exception
au
- The activity unitException
- Failed to remove activity unitCopyright © 2013-2015 JBoss by Red Hat. All Rights Reserved.