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 Long getKey(Feeling entity) {
   if (entity != null) {
     return entity.getId();
   } else {
     return null;
   }
 }