public class DBUtil
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
DBUtil.EmptyBlob
Represents an empty Blob object.
|
static class |
DBUtil.EmptyClob
Represents an empty Clob object.
|
Constructor and Description |
---|
DBUtil() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
columnNameOf(java.lang.String fullName)
Extracts the columnname from the fullName given in the format table.column
|
static java.lang.Object |
convertFieldValue(java.lang.Class fieldType,
java.lang.String strValue) |
static void |
copyDBRecordValues(DBRecord toDbo,
DBRecord fromDbo,
boolean isIncludePK)
Copies the value of fromDbo to the toDbo record.
|
static DBRecord[] |
createAvailableTypes(DBRecord rec) |
static DBRecord[] |
createAvailableTypes(DBRecord[] recs) |
static void |
deleteInTransaction(DBRecord[] records) |
static java.sql.Blob |
emptyBlob()
Returns a cached instance of an empty Blob.
|
static java.sql.Clob |
emptyClob()
Returns a cached instance of an empty Clob.
|
static java.lang.Object |
getDBOFieldValue(DBRecord dbo,
java.lang.String fieldName) |
static void |
insertInTransaction(DBRecord[] records) |
static boolean |
isBooleanClass(java.lang.Class c) |
static boolean |
isNumberClass(java.lang.Class c) |
static boolean |
isNumericZero(java.lang.Object obj) |
static void |
setDBOFieldValue(DBRecord dbo,
java.lang.String fieldName,
java.lang.Object value) |
static java.lang.String |
tableNameOf(java.lang.String fullName)
Extracts the tablename from the fullName given in the format table.column
|
static int |
toId(java.lang.String idString)
Converts a number string into an int value.
|
static java.lang.String |
toIsolationLevelString(int isoLevel) |
static void |
updateInTransaction(DBRecord[] records) |
public static int toId(java.lang.String idString)
public static java.sql.Blob emptyBlob()
public static java.sql.Clob emptyClob()
public static boolean isNumericZero(java.lang.Object obj)
public static boolean isNumberClass(java.lang.Class c)
public static boolean isBooleanClass(java.lang.Class c)
public static java.lang.Object convertFieldValue(java.lang.Class fieldType, java.lang.String strValue) throws DataConversionException
DataConversionException
public static java.lang.String toIsolationLevelString(int isoLevel)
public static void insertInTransaction(DBRecord[] records) throws java.lang.Exception
java.lang.Exception
public static void updateInTransaction(DBRecord[] records) throws java.lang.Exception
java.lang.Exception
public static void deleteInTransaction(DBRecord[] records) throws java.lang.Exception
java.lang.Exception
public static java.lang.String columnNameOf(java.lang.String fullName)
public static java.lang.String tableNameOf(java.lang.String fullName)
public static void copyDBRecordValues(DBRecord toDbo, DBRecord fromDbo, boolean isIncludePK) throws java.lang.Exception
isIncludePK
- defines whether the primary key values should also be copied.java.lang.Exception
public static java.lang.Object getDBOFieldValue(DBRecord dbo, java.lang.String fieldName) throws java.lang.Exception
java.lang.Exception
public static void setDBOFieldValue(DBRecord dbo, java.lang.String fieldName, java.lang.Object value) throws java.lang.Exception
java.lang.Exception
Copyright © 2014 EsprIT-Systems. All Rights Reserved.