fixes bug #9035
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@69427 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
91bd825f60
commit
45f0b0d964
|
@ -90,17 +90,17 @@ public class RegionMetropolitana implements Serializable {
|
|||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 0;
|
||||
hash += (getRegionMetropolitanaId() != null ? getRegionMetropolitanaId().hashCode() : 0);
|
||||
hash += (regionMetropolitanaId != null ? regionMetropolitanaId.hashCode() : 0);
|
||||
return hash;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
if (!(object instanceof Ruta)) {
|
||||
if (!(object instanceof RegionMetropolitana)) {
|
||||
return false;
|
||||
}
|
||||
RegionMetropolitana other = (RegionMetropolitana) object;
|
||||
if ((this.getRegionMetropolitanaId() == null && other.getRegionMetropolitanaId() != null) || (this.getRegionMetropolitanaId() != null && !this.getRegionMetropolitanaId().equals(other.getRegionMetropolitanaId()))) {
|
||||
if ((regionMetropolitanaId == null && other.regionMetropolitanaId != null) || (this.regionMetropolitanaId != null && !this.regionMetropolitanaId.equals(other.regionMetropolitanaId))) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -108,8 +108,8 @@ public class RegionMetropolitana implements Serializable {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
if (getDescRegion() != null || getRegionMetropolitanaId() != null) {
|
||||
return this.getDescRegion() + " - " + this.getRegionMetropolitanaId();
|
||||
if (getDescRegion() != null || regionMetropolitanaId != null) {
|
||||
return this.getDescRegion() + " - " + regionMetropolitanaId;
|
||||
}
|
||||
return " ";
|
||||
}
|
||||
|
|
|
@ -84,9 +84,13 @@ public class TarifaMinima implements Serializable {
|
|||
@ManyToOne
|
||||
private Ruta ruta;
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "REGIONMETROPOLITANA_ID", referencedColumnName = "REGIONMETROPOLITANA_ID")
|
||||
@ManyToOne
|
||||
private RegionMetropolitana regionMetropolitana;
|
||||
|
||||
@JoinColumn(name = "COEFICIENTETARIFA_ID", referencedColumnName = "COEFICIENTETARIFA_ID")
|
||||
@ManyToOne
|
||||
private CoeficienteTarifa coeficienteTarifa;
|
||||
|
||||
public TarifaMinima() {
|
||||
}
|
||||
|
@ -247,5 +251,12 @@ public class TarifaMinima implements Serializable {
|
|||
public void setRegionMetropolitana(RegionMetropolitana regionMetropolitana) {
|
||||
this.regionMetropolitana = regionMetropolitana;
|
||||
}
|
||||
|
||||
|
||||
public CoeficienteTarifa getCoeficienteTarifa() {
|
||||
return coeficienteTarifa;
|
||||
}
|
||||
|
||||
public void setCoeficienteTarifa(CoeficienteTarifa coeficienteTarifa) {
|
||||
this.coeficienteTarifa = coeficienteTarifa;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue