Skip to content

Commit

Permalink
Issue #5: Improve the Utility of the Trip Problem Report Admin Interface
Browse files Browse the repository at this point in the history
Add additioal database index for BlockLocationRecords to speed up location record lookups.
  • Loading branch information
bdferris committed May 10, 2012
1 parent 918f97d commit b6624a6
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,11 @@
*/
@Entity
@Table(name = "transit_data_block_location_records")
@org.hibernate.annotations.Table(appliesTo = "transit_data_block_location_records", indexes = {@Index(name = "vehicle_and_time", columnNames = {
"vehicle_agencyId", "vehicle_id", "time"})})
@org.hibernate.annotations.Table(appliesTo = "transit_data_block_location_records", indexes = {
@Index(name = "vehicle_and_time", columnNames = {
"vehicle_agencyId", "vehicle_id", "time"}),
@Index(name = "vehicle_and_serviceDate", columnNames = {
"vehicle_agencyId", "vehicle_id", "serviceDate"})})
@org.hibernate.annotations.Entity(mutable = false)
@Cache(usage = CacheConcurrencyStrategy.READ_ONLY)
public class BlockLocationRecord {
Expand Down Expand Up @@ -88,7 +91,7 @@ public class BlockLocationRecord {

@Column(nullable = true)
private final Double orientation;

@Embedded
@AttributeOverrides({
@AttributeOverride(name = "agencyId", column = @Column(name = "timepoint_agencyId", length = 50)),
Expand Down Expand Up @@ -216,7 +219,7 @@ public boolean isDistanceAlongBlockSet() {
public Double getDistanceAlongBlock() {
return distanceAlongBlock;
}

public Double getDistanceAlongTrip() {
return distanceAlongTrip;
}
Expand Down Expand Up @@ -300,7 +303,7 @@ public static class Builder {
private Double scheduleDeviation = null;

private Double distanceAlongBlock = null;

private Double distanceAlongTrip = null;

private Double locationLat = null;
Expand Down

0 comments on commit b6624a6

Please sign in to comment.