Exemplo n.º 1
0
 public CounterJDO convert(CreateCounter cr) {
   CounterJDO jdo = new CounterJDO();
   jdo.setCounter((long) 0);
   jdo.setCreatedDate(new Date());
   jdo.setKey(cr.getCounterConstant().getValue());
   jdo.setName(cr.getCounterConstant().getName());
   return jdo;
 }
Exemplo n.º 2
0
  public Counter convert(CounterJDO jdo) {
    if (jdo == null) {
      return null;
    }
    Counter model = new Counter();
    model.setCounter(jdo.getCounter());
    model.setId(jdo.getKeyId());
    model.setKey(jdo.getKey());
    model.setName(jdo.getName());
    model.setCreatedDate(jdo.getCreatedDate());

    return model;
  }