Esempio n. 1
0
  /** @inheritdoc */
  @Override
  protected void bindValues(SQLiteStatement stmt, StaffsTasks entity) {
    stmt.clearBindings();

    Long id = entity.getId();
    if (id != null) {
      stmt.bindLong(1, id);
    }
    stmt.bindLong(2, entity.getStaff_id());
    stmt.bindLong(3, entity.getTask_id());
  }
Esempio n. 2
0
  protected StaffsTasks loadCurrentDeep(Cursor cursor, boolean lock) {
    StaffsTasks entity = loadCurrent(cursor, 0, lock);
    int offset = getAllColumns().length;

    Staff staff = loadCurrentOther(daoSession.getStaffDao(), cursor, offset);
    if (staff != null) {
      entity.setStaff(staff);
    }
    offset += daoSession.getStaffDao().getAllColumns().length;

    Task task = loadCurrentOther(daoSession.getTaskDao(), cursor, offset);
    if (task != null) {
      entity.setTask(task);
    }

    return entity;
  }
Esempio n. 3
0
 /** @inheritdoc */
 @Override
 public Long getKey(StaffsTasks entity) {
   if (entity != null) {
     return entity.getId();
   } else {
     return null;
   }
 }
Esempio n. 4
0
 @Override
 protected void attachEntity(StaffsTasks entity) {
   super.attachEntity(entity);
   entity.__setDaoSession(daoSession);
 }
Esempio n. 5
0
 /** @inheritdoc */
 @Override
 protected Long updateKeyAfterInsert(StaffsTasks entity, long rowId) {
   entity.setId(rowId);
   return rowId;
 }
Esempio n. 6
0
 /** @inheritdoc */
 @Override
 public void readEntity(Cursor cursor, StaffsTasks entity, int offset) {
   entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
   entity.setStaff_id(cursor.getLong(offset + 1));
   entity.setTask_id(cursor.getLong(offset + 2));
 }