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

    Long id = entity.getId();
    if (id != null) {
      stmt.bindLong(1, id);
    }

    String content = entity.getContent();
    if (content != null) {
      stmt.bindString(2, content);
    }

    Long serverId = entity.getServerId();
    if (serverId != null) {
      stmt.bindLong(3, serverId);
    }

    Integer statusFlag = entity.getStatusFlag();
    if (statusFlag != null) {
      stmt.bindLong(4, statusFlag);
    }
    stmt.bindLong(5, entity.getLocationId());
  }
Esempio n. 2
0
 /** @inheritdoc */
 @Override
 public void readEntity(Cursor cursor, Feeling entity, int offset) {
   entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0));
   entity.setContent(cursor.isNull(offset + 1) ? null : cursor.getString(offset + 1));
   entity.setServerId(cursor.isNull(offset + 2) ? null : cursor.getLong(offset + 2));
   entity.setStatusFlag(cursor.isNull(offset + 3) ? null : cursor.getInt(offset + 3));
   entity.setLocationId(cursor.getLong(offset + 4));
 }
Esempio n. 3
0
  protected Feeling loadCurrentDeep(Cursor cursor, boolean lock) {
    Feeling entity = loadCurrent(cursor, 0, lock);
    int offset = getAllColumns().length;

    Location location = loadCurrentOther(daoSession.getLocationDao(), cursor, offset);
    if (location != null) {
      entity.setLocation(location);
    }

    return entity;
  }
Esempio n. 4
0
 /** @inheritdoc */
 @Override
 public Long getKey(Feeling entity) {
   if (entity != null) {
     return entity.getId();
   } else {
     return null;
   }
 }
Esempio n. 5
0
 /** @inheritdoc */
 @Override
 protected Long updateKeyAfterInsert(Feeling entity, long rowId) {
   entity.setId(rowId);
   return rowId;
 }
Esempio n. 6
0
 @Override
 protected void attachEntity(Feeling entity) {
   super.attachEntity(entity);
   entity.__setDaoSession(daoSession);
 }