it.eng.spagobi.monitoring.dao
Class DbAuditImpl

java.lang.Object
  extended by it.eng.spagobi.commons.dao.AbstractHibernateDAO
      extended by it.eng.spagobi.monitoring.dao.DbAuditImpl
All Implemented Interfaces:
IAuditDAO

public class DbAuditImpl
extends AbstractHibernateDAO
implements IAuditDAO


Constructor Summary
DbAuditImpl()
           
 
Method Summary
 void eraseAudit(java.lang.Integer id)
          Erase the audit record with the specified id.
 SbiAudit getLastExecution(java.lang.Integer objId)
          Gets the last execution of a document with id objId.
 java.lang.Double getMediumExecTime(java.lang.Integer objId)
          Gets the last execution of a document with id objId.
 java.util.List getMostPopular(java.util.Collection roles, int limit)
          Finds the most popular executions for the specified roles as a list of HotLink objects.
 java.util.List getMyRecentlyUsed(java.lang.String userId, int limit)
          Finds the most recent executions for the user with the specified user identifier as a list of HotLink objects.
 void insertAudit(SbiAudit aSbiAudit)
          Insert audit.
 java.util.List loadAllAudits()
          Returns the list of all audit records.
 SbiAudit loadAuditByID(java.lang.Integer id)
          Loads all detail information for an audit record identified by its id.
 java.util.List loadAuditsByDocumentLabel(java.lang.String documentLabel)
          Returns the list of all audit records relevant to the document with the specified label at input.
 java.util.List loadAuditsByEngineLabel(java.lang.String engineLabel)
          Returns the list of all audit records relevant to the engine with the specified label at input.
 java.util.List loadAuditsByUserName(java.lang.String userName)
          Returns the list of all audit records relevant to the user with the specified name at input.
 void modifyAudit(SbiAudit aSbiAudit)
          Modify an audit record as per the SbiAudit object at input.
 
Methods inherited from class it.eng.spagobi.commons.dao.AbstractHibernateDAO
getSession, logException, rollbackIfActiveAndClose
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DbAuditImpl

public DbAuditImpl()
Method Detail

insertAudit

public void insertAudit(SbiAudit aSbiAudit)
                 throws it.eng.spago.error.EMFUserError
Insert audit.

Specified by:
insertAudit in interface IAuditDAO
Parameters:
aSbiAudit - the a sbi audit
Throws:
it.eng.spago.error.EMFUserError - the EMF user error
See Also:
it.eng.spagobi.monitoring.dao.IAuditDAO#insertAudit(it.eng.spagobi.bo.SbiAudit)

loadAllAudits

public java.util.List loadAllAudits()
                             throws it.eng.spago.error.EMFUserError
Description copied from interface: IAuditDAO
Returns the list of all audit records.

Specified by:
loadAllAudits in interface IAuditDAO
Returns:
A List object consisting of SbiAudit objects
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

loadAuditByID

public SbiAudit loadAuditByID(java.lang.Integer id)
                       throws it.eng.spago.error.EMFUserError
Description copied from interface: IAuditDAO
Loads all detail information for an audit record identified by its id. All these information, achived by a query to the DB, are stored into an SbiAudit object, which is returned.

Specified by:
loadAuditByID in interface IAuditDAO
Parameters:
id - The id for the audit record to load
Returns:
A SbiAudit object containing all loaded information
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

modifyAudit

public void modifyAudit(SbiAudit aSbiAudit)
                 throws it.eng.spago.error.EMFUserError
Description copied from interface: IAuditDAO
Modify an audit record as per the SbiAudit object at input.

Specified by:
modifyAudit in interface IAuditDAO
Parameters:
aSbiAudit - The SbiAudit object for the audit record to modify
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

loadAuditsByDocumentLabel

public java.util.List loadAuditsByDocumentLabel(java.lang.String documentLabel)
                                         throws it.eng.spago.error.EMFUserError
Description copied from interface: IAuditDAO
Returns the list of all audit records relevant to the document with the specified label at input.

Specified by:
loadAuditsByDocumentLabel in interface IAuditDAO
Parameters:
documentLabel - The document label
Returns:
A List object consisting of SbiAudit objects relevant to the document specified at input
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

loadAuditsByEngineLabel

public java.util.List loadAuditsByEngineLabel(java.lang.String engineLabel)
                                       throws it.eng.spago.error.EMFUserError
Description copied from interface: IAuditDAO
Returns the list of all audit records relevant to the engine with the specified label at input.

Specified by:
loadAuditsByEngineLabel in interface IAuditDAO
Parameters:
engineLabel - The engine label
Returns:
A List object consisting of SbiAudit objects relevant to the engine specified at input
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

loadAuditsByUserName

public java.util.List loadAuditsByUserName(java.lang.String userName)
                                    throws it.eng.spago.error.EMFUserError
Description copied from interface: IAuditDAO
Returns the list of all audit records relevant to the user with the specified name at input.

Specified by:
loadAuditsByUserName in interface IAuditDAO
Parameters:
userName - The user name
Returns:
A List object consisting of SbiAudit objects relevant to the user specified at input
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

eraseAudit

public void eraseAudit(java.lang.Integer id)
                throws it.eng.spago.error.EMFUserError
Description copied from interface: IAuditDAO
Erase the audit record with the specified id.

Specified by:
eraseAudit in interface IAuditDAO
Parameters:
id - The id of the audit record to be erased
Throws:
it.eng.spago.error.EMFUserError - If an Exception occurred

getMostPopular

public java.util.List getMostPopular(java.util.Collection roles,
                                     int limit)
                              throws it.eng.spago.error.EMFUserError
Description copied from interface: IAuditDAO
Finds the most popular executions for the specified roles as a list of HotLink objects.

Specified by:
getMostPopular in interface IAuditDAO
Parameters:
roles - the roles
limit - the limit
Returns:
the list of hot links
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

getMyRecentlyUsed

public java.util.List getMyRecentlyUsed(java.lang.String userId,
                                        int limit)
                                 throws it.eng.spago.error.EMFUserError
Description copied from interface: IAuditDAO
Finds the most recent executions for the user with the specified user identifier as a list of HotLink objects.

Specified by:
getMyRecentlyUsed in interface IAuditDAO
Parameters:
userId - the user id
limit - the limit
Returns:
the list of hot links
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

getLastExecution

public SbiAudit getLastExecution(java.lang.Integer objId)
                          throws it.eng.spago.error.EMFUserError
Description copied from interface: IAuditDAO
Gets the last execution of a document with id objId.

Specified by:
getLastExecution in interface IAuditDAO
Parameters:
objId - the obj id
Returns:
SbiAudit of last execution
Throws:
it.eng.spago.error.EMFUserError - the EMF user error

getMediumExecTime

public java.lang.Double getMediumExecTime(java.lang.Integer objId)
                                   throws it.eng.spago.error.EMFUserError
Description copied from interface: IAuditDAO
Gets the last execution of a document with id objId.

Specified by:
getMediumExecTime in interface IAuditDAO
Parameters:
objId - the obj id
Returns:
Medium Execution Time
Throws:
it.eng.spago.error.EMFUserError - the EMF user error