public class DatabaseUtil extends Object
Constructor and Description |
---|
DatabaseUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
booleanToChar1(Boolean indicator)
Converts a boolean value into a String value to be stored in a CHAR(1) DB column.
|
static void |
cleanOfBizSchema()
Programmer's note:
This method was called kickOfBizInTheGuts.
|
static void |
closeQuietly(Connection con)
Closes the given connection if any.
|
static void |
closeQuietly(ResultSet rs)
Closes the given ResultSet if any.
|
static void |
closeQuietly(Statement stmt)
Closes the given Statement if any.
|
public static void closeQuietly(@Nullable Connection con)
con
- a Connection to be closed, potentially nullpublic static void closeQuietly(@Nullable Statement stmt)
stmt
- a Statement to be closed, potentially nullpublic static void closeQuietly(@Nullable ResultSet rs)
rs
- a ResultSet to be closed, potentially nullpublic static String booleanToChar1(Boolean indicator)
This is useful when using the OfBiz "indicator" field-type to store a boolean flag.
indicator
- the Boolean valuepublic static void cleanOfBizSchema()
DatabaseLauncher
.
Leaving a comment to provide historical accuracy.
This method reruns ofBiz DDL tasks.
It creates missing indexes, tables, etc...Copyright © 2002-2022 Atlassian. All Rights Reserved.