com.github.rrsunhome.excelsql.config.SqlParameterIndexValue Maven / Gradle / Ivy
package com.github.rrsunhome.excelsql.config;
import com.github.rrsunhome.excelsql.util.SqlUtils;
import lombok.Getter;
/**
* @author : wangqijia
* create at: 2021/11/7 下午10:44
*/
@Getter
public class SqlParameterIndexValue {
private int cellIndex;
private Class valueType;
public SqlParameterIndexValue(int cellIndex, Class valueType) {
this.cellIndex = cellIndex;
this.valueType = valueType;
}
public String wrapValue(String value) {
if (String.class.equals(valueType)) {
return SqlUtils.specialChars(value);
}
return value;
}
}