com.stratelia.webactiv.util.statistic.control
Class StatisticBmEJB

java.lang.Object
  extended by com.stratelia.webactiv.util.statistic.control.StatisticBmEJB
All Implemented Interfaces:
StatisticBm

public class StatisticBmEJB
extends Object
implements StatisticBm


Field Summary
static int ACTION_ACCESS
           
 
Constructor Summary
StatisticBmEJB()
           
 
Method Summary
 void addStat(String userId, ForeignPK foreignPK, int actionType, String objectType)
           
 void addStat(String userId, SilverpeasContent content)
           
 void deleteStats(ForeignPK foreignPK, String objectType)
           
 void deleteStats(SilverpeasContent content)
           
 void deleteStatsOfComponent(String componentId)
           
 int getCount(ForeignPK foreignPK, int action, String objectType)
           
 int getCount(ForeignPK foreignPK, String objectType)
           
 int getCount(List<ForeignPK> foreignPKs, int action, String objectType)
           
 int getCount(SilverpeasContent content)
           
 int getCount(SilverpeasContent content, int action)
           
 int getCountByPeriod(List<WAPrimaryKey> primaryKeys, int action, String objectType, Date startDate, Date endDate)
           
 int getCountByPeriodAndUser(List<WAPrimaryKey> primaryKeys, String objectType, Date startDate, Date endDate, List<String> userIds)
           
 int getDistinctCountByPeriod(List<WAPrimaryKey> primaryKeys, int action, String objectType, Date startDate, Date endDate)
           
 int getDistinctCountByPeriodUser(List<WAPrimaryKey> primaryKeys, int action, String objectType, Date startDate, Date endDate, List<String> userIds)
           
 Collection<HistoryObjectDetail> getHistoryByAction(ForeignPK foreignPK, int action, String objectType)
           
 Collection<HistoryByUser> getHistoryByObject(ForeignPK foreignPK, int action, String objectType)
           
 Collection<HistoryByUser> getHistoryByObject(ForeignPK foreignPK, int action, String objectType, List<String> userIds)
           
 Collection<HistoryObjectDetail> getHistoryByObjectAndUser(ForeignPK foreignPK, int action, String objectType, String userId)
           
 Collection<HistoryObjectDetail> getLastHistoryOfObjectsForUser(String userId, int actionType, String objectType, int nbObjects)
          Gets the last history detail of each object associated to a user.
 boolean isRead(SilverpeasContent content, String userId)
           
 void moveStat(ForeignPK toForeignPK, int actionType, String objectType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACTION_ACCESS

public static final int ACTION_ACCESS
See Also:
Constant Field Values
Constructor Detail

StatisticBmEJB

public StatisticBmEJB()
Method Detail

addStat

public void addStat(String userId,
                    ForeignPK foreignPK,
                    int actionType,
                    String objectType)
Specified by:
addStat in interface StatisticBm

addStat

public void addStat(String userId,
                    SilverpeasContent content)
Specified by:
addStat in interface StatisticBm

getCount

public int getCount(List<ForeignPK> foreignPKs,
                    int action,
                    String objectType)
Specified by:
getCount in interface StatisticBm

getCount

public int getCount(ForeignPK foreignPK,
                    int action,
                    String objectType)
Specified by:
getCount in interface StatisticBm

getCount

public int getCount(SilverpeasContent content,
                    int action)
Specified by:
getCount in interface StatisticBm

getCount

public int getCount(ForeignPK foreignPK,
                    String objectType)
Specified by:
getCount in interface StatisticBm

getCount

public int getCount(SilverpeasContent content)
Specified by:
getCount in interface StatisticBm

getHistoryByAction

public Collection<HistoryObjectDetail> getHistoryByAction(ForeignPK foreignPK,
                                                          int action,
                                                          String objectType)
Specified by:
getHistoryByAction in interface StatisticBm

getHistoryByObjectAndUser

public Collection<HistoryObjectDetail> getHistoryByObjectAndUser(ForeignPK foreignPK,
                                                                 int action,
                                                                 String objectType,
                                                                 String userId)
Specified by:
getHistoryByObjectAndUser in interface StatisticBm

getHistoryByObject

public Collection<HistoryByUser> getHistoryByObject(ForeignPK foreignPK,
                                                    int action,
                                                    String objectType)
Specified by:
getHistoryByObject in interface StatisticBm

getHistoryByObject

public Collection<HistoryByUser> getHistoryByObject(ForeignPK foreignPK,
                                                    int action,
                                                    String objectType,
                                                    List<String> userIds)
Specified by:
getHistoryByObject in interface StatisticBm

deleteStats

public void deleteStats(ForeignPK foreignPK,
                        String objectType)
Specified by:
deleteStats in interface StatisticBm

deleteStats

public void deleteStats(SilverpeasContent content)
Specified by:
deleteStats in interface StatisticBm

deleteStatsOfComponent

public void deleteStatsOfComponent(String componentId)
Specified by:
deleteStatsOfComponent in interface StatisticBm

moveStat

public void moveStat(ForeignPK toForeignPK,
                     int actionType,
                     String objectType)
Specified by:
moveStat in interface StatisticBm

getCountByPeriod

public int getCountByPeriod(List<WAPrimaryKey> primaryKeys,
                            int action,
                            String objectType,
                            Date startDate,
                            Date endDate)
Specified by:
getCountByPeriod in interface StatisticBm
objectType - String representation of an object type
startDate - the start date
endDate - the end date
Returns:
the number of access over a list of publications between startDate and endDate

getCountByPeriodAndUser

public int getCountByPeriodAndUser(List<WAPrimaryKey> primaryKeys,
                                   String objectType,
                                   Date startDate,
                                   Date endDate,
                                   List<String> userIds)
Specified by:
getCountByPeriodAndUser in interface StatisticBm
objectType - String representation of an object type
startDate - the start date
endDate - the end date
userIds - the user identifiers
Returns:
the number of access over a list of publications between startDate and endDate for specific user

getDistinctCountByPeriod

public int getDistinctCountByPeriod(List<WAPrimaryKey> primaryKeys,
                                    int action,
                                    String objectType,
                                    Date startDate,
                                    Date endDate)
Specified by:
getDistinctCountByPeriod in interface StatisticBm
objectType - String representation of an object type
startDate - the start date
endDate - the end date
Returns:
the number of access over a list of publications between startDate and endDate

getDistinctCountByPeriodUser

public int getDistinctCountByPeriodUser(List<WAPrimaryKey> primaryKeys,
                                        int action,
                                        String objectType,
                                        Date startDate,
                                        Date endDate,
                                        List<String> userIds)
Specified by:
getDistinctCountByPeriodUser in interface StatisticBm

getLastHistoryOfObjectsForUser

public Collection<HistoryObjectDetail> getLastHistoryOfObjectsForUser(String userId,
                                                                      int actionType,
                                                                      String objectType,
                                                                      int nbObjects)
Description copied from interface: StatisticBm
Gets the last history detail of each object associated to a user. The result is sorted on the date time from the youngest to the oldest and limited according to the nbObjects parameter.

Specified by:
getLastHistoryOfObjectsForUser in interface StatisticBm
Returns:
ordered list of unique objects used by the user

isRead

public boolean isRead(SilverpeasContent content,
                      String userId)
Specified by:
isRead in interface StatisticBm


Copyright © 2016 Silverpeas. All Rights Reserved.