public class JdbcUtil extends Object
Constructor and Description |
---|
JdbcUtil() |
Modifier and Type | Method and Description |
---|---|
static List<String> |
fillListString(PreparedStatement statement,
String fieldName) |
static String[] |
fillStringArray(PreparedStatement statement,
String fieldName) |
static String |
generateInClause(int numItems)
Deprecated.
Since 4.2.2.090330 replaced by
generateInClause(String, int) . |
static String |
generateInClause(String fieldName,
int numItems)
Generates a SQL IN statement for a field.
|
static String |
generateInlineInClause(String fieldName,
Collection<String> values)
Generates a SQL IN statement for a field.
|
static Timestamp |
getTimestampByDate(Date data) |
static String |
prepareLargeTextCompareField(String fieldName)
|
static String |
prepareQueryParameter(String parameter) |
static void |
setLargeFetchSize(Statement statement)
Sets a statement's
fetch size to a standard large value. |
public static String prepareQueryParameter(String parameter) throws PortalException
PortalException
public static String[] fillStringArray(PreparedStatement statement, String fieldName) throws SQLException
SQLException
public static List<String> fillListString(PreparedStatement statement, String fieldName) throws SQLException
SQLException
@Deprecated public static String generateInClause(int numItems)
generateInClause(String, int)
.public static String generateInClause(String fieldName, int numItems)
?
for each
parameter, according to the numItems
argument.fieldName
- the field operand before the IN operator (e.g.: columnName or table.column).numItems
- the number of parameters to be included in the IN statement.public static String generateInlineInClause(String fieldName, Collection<String> values) throws PortalException
values
argument.fieldName
- the field operand before the IN operator (e.g.: columnName or table.column).values
- the values to be included in the IN statement.PortalException
public static void setLargeFetchSize(Statement statement) throws SQLException
fetch size
to a standard large value.statement
- the statement.SQLException
- if an thrown by the JDBC driver.public static String prepareLargeTextCompareField(String fieldName)
fieldName
- the name of the field to be wrapped in the conversion statement, including the table aliases.LumisXP 12.3.0.200408 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.