|
Hibernate example source code file (Location.java)
The Hibernate Location.java source code//$Id$ package org.hibernate.test.annotations.id.entities; import java.io.Serializable; /** * @author Emmanuel Bernard */ @SuppressWarnings("serial") public class Location implements Serializable { public double longitude; public double latitude; public boolean equals(Object o) { if ( this == o ) return true; if ( o == null || getClass() != o.getClass() ) return false; final Location location = (Location) o; if ( Double.compare( location.latitude, latitude ) != 0 ) return false; if ( Double.compare( location.longitude, longitude ) != 0 ) return false; return true; } public int hashCode() { int result; long temp; temp = longitude != +0.0d ? Double.doubleToLongBits( longitude ) : 0L; result = (int) ( temp ^ ( temp >>> 32 ) ); temp = latitude != +0.0d ? Double.doubleToLongBits( latitude ) : 0L; result = 29 * result + (int) ( temp ^ ( temp >>> 32 ) ); return result; } } Other Hibernate examples (source code examples)Here is a short list of links related to this Hibernate Location.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.