Rev 36805 | Blame | Compare with Previous | Last modification | View Log | RSS feed
package com.spice.profitmandi.dao.entity.user;import javax.persistence.*;import java.time.LocalDate;import java.time.LocalDateTime;@Entity@NamedQueries({@NamedQuery(name = "BeatSchedule.selectByUserIdAndDateRange",query ="SELECT bs " +"FROM BeatSchedule bs, Beat b " +"WHERE bs.beatId = b.id " +"AND b.authUserId = :userId " +"AND b.active = true " +"AND bs.startDate <= :endDate " +"AND (bs.endDate IS NULL OR bs.endDate >= :startDate) " +"ORDER BY bs.startDate ASC")})@Table(name = "user.beat_schedule")public class BeatSchedule {@Id@Column(name = "id", unique = true, updatable = false)@GeneratedValue(strategy = GenerationType.IDENTITY)private int id;@Column(name = "beat_id")private int beatId;@Column(name = "start_date")private LocalDate startDate;@Column(name = "end_date")private LocalDate endDate;@Column(name = "day_number")private int dayNumber;@Column(name = "total_distance_km")private Double totalDistanceKm;@Column(name = "total_time_mins")private Integer totalTimeMins;@Column(name = "end_action")private String endAction;@Column(name = "stay_location_name")private String stayLocationName;@Column(name = "stay_latitude")private String stayLatitude;@Column(name = "stay_longitude")private String stayLongitude;@Column(name = "created_timestamp")private LocalDateTime createdTimestamp;@Column(name = "agenda_filled_timestamp")private LocalDateTime agendaFilledTimestamp;public int getId() {return id;}public void setId(int id) {this.id = id;}public int getBeatId() {return beatId;}public void setBeatId(int beatId) {this.beatId = beatId;}public LocalDate getStartDate() {return startDate;}public void setStartDate(LocalDate startDate) {this.startDate = startDate;}public LocalDate getEndDate() {return endDate;}public void setEndDate(LocalDate endDate) {this.endDate = endDate;}public int getDayNumber() {return dayNumber;}public void setDayNumber(int dayNumber) {this.dayNumber = dayNumber;}public Double getTotalDistanceKm() {return totalDistanceKm;}public void setTotalDistanceKm(Double totalDistanceKm) {this.totalDistanceKm = totalDistanceKm;}public Integer getTotalTimeMins() {return totalTimeMins;}public void setTotalTimeMins(Integer totalTimeMins) {this.totalTimeMins = totalTimeMins;}public String getEndAction() {return endAction;}public void setEndAction(String endAction) {this.endAction = endAction;}public String getStayLocationName() {return stayLocationName;}public void setStayLocationName(String stayLocationName) {this.stayLocationName = stayLocationName;}public String getStayLatitude() {return stayLatitude;}public void setStayLatitude(String stayLatitude) {this.stayLatitude = stayLatitude;}public String getStayLongitude() {return stayLongitude;}public void setStayLongitude(String stayLongitude) {this.stayLongitude = stayLongitude;}public LocalDateTime getCreatedTimestamp() {return createdTimestamp;}public void setCreatedTimestamp(LocalDateTime createdTimestamp) {this.createdTimestamp = createdTimestamp;}public LocalDateTime getAgendaFilledTimestamp() {return agendaFilledTimestamp;}public void setAgendaFilledTimestamp(LocalDateTime agendaFilledTimestamp) {this.agendaFilledTimestamp = agendaFilledTimestamp;}}