Skip to content

Commit

Permalink
Merge pull request oasp#598 from kiran-vadla/reOpen-596
Browse files Browse the repository at this point in the history
Fix for Issue oasp#596
  • Loading branch information
hohwille authored Jun 27, 2017
2 parents b78a3f3 + 4925943 commit 63e897f
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
* This is the implementation of {@link RevisionListener} that enriches {@link AdvancedRevisionEntity} with additional
* information.
*
* If you are starting the development of your application from scratch , please use this class or else if you have an
* application developed and needs backward compatibility , please use the deprecated class
* {@link io.oasp.module.jpa.dataaccess.base.AdvancedRevisionListener}
*/
public class AdvancedRevisionListener implements RevisionListener {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
import org.hibernate.envers.RevisionNumber;
import org.hibernate.envers.RevisionTimestamp;

import io.oasp.module.jpa.dataaccess.api.AdvancedRevisionListener;

/**
* This is a custom {@link org.hibernate.envers.DefaultRevisionEntity revision entity} also containing the actual user.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/* Copyright (c) The m-m-m Team, Licensed under the Apache License, Version 2.0
* http://www.apache.org/licenses/LICENSE-2.0 */
package io.oasp.module.jpa.dataaccess.base;

import net.sf.mmm.util.session.api.UserSessionAccess;

import org.hibernate.envers.RevisionListener;

/**
* This is the implementation of {@link RevisionListener} that enriches {@link AdvancedRevisionEntity} with additional
* information.
*
* @deprecated If you want to have the backward compatibility with your existing code , please use this class else if
* you are starting the development of application from scratch, please use
* {@link io.oasp.module.jpa.dataaccess.api.AdvancedRevisionListener}
*/
@Deprecated
public class AdvancedRevisionListener implements RevisionListener {

/**
* The constructor.
*/
public AdvancedRevisionListener() {

super();
}

@Override
public void newRevision(Object revisionEntity) {

AdvancedRevisionEntity revision = (AdvancedRevisionEntity) revisionEntity;
revision.setUser(UserSessionAccess.getUserLogin());
}

}

0 comments on commit 63e897f

Please sign in to comment.