Here are the examples of the java api @org.hibernate.envers.RevisionTimestamp taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
4 Examples
19
Source : UserRevisionEntity.java
with Apache License 2.0
from zhcet-amu
with Apache License 2.0
from zhcet-amu
@Data
@Enreplacedy
@RevisionEnreplacedy(UserRevisionListener.clreplaced)
@EqualsAndHashCode(callSuper = false)
public clreplaced UserRevisionEnreplacedy {
@Id
@RevisionNumber
@GeneratedValue(strategy = GenerationType.IDENreplacedY)
private Integer id;
@RevisionTimestamp
private long timestamp;
private String username;
}
19
Source : Revision.java
with Apache License 2.0
from arthurgregorio
with Apache License 2.0
from arthurgregorio
/**
* The revision enreplacedy to store all the audit revisions of the other enreplacedies
*
* @author Arthur Gregorio
*
* @version 1.0.0
* @since 1.0.0, 04/04/2018
*/
@Enreplacedy
@ToString
@NoArgsConstructor
@EqualsAndHashCode
@Table(name = "revisions")
@RevisionEnreplacedy(RevisionListener.clreplaced)
public clreplaced Revision implements Serializable {
@Id
@Getter
@RevisionNumber
@GeneratedValue(strategy = GenerationType.IDENreplacedY)
@Column(name = "id", unique = true, updatable = false)
private Long id;
@Getter
@Setter
@RevisionTimestamp
@Column(name = "created_on", nullable = false)
private Date createdOn;
@Getter
@Setter
@Column(name = "created_by", length = 45, nullable = false)
private String createdBy;
}
18
Source : MyRevisionEntity.java
with Apache License 2.0
from quarkusio
with Apache License 2.0
from quarkusio
@Enreplacedy
@RevisionEnreplacedy(MyRevisionListener.clreplaced)
public clreplaced MyRevisionEnreplacedy {
@Id
@RevisionNumber
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "myRevisionEnreplacedySeq")
private Long id;
@Temporal(TemporalType.TIMESTAMP)
@RevisionTimestamp
private Date revisionTimestamp;
private String listenerValue;
public Long getId() {
return id;
}
public Date getRevisionTimestamp() {
return revisionTimestamp;
}
public void setRevisionTimestamp(Date revisionTimestamp) {
this.revisionTimestamp = revisionTimestamp;
}
public String getListenerValue() {
return listenerValue;
}
public void setListenerValue(String listenerValue) {
this.listenerValue = listenerValue;
}
}
18
Source : AdvancedRevisionEntity.java
with Apache License 2.0
from devonfw
with Apache License 2.0
from devonfw
/**
* This is a custom {@link org.hibernate.envers.DefaultRevisionEnreplacedy revision enreplacedy} also containing the actual user.
*
* @see org.hibernate.envers.DefaultRevisionEnreplacedy
*/
@Enreplacedy
@RevisionEnreplacedy(AdvancedRevisionListener.clreplaced)
@Table(name = "RevInfo")
public clreplaced AdvancedRevisionEnreplacedy implements PersistenceEnreplacedy<Long> {
/**
* UID for serialization.
*/
private static final long serialVersionUID = 1L;
/**
* @see #getId()
*/
@Id
@GeneratedValue
@RevisionNumber
private Long id;
/**
* @see #getTimestamp()
*/
@RevisionTimestamp
@Column(name = "\"timestamp\"")
private long timestamp;
/**
* @see #getDate()
*/
private transient Date date;
/**
* @see #getUserLogin()
*/
private String userLogin;
/**
* The constructor.
*/
public AdvancedRevisionEnreplacedy() {
super();
}
@Override
public Long getId() {
return this.id;
}
/**
* @param id is the new value of {@link #getId()}.
*/
public void setId(Long id) {
this.id = id;
}
/**
* @return the timestamp when this revision has been created.
*/
public long getTimestamp() {
return this.timestamp;
}
/**
* @return the {@link #getTimestamp() timestamp} as {@link Date}.
*/
public Date getDate() {
if (this.date == null) {
this.date = new Date(this.timestamp);
}
return this.date;
}
/**
* @param timestamp is the new value of {@link #getTimestamp()}.
*/
public void setTimestamp(long timestamp) {
this.timestamp = timestamp;
}
/**
* @return the login or id of the user that has created this revision.
*/
public String getUserLogin() {
return this.userLogin;
}
/**
* @param userLogin is the new value of {@link #getUserLogin()}.
*/
public void setUserLogin(String userLogin) {
this.userLogin = userLogin;
}
@Override
public int getModificationCounter() {
return 0;
}
@Override
public void setModificationCounter(int modificationCounter) {
}
}