Class CustomSQL

Object
com.liferay.util.dao.orm.CustomSQL

public class CustomSQL extends Object
Author:
Brian Wing Shun Chan, Bruno Farache, Raymond Augé
See Also:
  • com.liferay.portal.dao.orm.custom.sql.CustomSQL
  • Field Details

  • Constructor Details

  • Method Details

    • appendCriteria

      public String appendCriteria(String sql, String criteria)
    • get

      public String get(String id)
    • get

      public String get(String id, com.liferay.portal.kernel.dao.orm.QueryDefinition<?> queryDefinition)
    • get

      public String get(String id, com.liferay.portal.kernel.dao.orm.QueryDefinition<?> queryDefinition, String tableName)
    • isVendorDB2

      public boolean isVendorDB2()
      Returns true if Hibernate is connecting to a DB2 database.
      Returns:
      true if Hibernate is connecting to a DB2 database
    • isVendorHSQL

      public boolean isVendorHSQL()
      Returns true if Hibernate is connecting to a Hypersonic database.
      Returns:
      true if Hibernate is connecting to a Hypersonic database
    • isVendorInformix

      public boolean isVendorInformix()
      Returns true if Hibernate is connecting to an Informix database.
      Returns:
      true if Hibernate is connecting to an Informix database
    • isVendorMySQL

      public boolean isVendorMySQL()
      Returns true if Hibernate is connecting to a MySQL database.
      Returns:
      true if Hibernate is connecting to a MySQL database
    • isVendorOracle

      public boolean isVendorOracle()
      Returns 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.
      Returns:
      true if Hibernate is connecting to an Oracle database
    • isVendorPostgreSQL

      public boolean isVendorPostgreSQL()
      Returns true if Hibernate is connecting to a PostgreSQL database.
      Returns:
      true if Hibernate is connecting to a PostgreSQL database
    • keywords

      public String[] keywords(String keywords)
    • keywords

      public String[] keywords(String keywords, boolean lowerCase)
    • keywords

      public String[] keywords(String keywords, boolean lowerCase, com.liferay.portal.kernel.dao.orm.WildcardMode wildcardMode)
    • keywords

      public String[] keywords(String keywords, com.liferay.portal.kernel.dao.orm.WildcardMode wildcardMode)
    • keywords

      public String[] keywords(String[] keywordsArray)
    • keywords

      public String[] keywords(String[] keywordsArray, boolean lowerCase)
    • reloadCustomSQL

      public void reloadCustomSQL() throws SQLException
      Throws:
      SQLException
    • removeGroupBy

      public String removeGroupBy(String sql)
    • removeOrderBy

      public String removeOrderBy(String sql)
    • replaceAndOperator

      public String replaceAndOperator(String sql, boolean andOperator)
    • replaceGroupBy

      public String replaceGroupBy(String sql, String groupBy)
    • replaceIsNull

      public String replaceIsNull(String sql)
    • replaceKeywords

      public String replaceKeywords(String sql, String field, boolean last, int[] values)
    • replaceKeywords

      public String replaceKeywords(String sql, String field, boolean last, long[] values)
    • replaceKeywords

      public String replaceKeywords(String sql, String field, String operator, boolean last, String[] values)
    • replaceOrderBy

      public String replaceOrderBy(String sql, com.liferay.portal.kernel.util.OrderByComparator<?> orderByComparator)
    • getConfigs

      protected String[] getConfigs()
    • insertWildcard

      protected String insertWildcard(String keyword, com.liferay.portal.kernel.dao.orm.WildcardMode wildcardMode)
    • transform

      protected String transform(String sql)