Back to project page intelligent-lock-pattern.
The source code is released under:
GNU General Public License
If you think the Android project intelligent-lock-pattern listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package org.unioeste.ilp.models; /* w w w . j ava 2 s. com*/ import org.unioeste.ilp.models.DaoSession; import de.greenrobot.dao.DaoException; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. Enable "keep" sections if you want to edit. /** * Entity mapped to table samples. */ public class Sample { private Long id; private double event_time; private double pressure; private double pressure_area; private Long attempt_id; /** Used to resolve relations */ private transient DaoSession daoSession; /** Used for active entity operations. */ private transient SampleDao myDao; private Attempt attempt; private Long attempt__resolvedKey; public Sample() { } public Sample(Long id) { this.id = id; } public Sample(Long id, double event_time, double pressure, double pressure_area, Long attempt_id) { this.id = id; this.event_time = event_time; this.pressure = pressure; this.pressure_area = pressure_area; this.attempt_id = attempt_id; } /** called by internal mechanisms, do not call yourself. */ public void __setDaoSession(DaoSession daoSession) { this.daoSession = daoSession; myDao = daoSession != null ? daoSession.getSampleDao() : null; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public double getEvent_time() { return event_time; } public void setEvent_time(double event_time) { this.event_time = event_time; } public double getPressure() { return pressure; } public void setPressure(double pressure) { this.pressure = pressure; } public double getPressure_area() { return pressure_area; } public void setPressure_area(double pressure_area) { this.pressure_area = pressure_area; } public Long getAttempt_id() { return attempt_id; } public void setAttempt_id(Long attempt_id) { this.attempt_id = attempt_id; } /** To-one relationship, resolved on first access. */ public Attempt getAttempt() { if (attempt__resolvedKey == null || !attempt__resolvedKey.equals(attempt_id)) { if (daoSession == null) { throw new DaoException("Entity is detached from DAO context"); } AttemptDao targetDao = daoSession.getAttemptDao(); attempt = targetDao.load(attempt_id); attempt__resolvedKey = attempt_id; } return attempt; } public void setAttempt(Attempt attempt) { this.attempt = attempt; attempt_id = attempt == null ? null : attempt.getId(); attempt__resolvedKey = attempt_id; } /** 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); } }