@Override public int update(Object entity, Map<String, Object> fields) throws MappingNotFoundException { return cmdUpdate(entity.getClass()).withId(entity).setAll(fields).execute(); }
@Override public int update(EntityMapping em, Object id, Map<String, Object> fields) throws MappingNotFoundException { return cmdUpdate(em).withId(id).setAll(fields).execute(); }
@Override public int update(String entityName, Object id, Map<String, Object> fields) throws MappingNotFoundException { return cmdUpdate(entityName).withId(id).setAll(fields).execute(); }
@Override public int update(Class<?> entityClass, Object id, Map<String, Object> fields) throws MappingNotFoundException { return cmdUpdate(entityClass).withId(id).setAll(fields).execute(); }
/** * Creates a new {@link UpdateCommand} command for updating an exists record. */ @Instrument public static UpdateCommand cmdUpdate(Object id) { Args.notNull(id,"id"); ModelContext context = context(); return context.getDao().cmdUpdate(context.getEntityMapping()).withId(id); }
dao.cmdUpdate(em.getEntityName()).withId(id).from(properties);