Back to project page guerrillaprose.
The source code is released under:
GNU General Public License
If you think the Android project guerrillaprose 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 de.handler.mobile.android.bachelorapp.app.database; //from w w w.ja va 2s. c o m import android.os.Parcel; import android.os.Parcelable; import java.util.List; 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 GUERRILLA. */ public class Guerrilla implements android.os.Parcelable { private Long id; /** Not-null value. */ private String email; /** Not-null value. */ private String password; private String surname; private String name; private String remember_token; /** Used to resolve relations */ private transient DaoSession daoSession; /** Used for active entity operations. */ private transient GuerrillaDao myDao; private List<GuerrillaProse> guerrillaProseList; // KEEP FIELDS - put your custom fields here // KEEP FIELDS END public Guerrilla() { } public Guerrilla(Long id) { this.id = id; } public Guerrilla(Long id, String email, String password, String surname, String name, String remember_token) { this.id = id; this.email = email; this.password = password; this.surname = surname; this.name = name; this.remember_token = remember_token; } /** called by internal mechanisms, do not call yourself. */ public void __setDaoSession(DaoSession daoSession) { this.daoSession = daoSession; myDao = daoSession != null ? daoSession.getGuerrillaDao() : null; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } /** Not-null value. */ public String getEmail() { return email; } /** Not-null value; ensure this value is available before it is saved to the database. */ public void setEmail(String email) { this.email = email; } /** Not-null value. */ public String getPassword() { return password; } /** Not-null value; ensure this value is available before it is saved to the database. */ public void setPassword(String password) { this.password = password; } public String getSurname() { return surname; } public void setSurname(String surname) { this.surname = surname; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getRemember_token() { return remember_token; } public void setRemember_token(String remember_token) { this.remember_token = remember_token; } /** To-many relationship, resolved on first access (and after reset). Changes to to-many relations are not persisted, make changes to the target entity. */ public List<GuerrillaProse> getGuerrillaProseList() { if (guerrillaProseList == null) { if (daoSession == null) { throw new DaoException("Entity is detached from DAO context"); } GuerrillaProseDao targetDao = daoSession.getGuerrillaProseDao(); List<GuerrillaProse> guerrillaProseListNew = targetDao._queryGuerrilla_GuerrillaProseList(id); synchronized (this) { if(guerrillaProseList == null) { guerrillaProseList = guerrillaProseListNew; } } } return guerrillaProseList; } /** Resets a to-many relationship, making the next get call to query for a fresh result. */ public synchronized void resetGuerrillaProseList() { guerrillaProseList = null; } public void delete() { if (myDao == null) { throw new DaoException("Entity is detached from DAO context"); } myDao.delete(this); } public void update() { if (myDao == null) { throw new DaoException("Entity is detached from DAO context"); } myDao.update(this); } 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 public Guerrilla(String email, String password, String surname, String name) { this.email = email; this.password = password; this.surname = surname; this.name = name; } @Override public int describeContents() { return 0; } @Override public void writeToParcel(Parcel dest, int flags) { try { dest.writeLong(id); dest.writeString(email); dest.writeString(password); dest.writeString(surname); dest.writeString(name); } catch (NullPointerException e) { e.printStackTrace(); } } public Guerrilla(Parcel dest) { id = dest.readLong(); email = dest.readString(); password = dest.readString(); surname = dest.readString(); name = dest.readString(); } public static final Parcelable.Creator<Guerrilla> CREATOR = new Parcelable.Creator<Guerrilla>() { public Guerrilla createFromParcel(Parcel in) { return new Guerrilla(in); } public Guerrilla[] newArray(int size) { return new Guerrilla[size]; } }; // KEEP METHODS END }