com.stratelia.webactiv.util.statistic.ejb
Class HistoryObjectDAO

java.lang.Object
  extended by com.stratelia.webactiv.util.statistic.ejb.HistoryObjectDAO

public class HistoryObjectDAO
extends Object

Class declaration

Author:

Method Summary
static void add(Connection con, String userId, ForeignPK foreignPK, int actionType, String objectType)
          Method declaration
static void deleteHistoryByObject(Connection con, ForeignPK foreignPK, String objectType)
          Method declaration
static void deleteStatsOfComponent(Connection con, String componentId)
           
static int getCount(Connection con, Collection<ForeignPK> foreignPKs, String objectType)
           
static int getCount(Connection con, ForeignPK foreignPK, String objectType)
           
static int getCountByPeriod(Connection con, WAPrimaryKey primaryKey, String objectType, Date startDate, Date endDate)
           
static int getCountByPeriodAndUser(Connection con, WAPrimaryKey primaryKey, String objectType, Date startDate, Date endDate, String userId)
           
static Collection<HistoryObjectDetail> getHistoryDetailByObject(Connection con, ForeignPK foreignPK, String objectType)
          Method declaration
static Collection<HistoryObjectDetail> getHistoryDetailByObjectAndUser(Connection con, ForeignPK foreignPK, String objectType, String userId)
           
static Collection<HistoryObjectDetail> getHistoryDetails(ResultSet rs, String componentName)
          Method declaration
static Collection<HistoryObjectDetail> getLastHistoryDetailOfObjectsForUser(Connection con, String userId, int actionType, String objectType, int nbObjects)
          Gets the last history detail of each object associated to a user.
static List<String> getListObjectAccessByPeriod(Connection con, List<WAPrimaryKey> primaryKeys, String objectType, Date startDate, Date endDate)
           
static List<String> getListObjectAccessByPeriodAndUser(Connection con, List<WAPrimaryKey> primaryKeys, String objectType, Date startDate, Date endDate, String userId)
           
static void move(Connection con, ForeignPK toForeignPK, int actionType, String objectType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getHistoryDetails

public static Collection<HistoryObjectDetail> getHistoryDetails(ResultSet rs,
                                                                String componentName)
                                                         throws SQLException
Method declaration

Parameters:
rs -
space -
componentName -
Returns:
Throws:
SQLException
See Also:

add

public static void add(Connection con,
                       String userId,
                       ForeignPK foreignPK,
                       int actionType,
                       String objectType)
                throws SQLException
Method declaration

Parameters:
con -
tableName -
userId -
nodePK -
pubPK -
Throws:
SQLException
See Also:

getHistoryDetailByObject

public static Collection<HistoryObjectDetail> getHistoryDetailByObject(Connection con,
                                                                       ForeignPK foreignPK,
                                                                       String objectType)
                                                                throws SQLException
Method declaration

Parameters:
con -
tableName -
foreignPK -
Returns:
Throws:
SQLException
See Also:

getHistoryDetailByObjectAndUser

public static Collection<HistoryObjectDetail> getHistoryDetailByObjectAndUser(Connection con,
                                                                              ForeignPK foreignPK,
                                                                              String objectType,
                                                                              String userId)
                                                                       throws SQLException
Throws:
SQLException

deleteHistoryByObject

public static void deleteHistoryByObject(Connection con,
                                         ForeignPK foreignPK,
                                         String objectType)
                                  throws SQLException
Method declaration

Parameters:
con -
tableName -
foreignPK -
Throws:
SQLException
See Also:

deleteStatsOfComponent

public static void deleteStatsOfComponent(Connection con,
                                          String componentId)
                                   throws SQLException
Throws:
SQLException

getCount

public static int getCount(Connection con,
                           Collection<ForeignPK> foreignPKs,
                           String objectType)
                    throws SQLException
Throws:
SQLException

getCount

public static int getCount(Connection con,
                           ForeignPK foreignPK,
                           String objectType)
                    throws SQLException
Throws:
SQLException

getCountByPeriod

public static int getCountByPeriod(Connection con,
                                   WAPrimaryKey primaryKey,
                                   String objectType,
                                   Date startDate,
                                   Date endDate)
                            throws SQLException
Throws:
SQLException

getCountByPeriodAndUser

public static int getCountByPeriodAndUser(Connection con,
                                          WAPrimaryKey primaryKey,
                                          String objectType,
                                          Date startDate,
                                          Date endDate,
                                          String userId)
                                   throws SQLException
Throws:
SQLException

move

public static void move(Connection con,
                        ForeignPK toForeignPK,
                        int actionType,
                        String objectType)
                 throws SQLException
Throws:
SQLException

getListObjectAccessByPeriod

public static List<String> getListObjectAccessByPeriod(Connection con,
                                                       List<WAPrimaryKey> primaryKeys,
                                                       String objectType,
                                                       Date startDate,
                                                       Date endDate)
                                                throws SQLException
Throws:
SQLException

getListObjectAccessByPeriodAndUser

public static List<String> getListObjectAccessByPeriodAndUser(Connection con,
                                                              List<WAPrimaryKey> primaryKeys,
                                                              String objectType,
                                                              Date startDate,
                                                              Date endDate,
                                                              String userId)
                                                       throws SQLException
Throws:
SQLException

getLastHistoryDetailOfObjectsForUser

public static Collection<HistoryObjectDetail> getLastHistoryDetailOfObjectsForUser(Connection con,
                                                                                   String userId,
                                                                                   int actionType,
                                                                                   String objectType,
                                                                                   int nbObjects)
                                                                            throws SQLException
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

Parameters:
con -
userId -
actionType -
objectType -
nbObjects -
Returns:
Throws:
SQLException


Copyright © 2016 Silverpeas. All Rights Reserved.