Ejemplo n.º 1
0
 @Override
 public void updateEntityPostWrite(DCompetition entity, Object key, Object value) {
   entity.setId(supplier.toLongKey(key));
   entity.setCreatedBy(supplier.getString(value, Field.CREATEDBY.getFieldName()));
   entity.setCreatedDate(supplier.getDate(value, Field.CREATEDDATE.getFieldName()));
   entity.setUpdatedBy(supplier.getString(value, Field.UPDATEDBY.getFieldName()));
   entity.setUpdatedDate(supplier.getDate(value, Field.UPDATEDDATE.getFieldName()));
 }
Ejemplo n.º 2
0
  @Override
  public DCompetition fromReadValue(Object value) {
    final DCompetition entity = new DCompetition();

    // set primary key:
    final Object key = supplier.getKey(value, Field.ID.getFieldName());
    entity.setId(supplier.toLongKey(key));

    // set all fields:
    entity.setAdminId(supplier.getLong(value, Field.ADMINID.getFieldName()));
    entity.setBeginDate(supplier.getDate(value, Field.BEGINDATE.getFieldName()));
    entity.setCreatedBy(supplier.getString(value, Field.CREATEDBY.getFieldName()));
    entity.setCreatedDate(supplier.getDate(value, Field.CREATEDDATE.getFieldName()));
    entity.setEndDate(supplier.getDate(value, Field.ENDDATE.getFieldName()));
    entity.setTitle(supplier.getString(value, Field.TITLE.getFieldName()));
    entity.setUpdatedBy(supplier.getString(value, Field.UPDATEDBY.getFieldName()));
    entity.setUpdatedDate(supplier.getDate(value, Field.UPDATEDDATE.getFieldName()));
    entity.setUrl(supplier.getString(value, Field.URL.getFieldName()));
    return entity;
  }