/** * Marks the entity bean as dirty. * <p> * This is used so that when a bean that is otherwise unmodified is updated with the version * property updated. * <p> * An unmodified bean that is saved or updated is normally skipped and this marks the bean as * dirty so that it is not skipped. * <pre>{@code * * Customer customer = Ebean.find(Customer, id); * * // mark the bean as dirty so that a save() or update() will * // increment the version property * Ebean.markAsDirty(customer); * Ebean.save(customer); * * }</pre> */ public static void markAsDirty(Object bean) throws OptimisticLockException { serverMgr.getDefaultServer().markAsDirty(bean); }
/** * Marks the entity bean as dirty. * <p> * This is used so that when a bean that is otherwise unmodified is updated the version * property is updated. * <p> * An unmodified bean that is saved or updated is normally skipped and this marks the bean as * dirty so that it is not skipped. * <p> * <pre>{@code * * Customer customer = customerRepository.byId(id); * * // mark the bean as dirty so that a save() or update() will * // increment the version property * * customerRepository.markAsDirty(customer); * customerRepository.save(customer); * * }</pre> * * @see EbeanServer#markAsDirty(Object) */ public void markAsDirty(T bean) { db().markAsDirty(bean); }
/** * Marks the entity bean as dirty. * <p> * This is used so that when a bean that is otherwise unmodified is updated the version * property is updated. * <p> * An unmodified bean that is saved or updated is normally skipped and this marks the bean as * dirty so that it is not skipped. * <p> * <pre>{@code * * Customer customer = Customer.find.byId(id); * * // mark the bean as dirty so that a save() or update() will * // increment the version property * customer.markAsDirty(); * customer.save(); * * }</pre> * * @see EbeanServer#markAsDirty(Object) */ public void markAsDirty() { db().markAsDirty(this); }
/** * Marks the entity bean as dirty. * <p> * This is used so that when a bean that is otherwise unmodified is updated with the version * property updated. * <p> * An unmodified bean that is saved or updated is normally skipped and this marks the bean as * dirty so that it is not skipped. * <pre>{@code * * Customer customer = Ebean.find(Customer, id); * * // mark the bean as dirty so that a save() or update() will * // increment the version property * Ebean.markAsDirty(customer); * Ebean.save(customer); * * }</pre> */ public static void markAsDirty(Object bean) throws OptimisticLockException { serverMgr.getDefaultServer().markAsDirty(bean); }
/** * Marks the entity bean as dirty. * <p> * This is used so that when a bean that is otherwise unmodified is updated the version * property is updated. * <p> * An unmodified bean that is saved or updated is normally skipped and this marks the bean as * dirty so that it is not skipped. * <p> * <pre>{@code * * Customer customer = Customer.find.byId(id); * * // mark the bean as dirty so that a save() or update() will * // increment the version property * customer.markAsDirty(); * customer.save(); * * }</pre> * * @see EbeanServer#markAsDirty(Object) */ public void markAsDirty(T bean) { db().markAsDirty(bean); }
/** * Marks the entity bean as dirty. * <p> * This is used so that when a bean that is otherwise unmodified is updated the version * property is updated. * <p> * An unmodified bean that is saved or updated is normally skipped and this marks the bean as * dirty so that it is not skipped. * <p> * <pre>{@code * * Customer customer = customerRepository.byId(id); * * // mark the bean as dirty so that a save() or update() will * // increment the version property * * customerRepository.markAsDirty(customer); * customerRepository.save(customer); * * }</pre> * * @see EbeanServer#markAsDirty(Object) */ public void markAsDirty(T bean) { db().markAsDirty(bean); }
/** * {@inheritDoc} */ @Override public Persister<M> markAsDirty() { server().markAsDirty(getModel()); return this; }