|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compiere.db.DBUtils
public class DBUtils
Database Utilities
| Constructor Summary | |
|---|---|
DBUtils()
|
|
| Method Summary | |
|---|---|
static void |
main(String[] args)
|
static String |
nullValue(String sqlClause,
int dataType)
Get a string representation of literal used in SQL clause |
static String |
repRownum(String oraS)
jz rewrite SQL if there is ROWNUM=1 in a query with updated in select max(updated) from ... |
static String |
TO_CHAR(String columnName,
int displayType,
String AD_Language)
Use user defined SQL functions for formatted Date, Number |
static String |
TO_DATE(Timestamp time,
boolean dayOnly)
Create SQL TO Date String from Timestamp |
static String |
TO_NUMBER(BigDecimal number,
int displayType)
Return number as string for INSERT statements with correct precision |
static String |
updateSetSelectList(String sql)
jz NOT a generic one change update set (...) = (select ... from ) standard format |
static String |
whereSelectList(String sql)
jz: NOT a generic one change WHERE (...) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DBUtils()
| Method Detail |
|---|
public static String repRownum(String oraS)
oraS - oracle style statement
public static String TO_DATE(Timestamp time,
boolean dayOnly)
time - Date to be converteddayOnly - true if time set to 00:00:00
public static String TO_CHAR(String columnName,
int displayType,
String AD_Language)
columnName - the column name in the SQLdisplayType - Display TypeAD_Language - 6 character language setting (from Env.LANG_*)
DisplayType,
Env
public static String nullValue(String sqlClause,
int dataType)
sqlClause - "S", "U","I", "W"dataType - java.sql.Types
public static String TO_NUMBER(BigDecimal number,
int displayType)
number - numberdisplayType - display Type
public static String whereSelectList(String sql)
sql - update clause
public static String updateSetSelectList(String sql)
sql - update clause
public static void main(String[] args)
args -
|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||