package com.csq.thesceneryalong.db; import com.csq.thesceneryalong.db.DaoSession; import de.greenrobot.dao.DaoException; // THIS CODE IS GENERATED BY greenDAO, EDIT ONLY INSIDE THE "KEEP"-SECTIONS // KEEP INCLUDES - put your custom includes here // KEEP INCLUDES END /** * Entity mapped to table TRACK_POINT. */ public class TrackPoint implements java.io.Serializable { private static final long serialVersionUID = 1L; private Long id; private long trackId; private long time; private double longitude; private double latitude; private Double altitude; private Float accuracy; private Float speed; private Float bearing; private String provider; private int pointStatus; /** Used to resolve relations */ private transient DaoSession daoSession; /** Used for active entity operations. */ private transient TrackPointDao myDao; private Track track; private Long track__resolvedKey; // KEEP FIELDS - put your custom fields here // KEEP FIELDS END public TrackPoint() { } public TrackPoint(Long id) { this.id = id; } public TrackPoint(Long id, long trackId, long time, double longitude, double latitude, Double altitude, Float accuracy, Float speed, Float bearing, String provider, int pointStatus) { this.id = id; this.trackId = trackId; this.time = time; this.longitude = longitude; this.latitude = latitude; this.altitude = altitude; this.accuracy = accuracy; this.speed = speed; this.bearing = bearing; this.provider = provider; this.pointStatus = pointStatus; } /** called by internal mechanisms, do not call yourself. */ public void __setDaoSession(DaoSession daoSession) { this.daoSession = daoSession; myDao = daoSession != null ? daoSession.getTrackPointDao() : null; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public long getTrackId() { return trackId; } public void setTrackId(long trackId) { this.trackId = trackId; } public long getTime() { return time; } public void setTime(long time) { this.time = time; } public double getLongitude() { return longitude; } public void setLongitude(double longitude) { this.longitude = longitude; } public double getLatitude() { return latitude; } public void setLatitude(double latitude) { this.latitude = latitude; } public Double getAltitude() { return altitude; } public void setAltitude(Double altitude) { this.altitude = altitude; } public Float getAccuracy() { return accuracy; } public void setAccuracy(Float accuracy) { this.accuracy = accuracy; } public Float getSpeed() { return speed; } public void setSpeed(Float speed) { this.speed = speed; } public Float getBearing() { return bearing; } public void setBearing(Float bearing) { this.bearing = bearing; } public String getProvider() { return provider; } public void setProvider(String provider) { this.provider = provider; } public int getPointStatus() { return pointStatus; } public void setPointStatus(int pointStatus) { this.pointStatus = pointStatus; } /** To-one relationship, resolved on first access. */ public Track getTrack() { long __key = this.trackId; if (track__resolvedKey == null || !track__resolvedKey.equals(__key)) { if (daoSession == null) { throw new DaoException("Entity is detached from DAO context"); } TrackDao targetDao = daoSession.getTrackDao(); Track trackNew = targetDao.load(__key); synchronized (this) { track = trackNew; track__resolvedKey = __key; } } return track; } public void setTrack(Track track) { if (track == null) { throw new DaoException("To-one property 'trackId' has not-null constraint; cannot set to-one to null"); } synchronized (this) { this.track = track; trackId = track.getId(); track__resolvedKey = trackId; } } /** Convenient call for {@link AbstractDao#delete(Object)}. Entity must attached to an entity context. */ public void delete() { if (myDao == null) { throw new DaoException("Entity is detached from DAO context"); } myDao.delete(this); } /** Convenient call for {@link AbstractDao#update(Object)}. Entity must attached to an entity context. */ public void update() { if (myDao == null) { throw new DaoException("Entity is detached from DAO context"); } myDao.update(this); } /** Convenient call for {@link AbstractDao#refresh(Object)}. Entity must attached to an entity context. */ public void refresh() { if (myDao == null) { throw new DaoException("Entity is detached from DAO context"); } myDao.refresh(this); } // KEEP METHODS - put your custom methods here // KEEP METHODS END }