Package com.basiscomponents.bc.util
Class SQLHelper
- java.lang.Object
-
- com.basiscomponents.bc.util.SQLHelper
-
public class SQLHelper extends Object
-
-
Constructor Summary
Constructors Constructor Description SQLHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisChartype(int type)static voidsetParameters(DataRow params, PreparedStatement prep)static voidsetSqlParams(PreparedStatement prep, DataRow dr, List<String> fields, boolean isBasisDBMS)Sets values in a prepared statement using a DataRow.
-
-
-
Method Detail
-
setSqlParams
public static void setSqlParams(PreparedStatement prep, DataRow dr, List<String> fields, boolean isBasisDBMS) throws SQLException, ParseException
Sets values in a prepared statement using a DataRow.- Parameters:
prep- the prepared statement.dr- a DataRow containing the values for the prepared statement.fields- an ArrayList with field names. If not null and not empty, this list will be used to get a portion of values from the DataRow dr. Otherwise all fields from dr will be set in the prepared statement.- Throws:
SQLException- is thrown when a value cannot be set.ParseException
-
setParameters
public static void setParameters(DataRow params, PreparedStatement prep)
-
isChartype
public static boolean isChartype(int type)
-
-