@Override public CashPoint createEntity(boolean valid) { CashPoint cashPoint = new CashPoint(); if (valid) { cashPoint.setName("Test Cash Point"); } cashPoint.setDescription("Test description"); cashPoint.setLocation(Context.getLocationService().getLocation(1)); cashPoint.setCreator(Context.getAuthenticatedUser()); cashPoint.setDateCreated(new Date()); return cashPoint; }
@Override protected void updateEntityFields(CashPoint cashPoint) { cashPoint.setName(cashPoint.getName() + " updated"); cashPoint.setDescription(cashPoint.getDescription() + " updated"); cashPoint.setLocation(Context.getLocationService().getLocation(0)); }