Sha256: e4d914c52714bbed93cf20e560f5ad130835a8726b11f749ed8ccf8668de4f6e
Contents?: true
Size: 747 Bytes
Versions: 2
Compression:
Stored size: 747 Bytes
Contents
package app.models; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.MappedSuperclass; @MappedSuperclass public class Entity { @Id @GeneratedValue protected Long id; public void setId(Long id) { this.id = id; } public Long getId() { return id; } @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final Entity other = (Entity) obj; if (id != other.id && (id == null || !id.equals(other.id))) { return false; } return true; } @Override public int hashCode() { int hash = 7; hash = 17 * hash + (this.getId() != null ? this.getId().hashCode() : 0); return hash; } }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
vraptor-scaffold-0.0.1.rc | lib/generators/app_generator/templates/Entity.java |
vraptor-scaffold-0.0.1.beta5 | lib/generators/app_generator/templates/Entity.java |