thiago.penido 2016-01-28 12:30:31 +00:00
parent 695dcfeb3b
commit 3831eabd67
1 changed files with 7 additions and 3 deletions

View File

@ -22,7 +22,7 @@ import javax.persistence.TemporalType;
@Entity
@SequenceGenerator(name = "CASETA_PEAJE_SEQ", sequenceName = "CASETA_PEAJE_SEQ", allocationSize = 1)
@Table(name = "CASETA_PEAJE")
public class CasetaPeaje implements Serializable {
public class CasetaPeaje implements Serializable, Comparable<CasetaPeaje> {
private static final long serialVersionUID = 1L;
@Id
@ -116,5 +116,9 @@ public class CasetaPeaje implements Serializable {
public String toString() {
return getCasetaPeajeId() + " - " +getDesccaseta();
}
}
@Override
public int compareTo(CasetaPeaje caseta) {
return this.getDesccaseta().compareTo(caseta.getDesccaseta());
}
}