@Entity
public class PredictionAccuracy
extends java.lang.Object
implements org.hibernate.classic.Lifecycle, java.io.Serializable
Serializable since Hibernate requires such.
Implements Lifecycle so that can have the onLoad() callback be called when reading in data so that can intern() member strings. In order to do this the String members could not be declared as final since they are updated after the constructor is called.
Constructor and Description |
---|
PredictionAccuracy(java.lang.String routeId,
java.lang.String directionId,
java.lang.String stopId,
java.lang.String tripId,
java.util.Date arrivalDepartureTime,
java.util.Date predictedTime,
java.util.Date predictionReadTime,
java.lang.String predictionSource,
java.lang.String vehicleId,
java.lang.Boolean affectedByWaitStop)
Simple constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.util.Date |
getArrivalDepartureTime() |
java.lang.String |
getDirectionId() |
java.util.Date |
getPredictedTime() |
int |
getPredictionAccuracyMsecs() |
int |
getPredictionLengthMsecs() |
java.util.Date |
getPredictionReadTime() |
java.lang.String |
getPredictionSource() |
java.lang.String |
getRouteId() |
java.lang.String |
getStopId() |
java.lang.String |
getTripId() |
java.lang.String |
getVehicleId() |
int |
hashCode() |
java.lang.Boolean |
isAffectedByWaitStop()
True if the prediction is based on scheduled departure time, false if
not.
|
boolean |
onDelete(org.hibernate.Session s)
Implemented due to Lifecycle interface being implemented.
|
void |
onLoad(org.hibernate.Session s,
java.io.Serializable id)
Callback due to implementing Lifecycle interface.
|
boolean |
onSave(org.hibernate.Session s)
Implemented due to Lifecycle interface being implemented.
|
boolean |
onUpdate(org.hibernate.Session s)
Implemented due to Lifecycle interface being implemented.
|
java.lang.String |
toString() |
public PredictionAccuracy(java.lang.String routeId, java.lang.String directionId, java.lang.String stopId, java.lang.String tripId, java.util.Date arrivalDepartureTime, java.util.Date predictedTime, java.util.Date predictionReadTime, java.lang.String predictionSource, java.lang.String vehicleId, java.lang.Boolean affectedByWaitStop)
routeId
- directionId
- stopId
- tripId
- arrivalDepartureTime
- predictedTime
- The time the vehicle was predicted to arrive at the stoppredictionReadTime
- predictionSource
- vehicleId
- public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getRouteId()
public java.lang.String getDirectionId()
public java.lang.String getStopId()
public java.lang.String getTripId()
public java.util.Date getArrivalDepartureTime()
public java.util.Date getPredictedTime()
public java.util.Date getPredictionReadTime()
public int getPredictionLengthMsecs()
public int getPredictionAccuracyMsecs()
public java.lang.String getPredictionSource()
public java.lang.String getVehicleId()
public java.lang.Boolean isAffectedByWaitStop()
public void onLoad(org.hibernate.Session s, java.io.Serializable id) throws org.hibernate.CallbackException
onLoad
in interface org.hibernate.classic.Lifecycle
org.hibernate.CallbackException
public boolean onSave(org.hibernate.Session s) throws org.hibernate.CallbackException
onSave
in interface org.hibernate.classic.Lifecycle
org.hibernate.CallbackException
public boolean onUpdate(org.hibernate.Session s) throws org.hibernate.CallbackException
onUpdate
in interface org.hibernate.classic.Lifecycle
org.hibernate.CallbackException
public boolean onDelete(org.hibernate.Session s) throws org.hibernate.CallbackException
onDelete
in interface org.hibernate.classic.Lifecycle
org.hibernate.CallbackException