Sha256: 8128c2f6dc56cd83b60319460120bff6e733d103c4bac316f58c59d86817e543

Contents?: true

Size: 787 Bytes

Versions: 7

Compression:

Stored size: 787 Bytes

Contents

package app.models;

import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;

@MappedSuperclass
public class Entity {
	
	@Id @GeneratedValue
	private 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 (this == obj) {
			return true;
		}
		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

7 entries across 7 versions & 1 rubygems

Version Path
vraptor-scaffold-1.1.0 spec/vraptor-scaffold/generators/app_generator/templates/Entity.java
vraptor-scaffold-1.1.0.pre spec/vraptor-scaffold/generators/app_generator/templates/Entity.java
vraptor-scaffold-1.0.0 spec/lib/generators/app_generator/templates/Entity.java
vraptor-scaffold-0.0.4 spec/lib/generators/app_generator/templates/Entity.java
vraptor-scaffold-0.0.3 spec/lib/generators/app_generator/templates/Entity.java
vraptor-scaffold-0.0.2 spec/lib/generators/app_generator/templates/Entity.java
vraptor-scaffold-0.0.1 spec/lib/generators/app_generator/templates/Entity.java