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 SCENERY. */ public class Scenery implements java.io.Serializable { private static final long serialVersionUID = 1L; private Long id; /** Not-null value. */ private String name; private String description; /** Not-null value. */ private String type; /** Not-null value. */ private String uniqueMack; 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 String address; /** Used to resolve relations */ private transient DaoSession daoSession; /** Used for active entity operations. */ private transient SceneryDao myDao; private Track track; private Long track__resolvedKey; // KEEP FIELDS - put your custom fields here // KEEP FIELDS END public Scenery() { } public Scenery(Long id) { this.id = id; } public Scenery(Long id, String name, String description, String type, String uniqueMack, long trackId, long time, double longitude, double latitude, Double altitude, Float accuracy, Float speed, Float bearing, String provider, String address) { this.id = id; this.name = name; this.description = description; this.type = type; this.uniqueMack = uniqueMack; 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.address = address; } /** called by internal mechanisms, do not call yourself. */ public void __setDaoSession(DaoSession daoSession) { this.daoSession = daoSession; myDao = daoSession != null ? daoSession.getSceneryDao() : null; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } /** Not-null value. */ public String getName() { return name; } /** Not-null value; ensure this value is available before it is saved to the database. */ public void setName(String name) { this.name = name; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } /** Not-null value. */ public String getType() { return type; } /** Not-null value; ensure this value is available before it is saved to the database. */ public void setType(String type) { this.type = type; } /** Not-null value. */ public String getUniqueMack() { return uniqueMack; } /** Not-null value; ensure this value is available before it is saved to the database. */ public void setUniqueMack(String uniqueMack) { this.uniqueMack = uniqueMack; } 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 String getAddress() { return address; } public void setAddress(String address) { this.address = address; } /** 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 }