mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merged V2.2 to HEAD
8219: Fix audit date behaviour, auto truncate all values to fit, fix retrying transaction use AR-1923 AWC-1637 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8486 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -38,7 +38,7 @@ import org.hibernate.Session;
|
||||
*/
|
||||
public class AuditFactImpl implements AuditFact
|
||||
{
|
||||
private long id;
|
||||
private Long id;
|
||||
|
||||
private AuditDate auditDate;
|
||||
|
||||
@@ -378,12 +378,12 @@ public class AuditFactImpl implements AuditFact
|
||||
*
|
||||
* @see org.alfresco.repo.audit.hibernate.AuditFact#getId()
|
||||
*/
|
||||
public long getId()
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
protected void setId(long id)
|
||||
protected void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
@@ -587,18 +587,4 @@ public class AuditFactImpl implements AuditFact
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method to get all the audit entries for a node.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public static List<AuditFact> getAuditTrail(Session session, NodeRef nodeRef)
|
||||
{
|
||||
Query query = session.getNamedQuery(HibernateAuditDAO.QUERY_AUDIT_TRAIL);
|
||||
query.setParameter(HibernateAuditDAO.QUERY_AUDIT_PROTOCOL, nodeRef.getStoreRef().getProtocol());
|
||||
query.setParameter(HibernateAuditDAO.QUERY_AUDIT_STORE_ID, nodeRef.getStoreRef().getIdentifier());
|
||||
query.setParameter(HibernateAuditDAO.QUERY_AUDIT_NODE_ID, nodeRef.getId());
|
||||
query.setParameter(HibernateAuditDAO.QUERY_AUDIT_NODE_REF, "%"+nodeRef.toString()+"%");
|
||||
return (List<AuditFact>) query.list();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user