com.itranswarp.rdb.UpdateT Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rdb Show documentation
Show all versions of rdb Show documentation
Fast, lightweight and DSL-driven library for RDBMS.
package com.itranswarp.rdb;
public class UpdateT {
final UpdateInfo updateInfo;
UpdateT(UpdateInfo updateInfo, Class beanClass) {
updateInfo.beanClass = beanClass;
updateInfo.beanMapper = Mappers.getMapper(beanClass);
this.updateInfo = updateInfo;
}
public UpdateFieldsOnlyT fieldsOnly(String... fields) {
return new UpdateFieldsOnlyT(this.updateInfo, fields);
}
public String dryRun() {
return dryRun(false);
}
public String dryRun(boolean includeParams) {
return new UpdateRunner(this.updateInfo).dryRun(includeParams);
}
public void run(T bean) {
this.updateInfo.bean = bean;
new UpdateRunner(this.updateInfo).run();
}
}