// Path: campus/src/lecho/app/campus/dao/Unit.java
// public class Unit {
// 
//     private Long id;
//     /** Not-null value. */
//     private String name;
//     private String shortName;
//     private Long facultyId;
// 
//     /** Used to resolve relations */
//     private transient DaoSession daoSession;
// 
//     /** Used for active entity operations. */
//     private transient UnitDao myDao;
// 
//     private Faculty faculty;
//     private Long faculty__resolvedKey;
// 
//     private List<PlaceUnit> placeUnitList;
// 
//     public Unit() {
//     }
// 
//     public Unit(Long id) {
//         this.id = id;
//     }
// 
//     public Unit(Long id, String name, String shortName, Long facultyId) {
//         this.id = id;
//         this.name = name;
//         this.shortName = shortName;
//         this.facultyId = facultyId;
//     }
// 
//     /** called by internal mechanisms, do not call yourself. */
//     public void __setDaoSession(DaoSession daoSession) {
//         this.daoSession = daoSession;
//         myDao = daoSession != null ? daoSession.getUnitDao() : 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 getShortName() {
//         return shortName;
//     }
// 
//     public void setShortName(String shortName) {
//         this.shortName = shortName;
//     }
// 
//     public Long getFacultyId() {
//         return facultyId;
//     }
// 
//     public void setFacultyId(Long facultyId) {
//         this.facultyId = facultyId;
//     }
// 
//     /** To-one relationship, resolved on first access. */
//     public Faculty getFaculty() {
//         Long __key = this.facultyId;
//         if (faculty__resolvedKey == null || !faculty__resolvedKey.equals(__key)) {
//             if (daoSession == null) {
//                 throw new DaoException("Entity is detached from DAO context");
//             }
//             FacultyDao targetDao = daoSession.getFacultyDao();
//             Faculty facultyNew = targetDao.load(__key);
//             synchronized (this) {
//                 faculty = facultyNew;
//             	faculty__resolvedKey = __key;
//             }
//         }
//         return faculty;
//     }
// 
//     public void setFaculty(Faculty faculty) {
//         synchronized (this) {
//             this.faculty = faculty;
//             facultyId = faculty == null ? null : faculty.getId();
//             faculty__resolvedKey = facultyId;
//         }
//     }
// 
//     /** 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<PlaceUnit> getPlaceUnitList() {
//         if (placeUnitList == null) {
//             if (daoSession == null) {
//                 throw new DaoException("Entity is detached from DAO context");
//             }
//             PlaceUnitDao targetDao = daoSession.getPlaceUnitDao();
//             List<PlaceUnit> placeUnitListNew = targetDao._queryUnit_PlaceUnitList(id);
//             synchronized (this) {
//                 if(placeUnitList == null) {
//                     placeUnitList = placeUnitListNew;
//                 }
//             }
//         }
//         return placeUnitList;
//     }
// 
//     /** Resets a to-many relationship, making the next get call to query for a fresh result. */
//     public synchronized void resetPlaceUnitList() {
//         placeUnitList = null;
//     }
// 
//     /** 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);
//     }
// 
// }


import java.util.List;
import java.util.ArrayList;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteStatement;
import de.greenrobot.dao.AbstractDao;
import de.greenrobot.dao.Property;
import de.greenrobot.dao.internal.SqlUtils;
import de.greenrobot.dao.internal.DaoConfig;
import lecho.app.campus.dao.Unit;
package lecho.app.campus.dao;




// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/** 
 * DAO for table UNIT.
*/
public class UnitDao extends AbstractDao<Unit, Long> {

    public static final String TABLENAME = "UNIT";

    /**
     * Properties of entity Unit.<br/>
     * Can be used for QueryBuilder and for referencing column names.
    */
    public static class Properties {
        public final static Property Id = new Property(0, Long.class, "id", true, "_id");
        public final static Property Name = new Property(1, String.class, "name", false, "NAME");
        public final static Property ShortName = new Property(2, String.class, "shortName", false, "SHORT_NAME");
// Path: campus/src/lecho/app/campus/dao/Unit.java
// public class Unit {
// 
//     private Long id;
//     /** Not-null value. */
//     private String name;
//     private String shortName;
//     private Long facultyId;
// 
//     /** Used to resolve relations */
//     private transient DaoSession daoSession;
// 
//     /** Used for active entity operations. */
//     private transient UnitDao myDao;
// 
//     private Faculty faculty;
//     private Long faculty__resolvedKey;
// 
//     private List<PlaceUnit> placeUnitList;
// 
//     public Unit() {
//     }
// 
//     public Unit(Long id) {
//         this.id = id;
//     }
// 
//     public Unit(Long id, String name, String shortName, Long facultyId) {
//         this.id = id;
//         this.name = name;
//         this.shortName = shortName;
//         this.facultyId = facultyId;
//     }
// 
//     /** called by internal mechanisms, do not call yourself. */
//     public void __setDaoSession(DaoSession daoSession) {
//         this.daoSession = daoSession;
//         myDao = daoSession != null ? daoSession.getUnitDao() : 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 getShortName() {
//         return shortName;
//     }
// 
//     public void setShortName(String shortName) {
//         this.shortName = shortName;
//     }
// 
//     public Long getFacultyId() {
//         return facultyId;
//     }
// 
//     public void setFacultyId(Long facultyId) {
//         this.facultyId = facultyId;
//     }
// 
//     /** To-one relationship, resolved on first access. */
//     public Faculty getFaculty() {
//         Long __key = this.facultyId;
//         if (faculty__resolvedKey == null || !faculty__resolvedKey.equals(__key)) {
//             if (daoSession == null) {
//                 throw new DaoException("Entity is detached from DAO context");
//             }
//             FacultyDao targetDao = daoSession.getFacultyDao();
//             Faculty facultyNew = targetDao.load(__key);
//             synchronized (this) {
//                 faculty = facultyNew;
//             	faculty__resolvedKey = __key;
//             }
//         }
//         return faculty;
//     }
// 
//     public void setFaculty(Faculty faculty) {
//         synchronized (this) {
//             this.faculty = faculty;
//             facultyId = faculty == null ? null : faculty.getId();
//             faculty__resolvedKey = facultyId;
//         }
//     }
// 
//     /** 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<PlaceUnit> getPlaceUnitList() {
//         if (placeUnitList == null) {
//             if (daoSession == null) {
//                 throw new DaoException("Entity is detached from DAO context");
//             }
//             PlaceUnitDao targetDao = daoSession.getPlaceUnitDao();
//             List<PlaceUnit> placeUnitListNew = targetDao._queryUnit_PlaceUnitList(id);
//             synchronized (this) {
//                 if(placeUnitList == null) {
//                     placeUnitList = placeUnitListNew;
//                 }
//             }
//         }
//         return placeUnitList;
//     }
// 
//     /** Resets a to-many relationship, making the next get call to query for a fresh result. */
//     public synchronized void resetPlaceUnitList() {
//         placeUnitList = null;
//     }
// 
//     /** 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);
//     }
// 
// }


// Path: campus/src/lecho/app/campus/dao/UnitDao.java
import java.util.List;
import java.util.ArrayList;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteStatement;
import de.greenrobot.dao.AbstractDao;
import de.greenrobot.dao.Property;
import de.greenrobot.dao.internal.SqlUtils;
import de.greenrobot.dao.internal.DaoConfig;
import lecho.app.campus.dao.Unit;

package lecho.app.campus.dao;




// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/** 
 * DAO for table UNIT.
*/
public class UnitDao extends AbstractDao<Unit, Long> {

    public static final String TABLENAME = "UNIT";

    /**
     * Properties of entity Unit.<br/>
     * Can be used for QueryBuilder and for referencing column names.
    */
    public static class Properties {
        public final static Property Id = new Property(0, Long.class, "id", true, "_id");
        public final static Property Name = new Property(1, String.class, "name", false, "NAME");
        public final static Property ShortName = new Property(2, String.class, "shortName", false, "SHORT_NAME");
        public final static Property FacultyId = new Property(3, Long.class, "facultyId", false, "FACULTY_ID");