Android Open Source - campus Place






From Project

Back to project page campus.

License

The source code is released under:

GNU General Public License

If you think the Android project campus listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package lecho.app.campus.dao;
/*from w w w  .  ja  va  2  s.c om*/
import java.util.List;
import lecho.app.campus.dao.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 PLACE.
 */
public class Place {

    private Long id;
    /** Not-null value. */
    private String name;
    /** Not-null value. */
    private String symbol;
    private String description;
    private double latitude;
    private double longitude;
    private boolean hasImage;

    /** Used to resolve relations */
    private transient DaoSession daoSession;

    /** Used for active entity operations. */
    private transient PlaceDao myDao;

    private List<PlaceFaculty> placeFacultyList;
    private List<PlaceUnit> placeUnitList;
    private List<PlaceCategory> placeCategoryList;

    public Place() {
    }

    public Place(Long id) {
        this.id = id;
    }

    public Place(Long id, String name, String symbol, String description, double latitude, double longitude, boolean hasImage) {
        this.id = id;
        this.name = name;
        this.symbol = symbol;
        this.description = description;
        this.latitude = latitude;
        this.longitude = longitude;
        this.hasImage = hasImage;
    }

    /** called by internal mechanisms, do not call yourself. */
    public void __setDaoSession(DaoSession daoSession) {
        this.daoSession = daoSession;
        myDao = daoSession != null ? daoSession.getPlaceDao() : 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;
    }

    /** Not-null value. */
    public String getSymbol() {
        return symbol;
    }

    /** Not-null value; ensure this value is available before it is saved to the database. */
    public void setSymbol(String symbol) {
        this.symbol = symbol;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public double getLatitude() {
        return latitude;
    }

    public void setLatitude(double latitude) {
        this.latitude = latitude;
    }

    public double getLongitude() {
        return longitude;
    }

    public void setLongitude(double longitude) {
        this.longitude = longitude;
    }

    public boolean getHasImage() {
        return hasImage;
    }

    public void setHasImage(boolean hasImage) {
        this.hasImage = hasImage;
    }

    /** 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<PlaceFaculty> getPlaceFacultyList() {
        if (placeFacultyList == null) {
            if (daoSession == null) {
                throw new DaoException("Entity is detached from DAO context");
            }
            PlaceFacultyDao targetDao = daoSession.getPlaceFacultyDao();
            List<PlaceFaculty> placeFacultyListNew = targetDao._queryPlace_PlaceFacultyList(id);
            synchronized (this) {
                if(placeFacultyList == null) {
                    placeFacultyList = placeFacultyListNew;
                }
            }
        }
        return placeFacultyList;
    }

    /** Resets a to-many relationship, making the next get call to query for a fresh result. */
    public synchronized void resetPlaceFacultyList() {
        placeFacultyList = null;
    }

    /** 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._queryPlace_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;
    }

    /** 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<PlaceCategory> getPlaceCategoryList() {
        if (placeCategoryList == null) {
            if (daoSession == null) {
                throw new DaoException("Entity is detached from DAO context");
            }
            PlaceCategoryDao targetDao = daoSession.getPlaceCategoryDao();
            List<PlaceCategory> placeCategoryListNew = targetDao._queryPlace_PlaceCategoryList(id);
            synchronized (this) {
                if(placeCategoryList == null) {
                    placeCategoryList = placeCategoryListNew;
                }
            }
        }
        return placeCategoryList;
    }

    /** Resets a to-many relationship, making the next get call to query for a fresh result. */
    public synchronized void resetPlaceCategoryList() {
        placeCategoryList = 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);
    }

}




Java Source Code List

lecho.app.campus.activity.AboutAppActivity.java
lecho.app.campus.activity.CampusMapActivity.java
lecho.app.campus.activity.GalleryActivity.java
lecho.app.campus.activity.LegalInfoActivity.java
lecho.app.campus.activity.PlaceDetailsActivity.java
lecho.app.campus.adapter.GalleryPagesFragmentAdapter.java
lecho.app.campus.adapter.MarkerInfoWindowAdapter.java
lecho.app.campus.adapter.NavigationDrawerAdapter.java
lecho.app.campus.adapter.PlaceDetailsFragmentAdapter.java
lecho.app.campus.adapter.SearchResultViewAdapter.java
lecho.app.campus.adapter.SearchSuggestionAdapter.java
lecho.app.campus.dao.CategoryDao.java
lecho.app.campus.dao.CategoryDao.java
lecho.app.campus.dao.Category.java
lecho.app.campus.dao.Category.java
lecho.app.campus.dao.DaoMaster.java
lecho.app.campus.dao.DaoMaster.java
lecho.app.campus.dao.DaoSession.java
lecho.app.campus.dao.DaoSession.java
lecho.app.campus.dao.FacultyDao.java
lecho.app.campus.dao.FacultyDao.java
lecho.app.campus.dao.Faculty.java
lecho.app.campus.dao.Faculty.java
lecho.app.campus.dao.Main.java
lecho.app.campus.dao.PlaceCategoryDao.java
lecho.app.campus.dao.PlaceCategoryDao.java
lecho.app.campus.dao.PlaceCategory.java
lecho.app.campus.dao.PlaceCategory.java
lecho.app.campus.dao.PlaceDao.java
lecho.app.campus.dao.PlaceDao.java
lecho.app.campus.dao.PlaceFacultyDao.java
lecho.app.campus.dao.PlaceFacultyDao.java
lecho.app.campus.dao.PlaceFaculty.java
lecho.app.campus.dao.PlaceFaculty.java
lecho.app.campus.dao.PlaceUnitDao.java
lecho.app.campus.dao.PlaceUnitDao.java
lecho.app.campus.dao.PlaceUnit.java
lecho.app.campus.dao.PlaceUnit.java
lecho.app.campus.dao.Place.java
lecho.app.campus.dao.Place.java
lecho.app.campus.dao.UnitDao.java
lecho.app.campus.dao.UnitDao.java
lecho.app.campus.dao.Unit.java
lecho.app.campus.dao.Unit.java
lecho.app.campus.fragment.GalleryPageFragment.java
lecho.app.campus.fragment.PlaceDetailsFragment.java
lecho.app.campus.fragment.dialog.NoInternetConnectionDialogFragment.java
lecho.app.campus.fragment.dialog.PlayServicesErrorDialogFragment.java
lecho.app.campus.loader.PlaceDetailsLoader.java
lecho.app.campus.loader.PlacesLoader.java
lecho.app.campus.provider.SearchSuggestionProvider.java
lecho.app.campus.service.PopulateDBIntentService.java
lecho.app.campus.utils.ABSMenuItemConverter.java
lecho.app.campus.utils.BitmapAsyncTask.java
lecho.app.campus.utils.Config.java
lecho.app.campus.utils.DataParser.java
lecho.app.campus.utils.DatabaseHelper.java
lecho.app.campus.utils.ImagesDirAsyncTask.java
lecho.app.campus.utils.NavigationDrawerItem.java
lecho.app.campus.utils.PlaceDetails.java
lecho.app.campus.utils.PlacesList.java
lecho.app.campus.utils.UnitsGroup.java
lecho.app.campus.utils.Utils.java
lecho.app.campus.view.CheckableDrawerItem.java
lecho.app.campus.view.UnitsGroupLayout.java
lecho.app.campus.view.ZoomImageView.java
lecho.app.campus.view.ZoomViewPager.java