|
Hibernate example source code file (Staff.java)
The Hibernate Staff.java source codepackage org.hibernate.envers.test.integration.readwriteexpression; import org.hibernate.annotations.ColumnTransformer; import org.hibernate.envers.Audited; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; @Entity @Table(name="t_staff") public class Staff { public Staff() { } public Staff(double sizeInInches, Integer id) { this.sizeInInches = sizeInInches; this.id = id; } @Id public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } private Integer id; @Audited @Column(name="size_in_cm") @ColumnTransformer( forColumn = "size_in_cm", read = "size_in_cm / 2.54E0", write = "? * 2.54E0" ) public double getSizeInInches() { return sizeInInches; } public void setSizeInInches(double sizeInInches) { this.sizeInInches = sizeInInches; } private double sizeInInches; } Other Hibernate examples (source code examples)Here is a short list of links related to this Hibernate Staff.java source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.