HHH-5808 - Code formatting
This commit is contained in:
parent
bcfa5ffed9
commit
c4f65ffd8e
|
@ -14,63 +14,63 @@ import javax.persistence.IdClass;
|
|||
@Audited
|
||||
@IdClass(AddressPK.class)
|
||||
public class AddressCompositePKEntity {
|
||||
private Integer id;
|
||||
private Integer ver;
|
||||
private String street;
|
||||
private Integer id;
|
||||
private Integer ver;
|
||||
private String street;
|
||||
|
||||
public AddressCompositePKEntity() {
|
||||
}
|
||||
public AddressCompositePKEntity() {
|
||||
}
|
||||
|
||||
public AddressCompositePKEntity(Integer id, Integer ver, String street) {
|
||||
this.setId(id);
|
||||
this.setVer(ver);
|
||||
this.setStreet(street);
|
||||
}
|
||||
public AddressCompositePKEntity(Integer id, Integer ver, String street) {
|
||||
this.setId(id);
|
||||
this.setVer(ver);
|
||||
this.setStreet(street);
|
||||
}
|
||||
|
||||
@Id
|
||||
@Column(name = "ID", nullable = false, updatable = false)
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
@Id
|
||||
@Column(name = "ID", nullable = false, updatable = false)
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Id
|
||||
@Column(name = "VER", nullable = false, updatable = false)
|
||||
public Integer getVer() {
|
||||
return ver;
|
||||
}
|
||||
@Id
|
||||
@Column(name = "VER", nullable = false, updatable = false)
|
||||
public Integer getVer() {
|
||||
return ver;
|
||||
}
|
||||
|
||||
public void setVer(Integer ver) {
|
||||
this.ver = ver;
|
||||
}
|
||||
public void setVer(Integer ver) {
|
||||
this.ver = ver;
|
||||
}
|
||||
|
||||
@Column(name = "STREET", nullable = false)
|
||||
public String getStreet() {
|
||||
return street;
|
||||
}
|
||||
@Column(name = "STREET", nullable = false)
|
||||
public String getStreet() {
|
||||
return street;
|
||||
}
|
||||
|
||||
public void setStreet(String street) {
|
||||
this.street = street;
|
||||
}
|
||||
public void setStreet(String street) {
|
||||
this.street = street;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "AddressCompositePKEntity[id = " + getId() + ", ver = " + getVer() + ", street = " + getStreet() + "]";
|
||||
}
|
||||
public String toString() {
|
||||
return "AddressCompositePKEntity[id = " + getId() + ", ver = " + getVer() + ", street = " + getStreet() + "]";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = 1;
|
||||
result = 31 * result + ((id == null) ? 0 : id.hashCode());
|
||||
result = 31 * result + ((ver == null) ? 0 : ver.hashCode());
|
||||
result = 31 * result + ((street == null) ? 0 : street.hashCode());
|
||||
return result;
|
||||
}
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = 1;
|
||||
result = 31 * result + ((id == null) ? 0 : id.hashCode());
|
||||
result = 31 * result + ((ver == null) ? 0 : ver.hashCode());
|
||||
result = 31 * result + ((street == null) ? 0 : street.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (!(o instanceof AddressCompositePKEntity)) return false;
|
||||
|
||||
|
@ -81,5 +81,5 @@ public class AddressCompositePKEntity {
|
|||
if (street != null ? !street.equals(that.street) : that.street != null) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,47 +6,47 @@ import java.io.Serializable;
|
|||
* @author Andrei Zagorneanu
|
||||
*/
|
||||
public class AddressPK implements Serializable {
|
||||
private Integer id;
|
||||
private Integer ver;
|
||||
private Integer id;
|
||||
private Integer ver;
|
||||
|
||||
public AddressPK() {
|
||||
}
|
||||
public AddressPK() {
|
||||
}
|
||||
|
||||
public AddressPK(Integer id, Integer ver) {
|
||||
this.setId(id);
|
||||
this.setVer(ver);
|
||||
}
|
||||
public AddressPK(Integer id, Integer ver) {
|
||||
this.setId(id);
|
||||
this.setVer(ver);
|
||||
}
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getVer() {
|
||||
return ver;
|
||||
}
|
||||
public Integer getVer() {
|
||||
return ver;
|
||||
}
|
||||
|
||||
public void setVer(Integer ver) {
|
||||
this.ver = ver;
|
||||
}
|
||||
public void setVer(Integer ver) {
|
||||
this.ver = ver;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "AddressPK[id = " + getId() + ", ver = " + getVer() + "]";
|
||||
}
|
||||
public String toString() {
|
||||
return "AddressPK[id = " + getId() + ", ver = " + getVer() + "]";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = 1;
|
||||
result = 31 * result + ((id == null) ? 0 : id.hashCode());
|
||||
result = 31 * result + ((ver == null) ? 0 : ver.hashCode());
|
||||
return result;
|
||||
}
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = 1;
|
||||
result = 31 * result + ((id == null) ? 0 : id.hashCode());
|
||||
result = 31 * result + ((ver == null) ? 0 : ver.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (!(o instanceof AddressPK)) return false;
|
||||
|
||||
|
@ -56,5 +56,5 @@ public class AddressPK implements Serializable {
|
|||
if (id != null ? !id.equals(that.id) : that.id != null) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,64 +16,64 @@ import org.hibernate.envers.Audited;
|
|||
@Entity
|
||||
@Audited
|
||||
public class PersonCompositeFKEntity {
|
||||
private Integer id;
|
||||
private String name;
|
||||
private AddressCompositePKEntity address;
|
||||
private Integer id;
|
||||
private String name;
|
||||
private AddressCompositePKEntity address;
|
||||
|
||||
public PersonCompositeFKEntity() {
|
||||
}
|
||||
public PersonCompositeFKEntity() {
|
||||
}
|
||||
|
||||
public PersonCompositeFKEntity(Integer id, String name, AddressCompositePKEntity address) {
|
||||
this.setId(id);
|
||||
this.setName(name);
|
||||
this.setAddress(address);
|
||||
}
|
||||
public PersonCompositeFKEntity(Integer id, String name, AddressCompositePKEntity address) {
|
||||
this.setId(id);
|
||||
this.setName(name);
|
||||
this.setAddress(address);
|
||||
}
|
||||
|
||||
@Id
|
||||
@Column(name = "ID", nullable = false, updatable = false)
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
@Id
|
||||
@Column(name = "ID", nullable = false, updatable = false)
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Column(name = "NAME", nullable = false)
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
@Column(name = "NAME", nullable = false)
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@OneToOne(cascade = { CascadeType.ALL }, orphanRemoval = true)
|
||||
@JoinColumns({@JoinColumn(name = "ID_ADDRESS", referencedColumnName = "ID"),
|
||||
@OneToOne(cascade = {CascadeType.ALL}, orphanRemoval = true)
|
||||
@JoinColumns({@JoinColumn(name = "ID_ADDRESS", referencedColumnName = "ID"),
|
||||
@JoinColumn(name = "VER_ADDRESS", referencedColumnName = "VER")})
|
||||
public AddressCompositePKEntity getAddress() {
|
||||
return address;
|
||||
}
|
||||
public AddressCompositePKEntity getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(AddressCompositePKEntity address) {
|
||||
this.address = address;
|
||||
}
|
||||
public void setAddress(AddressCompositePKEntity address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "PersonCompositeFKEntity[id = " + getId() + ", name = " + getName() + "]";
|
||||
}
|
||||
public String toString() {
|
||||
return "PersonCompositeFKEntity[id = " + getId() + ", name = " + getName() + "]";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = 1;
|
||||
result = 31 * result + ((id == null) ? 0 : id.hashCode());
|
||||
result = 31 * result + ((name == null) ? 0 : name.hashCode());
|
||||
return result;
|
||||
}
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = 1;
|
||||
result = 31 * result + ((id == null) ? 0 : id.hashCode());
|
||||
result = 31 * result + ((name == null) ? 0 : name.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (!(o instanceof PersonCompositeFKEntity)) return false;
|
||||
|
||||
PersonCompositeFKEntity that = (PersonCompositeFKEntity) o;
|
||||
|
@ -82,5 +82,5 @@ public class PersonCompositeFKEntity {
|
|||
if (name != null ? !name.equals(that.name) : that.name != null) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue