cn.vonce.sql.bean.Insert Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vonce-sqlbean-core Show documentation
Show all versions of vonce-sqlbean-core Show documentation
This is the core project of Sqlbean.
package cn.vonce.sql.bean;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* 插入
*
* @author Jovi
* @version 1.0
* @email [email protected]
* @date 2017年8月18日上午9:00:19
*/
public class Insert extends Common implements Serializable {
private List insertBean = null;//插入的实体对象
/**
* 获取插入实体类
*
* @return
*/
public List getInsertBean() {
return insertBean;
}
/**
* 设置插入实体类
*
* @param beanList
*/
public void setInsertBean(List beanList) {
this.insertBean = beanList;
}
/**
* 设置插入实体类
*
* @param bean
*/
public void setInsertBean(T bean) {
if (bean == null) {
return;
}
if (this.insertBean == null) {
this.insertBean = new ArrayList<>();
}
if (bean.getClass().isArray()) {
T[] arrays = (T[]) bean;
for (T item : arrays) {
this.insertBean.add(item);
}
} else {
this.insertBean.add(bean);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy