|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.poscoict.glueframework.dao.jdbc.GlueQueryStringHelper
public abstract class GlueQueryStringHelper
Internal Use Only. Query ¹®ÀåÀ» ´Ù¾çÇÑ Æ÷¸ËÀ¸·Î º¯°æÇØÁÖ´Â À¯Æ¿¸®Æ¼ Ŭ·¡½º.
Field Summary | |
---|---|
static String |
CLOSE_PARENTHESIS
|
static String |
CLOSE_PARENTHESIS_NAVI_PAGE
|
static String |
COUNT_STMT
|
static String |
COUNT_STMT_MYSQL
|
static String |
INSERT_AUDIT_ATTR_STMT
|
static String |
INSERT_AUDIT_VALUE_STMT
|
static String |
OPEN_PARENTHESIS
|
static String |
ORDER_BY_CLAUSE
|
static String |
SELECT
|
static String |
SELECT_HEADER
|
static String |
SELECT_II
|
static String |
SELECT_TAIL
|
static String |
SQLSERVER_TOP_KEYWORD
|
static String |
UPDATE_AUDIT_STMT
|
static String |
WHERE
|
Constructor Summary | |
---|---|
GlueQueryStringHelper()
|
Method Summary | |
---|---|
static String |
createQueryStmtWhereOrderByClause(String query,
String whereClause,
String orderByClause)
ÀÚ¹Ùµ¶À» ÀÚ¼¼ÇÏ°Ô ÀÛ¼ºÇÑ´Ù. |
static String |
getAuditStatement(String query,
int dmltype)
|
static String |
getAuditStatementForInsert(String query)
|
static String |
getAuditStatementForUpdate(String query)
|
static String |
getBindingName(String str)
Internal Use only. |
static String |
getCountQuery(String query)
Argument·Î ÁÖ¾îÁö´Â Äõ¸®¹®ÀåÀ» ±â¹ÝÀ¸·Î ·¹ÄÚµå ÃÑ °³¼ö¸¦ ¾òÀ» ¼ö ÀÖ´Â Äõ¸®¸¦ »ý¼ºÇÑ´Ù. |
static int |
getDmlType(String queryStmt)
|
static boolean |
isMSSQLDriver()
|
static boolean |
isOracleDriver()
|
static String |
makeOrderByClause(String str1,
String str2)
Internal Use only. |
static void |
setDatabaseProductName(String databaseProductName)
DBMS¿¡ µû¸¥ JDBC Driver ¼³Á¤. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String OPEN_PARENTHESIS
public static final String CLOSE_PARENTHESIS
public static final String CLOSE_PARENTHESIS_NAVI_PAGE
public static final String SELECT
public static final String SELECT_II
public static final String WHERE
public static final String COUNT_STMT_MYSQL
public static final String COUNT_STMT
public static final String SQLSERVER_TOP_KEYWORD
public static final String UPDATE_AUDIT_STMT
public static final String INSERT_AUDIT_ATTR_STMT
public static final String INSERT_AUDIT_VALUE_STMT
public static final String SELECT_HEADER
public static final String SELECT_TAIL
public static final String ORDER_BY_CLAUSE
Constructor Detail |
---|
public GlueQueryStringHelper()
Method Detail |
---|
public static String getCountQuery(String query) throws GlueBadSqlGrammarException
1. SQL Server) ¿øº» Äõ¸®: "SELECT EMPNO, SAL FROM TABLE WHERE SAL > ? ORDER BY SAL" ¹ÝȯµÇ´Â Äõ¸®: "SELECT COUNT(1) FROM (SELECT TOP 100 PERCENT EMPNO, SAL FROM TABLE WHERE SAL > ? ORDER BY SAL) FIND_FOR_NAVIGATION_PAGE" 2. Oracle) ¿øº» Äõ¸®: "SELECT EMPNO, SAL FROM TABLE WHERE SAL > ? ORDER BY SAL" ¹ÝȯµÇ´Â Äõ¸®: "SELECT COUNT(1) FROM (SELECT EMPNO, SAL FROM TABLE WHERE SAL > ? ORDER BY SAL) FIND_FOR_NAVIGATION_PAGE 3. MySQL ¿øº» Äõ¸®: "SELECT EMPNO, SAL FROM TABLE WHERE SAL > ? ORDER BY SAL" ¹ÝȯµÇ´Â Äõ¸®: "SELECT COUNT(0) FROM (SELECT EMPNO, SAL FROM TABLE WHERE SAL > ? ORDER BY SAL) FIND_FOR_NAVIGATION_PAGE
query
- Äõ¸® ¹®Àå
GlueBadSqlGrammarException
public static String getAuditStatementForUpdate(String query)
query
-
public static String getAuditStatementForInsert(String query)
query
-
public static String getAuditStatement(String query, int dmltype)
query
- dmltype
-
public static void setDatabaseProductName(String databaseProductName)
1. Oracle DBMS Name: Oracle 2. DB2 DBMS Name: DB2/NT 3. MSSQL DBMS Name: Microsoft SQL Server 4. MySQL DBMS Name: MySQL 5. Postgre DBMS Name: PostgreSQL 6. SQLLite DBMS Name: SQLite
databaseProductName
- public static boolean isMSSQLDriver()
public static boolean isOracleDriver()
public static String createQueryStmtWhereOrderByClause(String query, String whereClause, String orderByClause)
orderByClause
- whereClause
- query
-
public static int getDmlType(String queryStmt)
queryStmt
-
public static String getBindingName(String str)
Code : String name = GlueQueryStringHelper.getBindingName("empno=:EmpnoP"); System.out.println(name); Result : EmpnoP
str
-
public static String makeOrderByClause(String str1, String str2)
Code : String orderby = GlueQueryStringHelper.makeOrderByClause("deptno asc","empno"); System.out.println(orderby); Result : deptno asc, empno
str1
- str2
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |