org.jmythapi.database.utils
Class DatabaseUtils

java.lang.Object
  extended by org.jmythapi.database.utils.DatabaseUtils

public class DatabaseUtils
extends Object


Constructor Summary
DatabaseUtils()
           
 
Method Summary
static
<E extends Enum<E>,R extends ADatabaseRow<E>>
R
createDataObject(ProtocolVersion protoVersion, int dbVersion, Class<R> rowClass, List<String> valueList)
           
static Map<String,Integer> getColumnNameIndexMap(ResultSet resultSet)
           
static Map<String,Integer> getColumnNameIndexMap(ResultSetMetaData metaData)
           
static
<E extends Enum<E>,R extends ADatabaseRow<E>>
List<R>
getDataRows(ProtocolVersion protoVersion, int dbVersion, ResultSet resultSet, Class<R> rowClass, Class<E> propsClass)
           
static
<E extends Enum<E>>
EnumMap<E,Integer>
getEnumIndexMap(int dbVersion, ResultSet resultSet, Class<E> propsClass)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatabaseUtils

public DatabaseUtils()
Method Detail

getColumnNameIndexMap

public static Map<String,Integer> getColumnNameIndexMap(ResultSet resultSet)
                                                 throws SQLException
Throws:
SQLException

getColumnNameIndexMap

public static Map<String,Integer> getColumnNameIndexMap(ResultSetMetaData metaData)
                                                 throws SQLException
Throws:
SQLException

getEnumIndexMap

public static <E extends Enum<E>> EnumMap<E,Integer> getEnumIndexMap(int dbVersion,
                                                                     ResultSet resultSet,
                                                                     Class<E> propsClass)
                                                          throws SQLException
Throws:
SQLException

getDataRows

public static <E extends Enum<E>,R extends ADatabaseRow<E>> List<R> getDataRows(ProtocolVersion protoVersion,
                                                                                int dbVersion,
                                                                                ResultSet resultSet,
                                                                                Class<R> rowClass,
                                                                                Class<E> propsClass)
                                                   throws SQLException
Throws:
SQLException

createDataObject

public static <E extends Enum<E>,R extends ADatabaseRow<E>> R createDataObject(ProtocolVersion protoVersion,
                                                                               int dbVersion,
                                                                               Class<R> rowClass,
                                                                               List<String> valueList)


Copyright © 2008-2013. All Rights Reserved.