Issue #2125: Clean up hibernate warnings

Change-Id: Ieb78e7e518a90f09c8db6d72213d5bffa357414e

Former-commit-id: 115c04ac15 [formerly d7e7ca2e26] [formerly f30181d730] [formerly f30181d730 [formerly e2d20753e1]] [formerly 0c058f461c [formerly f30181d730 [formerly e2d20753e1] [formerly 0c058f461c [formerly 4a99614b887fe02e1ad9831fc9414ceb6808ba7b]]]]
Former-commit-id: 0c058f461c
Former-commit-id: fa776985becdd7d4f0b6f93cc8b9668f64c62f44 [formerly 3b734e85284d24a2773d8ffa7aec5062ace9f74d] [formerly caa06ce1e1 [formerly 7054a06acb]]
Former-commit-id: caa06ce1e1
Former-commit-id: 73b61633e2
This commit is contained in:
Richard Peter 2014-01-17 14:12:34 -06:00
parent 6991f62e7a
commit 9a42df7c7a
25 changed files with 398 additions and 204 deletions

View file

@ -59,17 +59,17 @@
<!-- c3p0 Connection Pool Properties -->
<!-- Additional properties may be added to c3p0.properties -->
<property name="c3p0.acquire_increment">1</property>
<property name="c3p0.idle_test_period">60</property>
<property name="c3p0.timeout">300</property>
<property name="c3p0.max_size">10</property>
<property name="c3p0.max_statements">10</property>
<property name="c3p0.min_size">1</property>
<property name="hibernate.c3p0.acquire_increment">1</property>
<property name="hibernate.c3p0.idle_test_period">60</property>
<property name="hibernate.c3p0.timeout">300</property>
<property name="hibernate.c3p0.max_size">10</property>
<property name="hibernate.c3p0.max_statements">10</property>
<property name="hibernate.c3p0.min_size">1</property>
<!-- Cache Properties -->
<property name="hibernate.cache.use_second_level_cache">false</property>
<property name="cache.use_query_cache">false</property>
<property name="hibernate.cache.use_query_cache">false</property>
</session-factory>
</hibernate-configuration>

View file

@ -59,17 +59,17 @@
<!-- c3p0 Connection Pool Properties -->
<!-- Additional properties may be added to c3p0.properties -->
<property name="c3p0.acquire_increment">1</property>
<property name="c3p0.idle_test_period">60</property>
<property name="c3p0.timeout">300</property>
<property name="c3p0.max_size">25</property>
<property name="c3p0.max_statements">10</property>
<property name="c3p0.min_size">1</property>
<property name="hibernate.c3p0.acquire_increment">1</property>
<property name="hibernate.c3p0.idle_test_period">60</property>
<property name="hibernate.c3p0.timeout">300</property>
<property name="hibernate.c3p0.max_size">25</property>
<property name="hibernate.c3p0.max_statements">10</property>
<property name="hibernate.c3p0.min_size">1</property>
<!-- Cache Properties -->
<property name="hibernate.cache.use_second_level_cache">false</property>
<property name="cache.use_query_cache">false</property>
<property name="hibernate.cache.use_query_cache">false</property>
</session-factory>
</hibernate-configuration>

View file

@ -59,17 +59,17 @@
<!-- c3p0 Connection Pool Properties -->
<!-- Additional properties may be added to c3p0.properties -->
<property name="c3p0.acquire_increment">1</property>
<property name="c3p0.idle_test_period">60</property>
<property name="c3p0.timeout">300</property>
<property name="c3p0.max_size">10</property>
<property name="c3p0.max_statements">10</property>
<property name="c3p0.min_size">1</property>
<property name="hibernate.c3p0.acquire_increment">1</property>
<property name="hibernate.c3p0.idle_test_period">60</property>
<property name="hibernate.c3p0.timeout">300</property>
<property name="hibernate.c3p0.max_size">10</property>
<property name="hibernate.c3p0.max_statements">10</property>
<property name="hibernate.c3p0.min_size">1</property>
<!-- Cache Properties -->
<property name="hibernate.cache.use_second_level_cache">false</property>
<property name="cache.use_query_cache">false</property>
<property name="hibernate.cache.use_query_cache">false</property>
</session-factory>
</hibernate-configuration>

View file

@ -59,16 +59,16 @@
<!-- c3p0 Connection Pool Properties -->
<!-- Additional properties may be added to c3p0.properties -->
<property name="c3p0.acquire_increment">1</property>
<property name="c3p0.idle_test_period">60</property>
<property name="c3p0.timeout">300</property>
<property name="c3p0.max_size">10</property>
<property name="c3p0.max_statements">10</property>
<property name="c3p0.min_size">1</property>
<property name="hibernate.c3p0.acquire_increment">1</property>
<property name="hibernate.c3p0.idle_test_period">60</property>
<property name="hibernate.c3p0.timeout">300</property>
<property name="hibernate.c3p0.max_size">10</property>
<property name="hibernate.c3p0.max_statements">10</property>
<property name="hibernate.c3p0.min_size">1</property>
<!-- Cache Properties -->
<property name="cache.use_query_cache">false</property>
<property name="hibernate.cache.use_query_cache">false</property>
<property name="hibernate.cache.use_second_level_cache">false</property>
</session-factory>

View file

@ -59,17 +59,17 @@
<!-- c3p0 Connection Pool Properties -->
<!-- Additional properties may be added to c3p0.properties -->
<property name="c3p0.acquire_increment">1</property>
<property name="c3p0.idle_test_period">60</property>
<property name="c3p0.timeout">300</property>
<property name="c3p0.min_size">1</property>
<property name="c3p0.max_size">20</property>
<property name="c3p0.max_statements">20</property>
<property name="hibernate.c3p0.acquire_increment">1</property>
<property name="hibernate.c3p0.idle_test_period">60</property>
<property name="hibernate.c3p0.timeout">300</property>
<property name="hibernate.c3p0.min_size">1</property>
<property name="hibernate.c3p0.max_size">20</property>
<property name="hibernate.c3p0.max_statements">20</property>
<!-- Cache Properties -->
<property name="hibernate.cache.use_second_level_cache">false</property>
<property name="cache.use_query_cache">false</property>
<property name="hibernate.cache.use_query_cache">false</property>
</session-factory>
</hibernate-configuration>

View file

@ -56,17 +56,17 @@
<!-- c3p0 Connection Pool Properties -->
<!-- Additional properties may be added to c3p0.properties -->
<property name="c3p0.acquire_increment">1</property>
<property name="c3p0.idle_test_period">60</property>
<property name="c3p0.timeout">60</property>
<property name="c3p0.max_size">10</property>
<property name="c3p0.max_statements">1000</property>
<property name="c3p0.min_size">1</property>
<property name="hibernate.c3p0.acquire_increment">1</property>
<property name="hibernate.c3p0.idle_test_period">60</property>
<property name="hibernate.c3p0.timeout">60</property>
<property name="hibernate.c3p0.max_size">10</property>
<property name="hibernate.c3p0.max_statements">1000</property>
<property name="hibernate.c3p0.min_size">1</property>
<!-- Cache Properties -->
<property name="hibernate.cache.use_second_level_cache">false</property>
<property name="cache.use_query_cache">false</property>
<property name="hibernate.cache.use_query_cache">false</property>
</session-factory>
</hibernate-configuration>

View file

@ -41,8 +41,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Jul 3, 2013 1655 mpduff Initial creation.
*
* Jul 3, 2013 1655 mpduff Initial creation.
* Jan 17, 2014 2125 rjpeter EmbeddedId classes need hashCode/equals.
* </pre>
*
* @author mpduff
@ -54,6 +54,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@XmlAccessorType(XmlAccessType.NONE)
public class DataDeliverySystemStatusId implements Serializable,
ISerializableObject {
private static final long serialVersionUID = -6970802086185781078L;
@XmlElement
@ -95,4 +96,43 @@ public class DataDeliverySystemStatusId implements Serializable,
public void setName(String name) {
this.name = name;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = (prime * result) + ((name == null) ? 0 : name.hashCode());
result = (prime * result)
+ ((systemType == null) ? 0 : systemType.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
DataDeliverySystemStatusId other = (DataDeliverySystemStatusId) obj;
if (name == null) {
if (other.name != null) {
return false;
}
} else if (!name.equals(other.name)) {
return false;
}
if (systemType == null) {
if (other.systemType != null) {
return false;
}
} else if (!systemType.equals(other.systemType)) {
return false;
}
return true;
}
}

View file

@ -29,7 +29,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
/**
* TODO Add Description
* Primary key for an AutoFaxRecord.
*
* <pre>
*
@ -38,7 +38,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Oct 28, 2010 bfarmer Initial creation
*
* Jan 17, 2014 2125 rjpeter EmbeddedId should implement hashCode/equals
* </pre>
*
* @author bfarmer
@ -96,4 +96,44 @@ public class AutoFaxRecordPK implements ISerializableObject, Serializable {
this.faxNumber = faxNumber;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = (prime * result)
+ ((afosPil == null) ? 0 : afosPil.hashCode());
result = (prime * result)
+ ((faxNumber == null) ? 0 : faxNumber.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
AutoFaxRecordPK other = (AutoFaxRecordPK) obj;
if (afosPil == null) {
if (other.afosPil != null) {
return false;
}
} else if (!afosPil.equals(other.afosPil)) {
return false;
}
if (faxNumber == null) {
if (other.faxNumber != null) {
return false;
}
} else if (!faxNumber.equals(other.faxNumber)) {
return false;
}
return true;
}
}

View file

@ -25,7 +25,6 @@ import javax.measure.unit.SI;
import javax.measure.unit.Unit;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
@ -57,14 +56,13 @@ import com.raytheon.uf.common.status.UFStatus.Priority;
* ------------ ---------- ----------- --------------------------
* 4/7/09 1994 bphillip Initial Creation
* 09/10/2012 DR 15270 D. Friedman Fix subgrid model name handling.
*
* Jan 17, 2014 2125 rjpeter Removed invalid @Table annotation.
* </pre>
*
* @author bphillip
* @version 1
*/
@Entity
@Table(name = "grib_lambertconformal_coverages")
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
@ -287,33 +285,42 @@ public class LambertConformalGridCoverage extends GridCoverage {
@Override
public boolean equals(Object obj) {
if (this == obj)
if (this == obj) {
return true;
if (obj == null)
}
if (obj == null) {
return false;
if (getClass() != obj.getClass())
}
if (getClass() != obj.getClass()) {
return false;
}
if (!super.equals(obj)) {
return false;
}
LambertConformalGridCoverage other = (LambertConformalGridCoverage) obj;
if (Double.doubleToLongBits(latin1) != Double
.doubleToLongBits(other.latin1))
.doubleToLongBits(other.latin1)) {
return false;
}
if (Double.doubleToLongBits(latin2) != Double
.doubleToLongBits(other.latin2))
.doubleToLongBits(other.latin2)) {
return false;
if (Double.doubleToLongBits(lov) != Double.doubleToLongBits(other.lov))
}
if (Double.doubleToLongBits(lov) != Double.doubleToLongBits(other.lov)) {
return false;
}
if (Double.doubleToLongBits(majorAxis) != Double
.doubleToLongBits(other.majorAxis))
.doubleToLongBits(other.majorAxis)) {
return false;
}
if (Double.doubleToLongBits(minorAxis) != Double
.doubleToLongBits(other.minorAxis))
.doubleToLongBits(other.minorAxis)) {
return false;
}
return true;
}
@Override
public boolean spatialEquals(GridCoverage other) {
if (super.spatialEquals(other)) {
LambertConformalGridCoverage otherLambert = (LambertConformalGridCoverage) other;

View file

@ -21,7 +21,6 @@
package com.raytheon.uf.common.gridcoverage;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
@ -49,14 +48,13 @@ import com.raytheon.uf.common.status.UFStatus.Priority;
* ------------ ---------- ----------- --------------------------
* 4/7/09 1994 bphillip Initial Creation
* 09/10/2012 DR 15270 D. Friedman Fix subgrid model name handling.
*
* Jan 17, 2014 2125 rjpeter Removed invalid @Table annotation.
* </pre>
*
* @author bphillip
* @version 1
*/
@Entity
@Table(name = "grib_latlon_coverages")
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
@ -92,11 +90,11 @@ public class LatLonGridCoverage extends GridCoverage {
@Override
public void initialize() throws GridCoverageException {
// lower left is cell center, we want cell corners.
double minLon = getLowerLeftLon() - dx / 2;
double maxLon = minLon + dx * nx;
double minLon = getLowerLeftLon() - (dx / 2);
double maxLon = minLon + (dx * nx);
double centralMeridian = (minLon + maxLon) / 2.0;
if (dx * nx <= 360) {
if ((dx * nx) <= 360) {
centralMeridian = MapUtil.correctLon(centralMeridian);
} else {
// For almost all map projections geotools will clip all math

View file

@ -25,7 +25,6 @@ import javax.measure.unit.SI;
import javax.measure.unit.Unit;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
@ -59,14 +58,13 @@ import com.raytheon.uf.common.status.UFStatus.Priority;
* ------------ ---------- ----------- --------------------------
* 4/7/09 1994 bphillip Initial Creation
* 09/10/2012 DR 15270 D. Friedman Fix subgrid model name handling.
*
* Jan 17, 2014 2125 rjpeter Removed invalid @Table annotation.
* </pre>
*
* @author bphillip
* @version 1
*/
@Entity
@Table(name = "grib_mercator_coverages")
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
@ -123,7 +121,7 @@ public class MercatorGridCoverage extends GridCoverage {
@Override
public void initialize() throws GridCoverageException {
double meridian = 0;
if (la2 == null || lo2 == null) {
if ((la2 == null) || (lo2 == null)) {
initializeSecondCorner();
}
@ -185,20 +183,20 @@ public class MercatorGridCoverage extends GridCoverage {
DirectPosition2D position = null;
switch (firstGridPointCorner) {
case LowerLeft:
position = new DirectPosition2D(firstPosition.x + dx * 1000
* nx, firstPosition.y + dy * 1000 * ny);
position = new DirectPosition2D(firstPosition.x
+ (dx * 1000 * nx), firstPosition.y + (dy * 1000 * ny));
break;
case UpperLeft:
position = new DirectPosition2D(firstPosition.x + dx * 1000
* nx, firstPosition.y - dy * 1000 * ny);
position = new DirectPosition2D(firstPosition.x
+ (dx * 1000 * nx), firstPosition.y - (dy * 1000 * ny));
break;
case LowerRight:
position = new DirectPosition2D(firstPosition.x - dx * 1000
* nx, firstPosition.y - dy * 1000 * ny);
position = new DirectPosition2D(firstPosition.x
- (dx * 1000 * nx), firstPosition.y - (dy * 1000 * ny));
break;
case UpperRight:
position = new DirectPosition2D(firstPosition.x - dx * 1000
* nx, firstPosition.y - dy * 1000 * ny);
position = new DirectPosition2D(firstPosition.x
- (dx * 1000 * nx), firstPosition.y - (dy * 1000 * ny));
break;
default:
throw new GridCoverageException(
@ -352,28 +350,35 @@ public class MercatorGridCoverage extends GridCoverage {
@Override
public boolean equals(Object obj) {
if (this == obj)
if (this == obj) {
return true;
if (obj == null)
}
if (obj == null) {
return false;
if (getClass() != obj.getClass())
}
if (getClass() != obj.getClass()) {
return false;
}
if (!super.equals(obj)) {
return false;
}
MercatorGridCoverage other = (MercatorGridCoverage) obj;
if (Double.doubleToLongBits(latin) != Double
.doubleToLongBits(other.latin))
.doubleToLongBits(other.latin)) {
return false;
}
if (Double.doubleToLongBits(majorAxis) != Double
.doubleToLongBits(other.majorAxis))
.doubleToLongBits(other.majorAxis)) {
return false;
}
if (Double.doubleToLongBits(minorAxis) != Double
.doubleToLongBits(other.minorAxis))
.doubleToLongBits(other.minorAxis)) {
return false;
}
return true;
}
@Override
public boolean spatialEquals(GridCoverage other) {
if (super.spatialEquals(other)) {
MercatorGridCoverage otherMercator = (MercatorGridCoverage) other;

View file

@ -25,7 +25,6 @@ import javax.measure.unit.SI;
import javax.measure.unit.Unit;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
@ -57,14 +56,13 @@ import com.raytheon.uf.common.status.UFStatus.Priority;
* ------------ ---------- ----------- --------------------------
* 4/7/09 1994 bphillip Initial Creation
* 09/10/2012 DR 15270 D. Friedman Fix subgrid model name handling.
*
* Jan 17, 2014 2125 rjpeter Removed invalid @Table annotation.
* </pre>
*
* @author bphillip
* @version 1
*/
@Entity
@Table(name = "grib_polarstereo_coverages")
@XmlRootElement
@XmlAccessorType(XmlAccessType.NONE)
@DynamicSerialize
@ -171,6 +169,7 @@ public class PolarStereoGridCoverage extends GridCoverage {
return rval;
}
@Override
public String getProjectionType() {
return PROJECTION_TYPE;
}
@ -249,49 +248,67 @@ public class PolarStereoGridCoverage extends GridCoverage {
@Override
public boolean equals(Object obj) {
if (this == obj)
if (this == obj) {
return true;
if (obj == null)
}
if (obj == null) {
return false;
if (getClass() != obj.getClass())
}
if (getClass() != obj.getClass()) {
return false;
}
PolarStereoGridCoverage other = (PolarStereoGridCoverage) obj;
if (Double.doubleToLongBits(dx) != Double.doubleToLongBits(other.dx))
if (Double.doubleToLongBits(dx) != Double.doubleToLongBits(other.dx)) {
return false;
if (Double.doubleToLongBits(dy) != Double.doubleToLongBits(other.dy))
}
if (Double.doubleToLongBits(dy) != Double.doubleToLongBits(other.dy)) {
return false;
if (Double.doubleToLongBits(la1) != Double.doubleToLongBits(other.la1))
}
if (Double.doubleToLongBits(la1) != Double.doubleToLongBits(other.la1)) {
return false;
if (Double.doubleToLongBits(lo1) != Double.doubleToLongBits(other.lo1))
}
if (Double.doubleToLongBits(lo1) != Double.doubleToLongBits(other.lo1)) {
return false;
if (Double.doubleToLongBits(lov) != Double.doubleToLongBits(other.lov))
}
if (Double.doubleToLongBits(lov) != Double.doubleToLongBits(other.lov)) {
return false;
if (Double.doubleToLongBits(lad) != Double.doubleToLongBits(other.lad))
}
if (Double.doubleToLongBits(lad) != Double.doubleToLongBits(other.lad)) {
return false;
}
if (Double.doubleToLongBits(majorAxis) != Double
.doubleToLongBits(other.majorAxis))
.doubleToLongBits(other.majorAxis)) {
return false;
}
if (Double.doubleToLongBits(minorAxis) != Double
.doubleToLongBits(other.minorAxis))
.doubleToLongBits(other.minorAxis)) {
return false;
}
if (nx == null) {
if (other.nx != null)
if (other.nx != null) {
return false;
} else if (!nx.equals(other.nx))
}
} else if (!nx.equals(other.nx)) {
return false;
}
if (ny == null) {
if (other.ny != null)
if (other.ny != null) {
return false;
} else if (!ny.equals(other.ny))
}
} else if (!ny.equals(other.ny)) {
return false;
}
if (spacingUnit == null) {
if (other.spacingUnit != null)
if (other.spacingUnit != null) {
return false;
} else if (!spacingUnit.equals(other.spacingUnit))
}
} else if (!spacingUnit.equals(other.spacingUnit)) {
return false;
}
return true;
}
@Override
public boolean spatialEquals(GridCoverage other) {
if (super.spatialEquals(other)) {
PolarStereoGridCoverage otherPolar = (PolarStereoGridCoverage) other;

View file

@ -22,7 +22,6 @@ package oasis.names.tc.ebxml.regrep.xsd.rim.v4;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyElement;
@ -74,6 +73,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* 12/2/2013 1829 bphillip Removed generic methods,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* Jan 17, 2014 2125 rjpeter Removed invalid @Table annotation.
* </pre>
*
* @author bphillip
@ -82,7 +82,6 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*/
@Entity
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "AnyValue")
@XmlRootElement(name = "AnyValue")
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "AnyValueType", propOrder = { "anyValue" })
@ -131,25 +130,30 @@ public class AnyValueType extends ValueType {
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result
result = (prime * result)
+ ((anyValue == null) ? 0 : anyValue.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
if (this == obj) {
return true;
if (!super.equals(obj))
}
if (!super.equals(obj)) {
return false;
if (getClass() != obj.getClass())
}
if (getClass() != obj.getClass()) {
return false;
}
AnyValueType other = (AnyValueType) obj;
if (anyValue == null) {
if (other.anyValue != null)
if (other.anyValue != null) {
return false;
} else if (!anyValue.equals(other.anyValue))
}
} else if (!anyValue.equals(other.anyValue)) {
return false;
}
return true;
}

View file

@ -22,7 +22,6 @@ package oasis.names.tc.ebxml.regrep.xsd.rim.v4;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
@ -71,6 +70,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* 12/2/2013 1829 bphillip Removed generic methods,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* Jan 17, 2014 2125 rjpeter Removed invalid @Table annotation.
* </pre>
*
* @author bphillip
@ -82,7 +82,6 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@DynamicSerialize
@Entity
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "BooleanValue")
public class BooleanValueType extends ValueType {
@Column
@ -126,25 +125,30 @@ public class BooleanValueType extends ValueType {
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result
result = (prime * result)
+ ((booleanValue == null) ? 0 : booleanValue.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
if (this == obj) {
return true;
if (!super.equals(obj))
}
if (!super.equals(obj)) {
return false;
if (getClass() != obj.getClass())
}
if (getClass() != obj.getClass()) {
return false;
}
BooleanValueType other = (BooleanValueType) obj;
if (booleanValue == null) {
if (other.booleanValue != null)
if (other.booleanValue != null) {
return false;
} else if (!booleanValue.equals(other.booleanValue))
}
} else if (!booleanValue.equals(other.booleanValue)) {
return false;
}
return true;
}

View file

@ -28,7 +28,6 @@ import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
@ -80,6 +79,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* 12/2/2013 1829 bphillip Removed generic methods,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* Jan 17, 2014 2125 rjpeter Removed invalid @Table annotation.
* </pre>
*
* @author bphillip
@ -91,7 +91,6 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@DynamicSerialize
@Entity
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "CollectionValue")
public class CollectionValueType extends ValueType {
@XmlElement(name = "Element")
@ -192,32 +191,39 @@ public class CollectionValueType extends ValueType {
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result
result = (prime * result)
+ ((collectionType == null) ? 0 : collectionType.hashCode());
result = prime * result
result = (prime * result)
+ ((collectionValue == null) ? 0 : collectionValue.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
if (this == obj) {
return true;
if (!super.equals(obj))
}
if (!super.equals(obj)) {
return false;
if (getClass() != obj.getClass())
}
if (getClass() != obj.getClass()) {
return false;
}
CollectionValueType other = (CollectionValueType) obj;
if (collectionType == null) {
if (other.collectionType != null)
if (other.collectionType != null) {
return false;
} else if (!collectionType.equals(other.collectionType))
}
} else if (!collectionType.equals(other.collectionType)) {
return false;
}
if (collectionValue == null) {
if (other.collectionValue != null)
if (other.collectionValue != null) {
return false;
} else if (!collectionValue.equals(other.collectionValue))
}
} else if (!collectionValue.equals(other.collectionValue)) {
return false;
}
return true;
}

View file

@ -24,7 +24,6 @@ import java.util.GregorianCalendar;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
@ -79,6 +78,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* 12/2/2013 1829 bphillip Removed generic methods,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* Jan 17, 2014 2125 rjpeter Removed invalid @Table annotation.
* </pre>
*
* @author bphillip
@ -90,7 +90,6 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@DynamicSerialize
@Entity
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "DateTimeValue")
public class DateTimeValueType extends ValueType {
@Column
@ -152,25 +151,30 @@ public class DateTimeValueType extends ValueType {
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result
result = (prime * result)
+ ((dateTimeValue == null) ? 0 : dateTimeValue.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
if (this == obj) {
return true;
if (!super.equals(obj))
}
if (!super.equals(obj)) {
return false;
if (getClass() != obj.getClass())
}
if (getClass() != obj.getClass()) {
return false;
}
DateTimeValueType other = (DateTimeValueType) obj;
if (dateTimeValue == null) {
if (other.dateTimeValue != null)
if (other.dateTimeValue != null) {
return false;
} else if (!dateTimeValue.equals(other.dateTimeValue))
}
} else if (!dateTimeValue.equals(other.dateTimeValue)) {
return false;
}
return true;
}

View file

@ -22,7 +22,6 @@ package oasis.names.tc.ebxml.regrep.xsd.rim.v4;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
@ -73,6 +72,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* 12/2/2013 1829 bphillip Removed generic methods,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* Jan 17, 2014 2125 rjpeter Removed invalid @Table annotation.
* </pre>
*
* @author bphillip
@ -84,7 +84,6 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@DynamicSerialize
@Entity
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "DurationValue")
public class DurationValueType extends ValueType {
@XmlElement(name = "Value")
@ -129,25 +128,30 @@ public class DurationValueType extends ValueType {
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result
result = (prime * result)
+ ((durationValue == null) ? 0 : durationValue.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
if (this == obj) {
return true;
if (!super.equals(obj))
}
if (!super.equals(obj)) {
return false;
if (getClass() != obj.getClass())
}
if (getClass() != obj.getClass()) {
return false;
}
DurationValueType other = (DurationValueType) obj;
if (durationValue == null) {
if (other.durationValue != null)
if (other.durationValue != null) {
return false;
} else if (!durationValue.equals(other.durationValue))
}
} else if (!durationValue.equals(other.durationValue)) {
return false;
}
return true;
}

View file

@ -22,7 +22,6 @@ package oasis.names.tc.ebxml.regrep.xsd.rim.v4;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
@ -71,6 +70,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* 12/2/2013 1829 bphillip Removed generic methods,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* Jan 17, 2014 2125 rjpeter Removed invalid @Table annotation.
* </pre>
*
* @author bphillip
@ -82,7 +82,6 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@DynamicSerialize
@Entity
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "FloatValue")
public class FloatValueType extends ValueType {
@Column
@ -126,25 +125,30 @@ public class FloatValueType extends ValueType {
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result
result = (prime * result)
+ ((floatValue == null) ? 0 : floatValue.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
if (this == obj) {
return true;
if (!super.equals(obj))
}
if (!super.equals(obj)) {
return false;
if (getClass() != obj.getClass())
}
if (getClass() != obj.getClass()) {
return false;
}
FloatValueType other = (FloatValueType) obj;
if (floatValue == null) {
if (other.floatValue != null)
if (other.floatValue != null) {
return false;
} else if (!floatValue.equals(other.floatValue))
}
} else if (!floatValue.equals(other.floatValue)) {
return false;
}
return true;
}

View file

@ -24,7 +24,6 @@ import java.math.BigInteger;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
@ -73,6 +72,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* 12/2/2013 1829 bphillip Removed generic methods,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* Jan 17, 2014 2125 rjpeter Removed invalid @Table annotation.
* </pre>
*
* @author bphillip
@ -84,7 +84,6 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@DynamicSerialize
@Entity
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "IntegerValue")
public class IntegerValueType extends ValueType {
@Column
@ -132,25 +131,30 @@ public class IntegerValueType extends ValueType {
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result
result = (prime * result)
+ ((integerValue == null) ? 0 : integerValue.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
if (this == obj) {
return true;
if (!super.equals(obj))
}
if (!super.equals(obj)) {
return false;
if (getClass() != obj.getClass())
}
if (getClass() != obj.getClass()) {
return false;
}
IntegerValueType other = (IntegerValueType) obj;
if (integerValue == null) {
if (other.integerValue != null)
if (other.integerValue != null) {
return false;
} else if (!integerValue.equals(other.integerValue))
}
} else if (!integerValue.equals(other.integerValue)) {
return false;
}
return true;
}

View file

@ -24,7 +24,6 @@ import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
@ -74,6 +73,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* 12/2/2013 1829 bphillip Removed generic methods,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* Jan 17, 2014 2125 rjpeter Removed invalid @Table annotation.
* </pre>
*
* @author bphillip
@ -85,7 +85,6 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@DynamicSerialize
@Entity
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "InternationalStringValue")
public class InternationalStringValueType extends ValueType {
@XmlElement(name = "Value")
@ -133,8 +132,7 @@ public class InternationalStringValueType extends ValueType {
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime
* result
result = (prime * result)
+ ((internationalStringValue == null) ? 0
: internationalStringValue.hashCode());
return result;
@ -142,19 +140,24 @@ public class InternationalStringValueType extends ValueType {
@Override
public boolean equals(Object obj) {
if (this == obj)
if (this == obj) {
return true;
if (!super.equals(obj))
}
if (!super.equals(obj)) {
return false;
if (getClass() != obj.getClass())
}
if (getClass() != obj.getClass()) {
return false;
}
InternationalStringValueType other = (InternationalStringValueType) obj;
if (internationalStringValue == null) {
if (other.internationalStringValue != null)
if (other.internationalStringValue != null) {
return false;
}
} else if (!internationalStringValue
.equals(other.internationalStringValue))
.equals(other.internationalStringValue)) {
return false;
}
return true;
}

View file

@ -24,7 +24,6 @@ import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
@ -73,6 +72,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* 12/2/2013 1829 bphillip Removed generic methods,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* Jan 17, 2014 2125 rjpeter Removed invalid @Table annotation.
* </pre>
*
* @author bphillip
@ -80,7 +80,6 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
*/
@Entity(name = "MapValue")
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "MapValue")
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "MapValueType", propOrder = { "mapValue" })
@ -129,25 +128,30 @@ public class MapValueType extends ValueType {
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result
result = (prime * result)
+ ((mapValue == null) ? 0 : mapValue.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
if (this == obj) {
return true;
if (!super.equals(obj))
}
if (!super.equals(obj)) {
return false;
if (getClass() != obj.getClass())
}
if (getClass() != obj.getClass()) {
return false;
}
MapValueType other = (MapValueType) obj;
if (mapValue == null) {
if (other.mapValue != null)
if (other.mapValue != null) {
return false;
} else if (!mapValue.equals(other.mapValue))
}
} else if (!mapValue.equals(other.mapValue)) {
return false;
}
return true;
}

View file

@ -24,7 +24,6 @@ import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
@ -73,6 +72,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* 12/2/2013 1829 bphillip Removed generic methods,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* Jan 17, 2014 2125 rjpeter Removed invalid @Table annotation.
* </pre>
*
* @author bphillip
@ -84,7 +84,6 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@DynamicSerialize
@Entity
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "SlotValue")
public class SlotValueType extends ValueType {
@XmlElement(name = "Slot")
@ -129,25 +128,30 @@ public class SlotValueType extends ValueType {
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result
result = (prime * result)
+ ((slotValue == null) ? 0 : slotValue.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
if (this == obj) {
return true;
if (!super.equals(obj))
}
if (!super.equals(obj)) {
return false;
if (getClass() != obj.getClass())
}
if (getClass() != obj.getClass()) {
return false;
}
SlotValueType other = (SlotValueType) obj;
if (slotValue == null) {
if (other.slotValue != null)
if (other.slotValue != null) {
return false;
} else if (!slotValue.equals(other.slotValue))
}
} else if (!slotValue.equals(other.slotValue)) {
return false;
}
return true;
}

View file

@ -22,7 +22,6 @@ package oasis.names.tc.ebxml.regrep.xsd.rim.v4;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
@ -72,6 +71,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* 12/2/2013 1829 bphillip Removed generic methods,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* Jan 17, 2014 2125 rjpeter Removed invalid @Table annotation.
* </pre>
*
* @author bphillip
@ -83,7 +83,6 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@DynamicSerialize
@Entity
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "StringValue")
public class StringValueType extends ValueType {
@Column(columnDefinition = "text")
@ -127,25 +126,30 @@ public class StringValueType extends ValueType {
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result
result = (prime * result)
+ ((stringValue == null) ? 0 : stringValue.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
if (this == obj) {
return true;
if (!super.equals(obj))
}
if (!super.equals(obj)) {
return false;
if (getClass() != obj.getClass())
}
if (getClass() != obj.getClass()) {
return false;
}
StringValueType other = (StringValueType) obj;
if (stringValue == null) {
if (other.stringValue != null)
if (other.stringValue != null) {
return false;
} else if (!stringValue.equals(other.stringValue))
}
} else if (!stringValue.equals(other.stringValue)) {
return false;
}
return true;
}

View file

@ -23,7 +23,6 @@ package oasis.names.tc.ebxml.regrep.xsd.rim.v4;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
@ -73,6 +72,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
* 12/2/2013 1829 bphillip Removed generic methods,
* modified persistence annotations, added
* constructors, hashCode, toString and equals
* Jan 17, 2014 2125 rjpeter Removed invalid @Table annotation.
* </pre>
*
* @author bphillip
@ -84,7 +84,6 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
@DynamicSerialize
@Entity
@Cache(region = RegrepUtil.DB_CACHE_REGION, usage = CacheConcurrencyStrategy.TRANSACTIONAL)
@Table(schema = RegrepUtil.EBXML_SCHEMA, name = "VocabularyTermValue")
public class VocabularyTermValueType extends ValueType {
@XmlElement(name = "Value")
@ -129,8 +128,7 @@ public class VocabularyTermValueType extends ValueType {
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime
* result
result = (prime * result)
+ ((vocabularyTermValue == null) ? 0 : vocabularyTermValue
.hashCode());
return result;
@ -138,18 +136,23 @@ public class VocabularyTermValueType extends ValueType {
@Override
public boolean equals(Object obj) {
if (this == obj)
if (this == obj) {
return true;
if (!super.equals(obj))
}
if (!super.equals(obj)) {
return false;
if (getClass() != obj.getClass())
}
if (getClass() != obj.getClass()) {
return false;
}
VocabularyTermValueType other = (VocabularyTermValueType) obj;
if (vocabularyTermValue == null) {
if (other.vocabularyTermValue != null)
if (other.vocabularyTermValue != null) {
return false;
} else if (!vocabularyTermValue.equals(other.vocabularyTermValue))
}
} else if (!vocabularyTermValue.equals(other.vocabularyTermValue)) {
return false;
}
return true;
}

View file

@ -27,7 +27,7 @@ import javax.persistence.Embeddable;
import com.raytheon.uf.common.serialization.ISerializableObject;
/**
* TODO Add Description
* Primary key for a ClusterTask.
*
* <pre>
*
@ -35,7 +35,7 @@ import com.raytheon.uf.common.serialization.ISerializableObject;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Feb 22, 2010 chammack Initial creation
*
* Jan 17, 2014 2125 rjpeter EmbeddedId should implement hashCode/equals.
* </pre>
*
* @author chammack
@ -82,4 +82,43 @@ public class ClusterTaskPK implements ISerializableObject, Serializable {
this.name = name;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = (prime * result)
+ ((details == null) ? 0 : details.hashCode());
result = (prime * result) + ((name == null) ? 0 : name.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
ClusterTaskPK other = (ClusterTaskPK) obj;
if (details == null) {
if (other.details != null) {
return false;
}
} else if (!details.equals(other.details)) {
return false;
}
if (name == null) {
if (other.name != null) {
return false;
}
} else if (!name.equals(other.name)) {
return false;
}
return true;
}
}