package com.braunster.chatsdk.dao; import com.braunster.chatsdk.dao.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 import com.braunster.chatsdk.dao.entities.FollowerLinkEntity; // KEEP INCLUDES END /** * Entity mapped to table FOLLOWER_LINK. */ public class FollowerLink extends FollowerLinkEntity { private Long id; private Integer type; private Long BUserDaoId; private Long linkOwnerBUserDaoId; /** Used to resolve relations */ private transient DaoSession daoSession; /** Used for active entity operations. */ private transient FollowerLinkDao myDao; private BUser BUser; private Long BUser__resolvedKey; private BUser linkOwnerBUser; private Long linkOwnerBUser__resolvedKey; // KEEP FIELDS - put your custom fields here // KEEP FIELDS END public FollowerLink() { } public FollowerLink(Long id) { this.id = id; } public FollowerLink(Long id, Integer type, Long BUserDaoId, Long linkOwnerBUserDaoId) { this.id = id; this.type = type; this.BUserDaoId = BUserDaoId; this.linkOwnerBUserDaoId = linkOwnerBUserDaoId; } /** called by internal mechanisms, do not call yourself. */ public void __setDaoSession(DaoSession daoSession) { this.daoSession = daoSession; myDao = daoSession != null ? daoSession.getFollowerLinkDao() : null; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Integer getType() { return type; } public void setType(Integer type) { this.type = type; } public Long getBUserDaoId() { return BUserDaoId; } public void setBUserDaoId(Long BUserDaoId) { this.BUserDaoId = BUserDaoId; } public Long getLinkOwnerBUserDaoId() { return linkOwnerBUserDaoId; } public void setLinkOwnerBUserDaoId(Long linkOwnerBUserDaoId) { this.linkOwnerBUserDaoId = linkOwnerBUserDaoId; } /** To-one relationship, resolved on first access. */ public BUser getBUser() { Long __key = this.BUserDaoId; if (BUser__resolvedKey == null || !BUser__resolvedKey.equals(__key)) { if (daoSession == null) { throw new DaoException("Entity is detached from DAO context"); } BUserDao targetDao = daoSession.getBUserDao(); BUser BUserNew = targetDao.load(__key); synchronized (this) { BUser = BUserNew; BUser__resolvedKey = __key; } } return BUser; } public void setBUser(BUser BUser) { synchronized (this) { this.BUser = BUser; BUserDaoId = BUser == null ? null : BUser.getId(); BUser__resolvedKey = BUserDaoId; } } /** To-one relationship, resolved on first access. */ public BUser getLinkOwnerBUser() { Long __key = this.linkOwnerBUserDaoId; if (linkOwnerBUser__resolvedKey == null || !linkOwnerBUser__resolvedKey.equals(__key)) { if (daoSession == null) { throw new DaoException("Entity is detached from DAO context"); } BUserDao targetDao = daoSession.getBUserDao(); BUser linkOwnerBUserNew = targetDao.load(__key); synchronized (this) { linkOwnerBUser = linkOwnerBUserNew; linkOwnerBUser__resolvedKey = __key; } } return linkOwnerBUser; } public void setLinkOwnerBUser(BUser linkOwnerBUser) { synchronized (this) { this.linkOwnerBUser = linkOwnerBUser; linkOwnerBUserDaoId = linkOwnerBUser == null ? null : linkOwnerBUser.getId(); linkOwnerBUser__resolvedKey = linkOwnerBUserDaoId; } } /** 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 }