public class CustomSQL
extends Object
com.liferay.portal.dao.orm.custom.sql.CustomSQL
Modifier and Type | Field and Description |
---|---|
static String |
DB2_FUNCTION_IS_NOT_NULL |
static String |
DB2_FUNCTION_IS_NULL |
static String |
INFORMIX_FUNCTION_IS_NOT_NULL |
static String |
INFORMIX_FUNCTION_IS_NULL |
static String |
MYSQL_FUNCTION_IS_NOT_NULL |
static String |
MYSQL_FUNCTION_IS_NULL |
static String |
SYBASE_FUNCTION_IS_NOT_NULL |
static String |
SYBASE_FUNCTION_IS_NULL |
Constructor and Description |
---|
CustomSQL() |
Modifier and Type | Method and Description |
---|---|
String |
appendCriteria(String sql,
String criteria) |
String |
get(String id) |
String |
get(String id,
com.liferay.portal.kernel.dao.orm.QueryDefinition<?> queryDefinition) |
String |
get(String id,
com.liferay.portal.kernel.dao.orm.QueryDefinition<?> queryDefinition,
String tableName) |
protected String[] |
getConfigs() |
protected String |
insertWildcard(String keyword,
com.liferay.portal.kernel.dao.orm.WildcardMode wildcardMode) |
boolean |
isVendorDB2()
Returns
true if Hibernate is connecting to a DB2 database. |
boolean |
isVendorHSQL()
Returns
true if Hibernate is connecting to a Hypersonic
database. |
boolean |
isVendorInformix()
Returns
true if Hibernate is connecting to an Informix
database. |
boolean |
isVendorMySQL()
Returns
true if Hibernate is connecting to a MySQL database. |
boolean |
isVendorOracle()
Returns
true if Hibernate is connecting to an Oracle
database. |
boolean |
isVendorPostgreSQL()
Returns
true if Hibernate is connecting to a PostgreSQL
database. |
boolean |
isVendorSybase()
Returns
true if Hibernate is connecting to a Sybase
database. |
String[] |
keywords(String keywords) |
String[] |
keywords(String[] keywordsArray) |
String[] |
keywords(String[] keywordsArray,
boolean lowerCase) |
String[] |
keywords(String keywords,
boolean lowerCase) |
String[] |
keywords(String keywords,
boolean lowerCase,
com.liferay.portal.kernel.dao.orm.WildcardMode wildcardMode) |
String[] |
keywords(String keywords,
com.liferay.portal.kernel.dao.orm.WildcardMode wildcardMode) |
void |
reloadCustomSQL() |
String |
removeGroupBy(String sql) |
String |
removeOrderBy(String sql) |
String |
replaceAndOperator(String sql,
boolean andOperator) |
String |
replaceGroupBy(String sql,
String groupBy) |
String |
replaceIsNull(String sql) |
String |
replaceKeywords(String sql,
String field,
boolean last,
int[] values) |
String |
replaceKeywords(String sql,
String field,
boolean last,
long[] values) |
String |
replaceKeywords(String sql,
String field,
String operator,
boolean last,
String[] values) |
String |
replaceOrderBy(String sql,
com.liferay.portal.kernel.util.OrderByComparator<?> orderByComparator) |
protected String |
transform(String sql) |
public static final String DB2_FUNCTION_IS_NOT_NULL
public static final String DB2_FUNCTION_IS_NULL
public static final String INFORMIX_FUNCTION_IS_NOT_NULL
public static final String INFORMIX_FUNCTION_IS_NULL
public static final String MYSQL_FUNCTION_IS_NOT_NULL
public static final String MYSQL_FUNCTION_IS_NULL
public static final String SYBASE_FUNCTION_IS_NOT_NULL
public static final String SYBASE_FUNCTION_IS_NULL
public String appendCriteria(String sql, String criteria)
public String get(String id)
public String get(String id, com.liferay.portal.kernel.dao.orm.QueryDefinition<?> queryDefinition)
public String get(String id, com.liferay.portal.kernel.dao.orm.QueryDefinition<?> queryDefinition, String tableName)
public boolean isVendorDB2()
true
if Hibernate is connecting to a DB2 database.true
if Hibernate is connecting to a DB2 databasepublic boolean isVendorHSQL()
true
if Hibernate is connecting to a Hypersonic
database.true
if Hibernate is connecting to a Hypersonic
databasepublic boolean isVendorInformix()
true
if Hibernate is connecting to an Informix
database.true
if Hibernate is connecting to an Informix
databasepublic boolean isVendorMySQL()
true
if Hibernate is connecting to a MySQL database.true
if Hibernate is connecting to a MySQL databasepublic boolean isVendorOracle()
true
if Hibernate is connecting to an Oracle
database. Oracle has a nasty bug where it treats '' as a
NULL
value. See
http://thedailywtf.com/forums/thread/26879.aspx for more information on
this nasty bug.true
if Hibernate is connecting to an Oracle
databasepublic boolean isVendorPostgreSQL()
true
if Hibernate is connecting to a PostgreSQL
database.true
if Hibernate is connecting to a PostgreSQL
databasepublic boolean isVendorSybase()
true
if Hibernate is connecting to a Sybase
database.true
if Hibernate is connecting to a Sybase databasepublic String[] keywords(String keywords)
public String[] keywords(String keywords, boolean lowerCase)
public String[] keywords(String keywords, boolean lowerCase, com.liferay.portal.kernel.dao.orm.WildcardMode wildcardMode)
public String[] keywords(String keywords, com.liferay.portal.kernel.dao.orm.WildcardMode wildcardMode)
public String[] keywords(String[] keywordsArray)
public String[] keywords(String[] keywordsArray, boolean lowerCase)
public void reloadCustomSQL() throws SQLException
SQLException
public String removeGroupBy(String sql)
public String removeOrderBy(String sql)
public String replaceAndOperator(String sql, boolean andOperator)
public String replaceGroupBy(String sql, String groupBy)
public String replaceIsNull(String sql)
public String replaceKeywords(String sql, String field, boolean last, int[] values)
public String replaceKeywords(String sql, String field, boolean last, long[] values)
public String replaceKeywords(String sql, String field, String operator, boolean last, String[] values)
public String replaceOrderBy(String sql, com.liferay.portal.kernel.util.OrderByComparator<?> orderByComparator)
protected String[] getConfigs()
protected String insertWildcard(String keyword, com.liferay.portal.kernel.dao.orm.WildcardMode wildcardMode)
protected String transform(String sql)