lumis.util
Class JdbcUtil

Package class diagram package JdbcUtil
java.lang.Object
  extended by lumis.util.JdbcUtil

public class JdbcUtil
extends Object

Utility class for JDBC operations.

Since:
4.0.0

Constructor Summary
JdbcUtil()
           
 
Method Summary
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 Timestamp getTimestampByDate(Date data)
           
static String prepareQueryParameter(String parameter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JdbcUtil

public JdbcUtil()
Method Detail

prepareQueryParameter

public static String prepareQueryParameter(String parameter)
                                    throws PortalException
Throws:
PortalException

getTimestampByDate

public static Timestamp getTimestampByDate(Date data)

fillStringArray

public static String[] fillStringArray(PreparedStatement statement,
                                       String fieldName)
                                throws SQLException
Throws:
SQLException

fillListString

public static List<String> fillListString(PreparedStatement statement,
                                          String fieldName)
                                   throws SQLException
Throws:
SQLException

generateInClause

@Deprecated
public static String generateInClause(int numItems)
Deprecated. Since 4.2.2.090330 replaced by generateInClause(String, int).


generateInClause

public static String generateInClause(String fieldName,
                                      int numItems)
Generates a SQL IN statement for a field. The IN statement is generated using ? for each parameter, according to the numItems argument.

Parameters:
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.
Returns:
the SQL code fragment for the IN statement.
Since:
4.2.2.090330


Lumisportal  6.2.0.120405 - Copyright © 2006–2012 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.