public enum Util extends Enum<Util>
Modifier and Type | Field and Description |
---|---|
static int |
QUERY_TIMEOUT_NOT_SET |
Modifier and Type | Method and Description |
---|---|
static Object |
autoMap(Object o,
Class<?> cls)
Converts from java.sql Types to common java types like java.util.Date and
numeric types.
|
static void |
closeSilently(AutoCloseable c) |
static void |
commit(PreparedStatement ps) |
static ConnectionProvider |
connectionProvider(DataSource dataSource) |
static ConnectionProvider |
connectionProvider(String url,
Properties properties) |
static boolean |
hasCollection(List<Parameter> params) |
static <T> T |
mapObject(CallableStatement cs,
Class<T> cls,
int i,
Type type) |
static <T> T |
mapObject(ResultSet rs,
Class<T> cls,
int i) |
static void |
rollback(PreparedStatement ps) |
static Util |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Util[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final int QUERY_TIMEOUT_NOT_SET
public static Util[] values()
for (Util c : Util.values()) System.out.println(c);
public static Util valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static void closeSilently(AutoCloseable c)
public static void commit(PreparedStatement ps) throws SQLException
SQLException
public static void rollback(PreparedStatement ps) throws SQLException
SQLException
public static Object autoMap(Object o, Class<?> cls)
o
- object to map to new object of type cls
cls
- object return typecls
public static <T> T mapObject(CallableStatement cs, Class<T> cls, int i, Type type)
public static ConnectionProvider connectionProvider(String url, Properties properties)
public static ConnectionProvider connectionProvider(DataSource dataSource)
Copyright © 2022–2023. All rights reserved.