com.mysema.query.sql
Class SQLTemplates

java.lang.Object
  extended by com.mysema.query.types.Templates
      extended by com.mysema.query.sql.SQLTemplates
Direct Known Subclasses:
CUBRIDTemplates, DerbyTemplates, H2Templates, HSQLDBTemplates, MySQLTemplates, OracleTemplates, PostgresTemplates, SQLiteTemplates, SQLServerTemplates

public class SQLTemplates
extends Templates

SQLTemplates extends Templates to provides SQL specific extensions and acts as database specific Dialect for Querydsl SQL

Author:
tiwe

Field Summary
static Operator<Object> CAST
           
static SQLTemplates DEFAULT
           
static Operator<Object> NEXTVAL
           
static Operator<Object> UNION
           
 
Constructor Summary
protected SQLTemplates(String quoteStr, char escape, boolean useQuotes)
           
 
Method Summary
 void addClass2TypeMappings(String type, Class<?>... classes)
           
 String getAsc()
           
 String getAutoIncrement()
           
 String getColumnAlias()
           
 String getCount()
           
 String getCountStar()
           
 String getCreateIndex()
           
 String getCreateTable()
           
 String getCreateUniqueIndex()
           
 String getDeleteFrom()
           
 String getDesc()
           
 String getDistinctCountEnd()
           
 String getDistinctCountStart()
           
 String getDummyTable()
           
 String getForUpdate()
           
 String getFrom()
           
 String getFullJoin()
           
 String getGroupBy()
           
 String getHaving()
           
 String getInnerJoin()
           
 String getInsertInto()
           
 String getJoin()
           
 String getJoinSymbol(JoinType joinType)
           
 String getKey()
           
 String getLeftJoin()
           
 String getLimitTemplate()
           
 String getMergeInto()
           
 String getNotNull()
           
 String getOffsetTemplate()
           
 String getOn()
           
 String getOrderBy()
           
 String getRightJoin()
           
 String getSelect()
           
 String getSelectDistinct()
           
 String getSet()
           
 String getTableAlias()
           
 String getTypeForCast(Class<?> cl)
           
 String getTypeForClass(Class<?> cl)
           
 String getUnion()
           
 String getUnionAll()
           
 String getUpdate()
           
 String getValues()
           
 String getWhere()
           
 String getWith()
           
 boolean isBatchCountViaGetUpdateCount()
           
 boolean isBigDecimalSupported()
           
 boolean isNativeMerge()
           
 boolean isParameterMetadataAvailable()
           
 boolean isPrintSchema()
           
 boolean isSupportsAlias()
           
protected  void newLineToSingleSpace()
           
 String quoteIdentifier(String identifier)
           
protected  boolean requiresQuotes(String identifier)
           
 void serialize(QueryMetadata metadata, boolean forCountRow, SerializationContext context)
           
protected  void serializeModifiers(QueryMetadata metadata, SerializationContext context)
           
protected  void setAsc(String asc)
           
protected  void setAutoIncrement(String autoIncrement)
           
protected  void setBatchCountViaGetUpdateCount(boolean batchCountViaGetUpdateCount)
           
 void setBigDecimalSupported(boolean bigDecimalSupported)
           
protected  void setColumnAlias(String columnAlias)
           
protected  void setCount(String count)
           
protected  void setCountStar(String countStar)
           
protected  void setCreateIndex(String createIndex)
           
protected  void setCreateTable(String createTable)
           
protected  void setCreateUniqueIndex(String createUniqueIndex)
           
protected  void setDeleteFrom(String deleteFrom)
           
protected  void setDesc(String desc)
           
protected  void setDistinctCountEnd(String distinctCountEnd)
           
protected  void setDistinctCountStart(String distinctCountStart)
           
protected  void setDummyTable(String dummyTable)
           
 void setForUpdate(String forUpdate)
           
protected  void setFrom(String from)
           
protected  void setFullJoin(String fullJoin)
           
protected  void setGroupBy(String groupBy)
           
protected  void setHaving(String having)
           
protected  void setInnerJoin(String innerJoin)
           
protected  void setInsertInto(String insertInto)
           
protected  void setJoin(String join)
           
protected  void setKey(String key)
           
protected  void setLeftJoin(String leftJoin)
           
protected  void setMergeInto(String mergeInto)
           
protected  void setNativeMerge(boolean nativeMerge)
           
protected  void setNotNull(String notNull)
           
protected  void setOffsetTemplate(String offsetTemplate)
           
protected  void setOn(String on)
           
protected  void setOrderBy(String orderBy)
           
protected  void setParameterMetadataAvailable(boolean parameterMetadataAvailable)
           
protected  void setPrintSchema(boolean printSchema)
           
protected  void setRightJoin(String rightJoin)
           
protected  void setSelect(String select)
           
protected  void setSelectDistinct(String selectDistinct)
           
protected  void setSet(String set)
           
protected  void setTableAlias(String tableAlias)
           
protected  void setUnion(String union)
           
protected  void setUnionAll(String unionAll)
           
protected  void setUpdate(String update)
           
protected  void setValues(String values)
           
protected  void setWhere(String where)
           
protected  void setWith(String with)
           
 
Methods inherited from class com.mysema.query.types.Templates
add, add, getPrecedence, getTemplate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CAST

public static final Operator<Object> CAST

UNION

public static final Operator<Object> UNION

NEXTVAL

public static final Operator<Object> NEXTVAL

DEFAULT

public static final SQLTemplates DEFAULT
Constructor Detail

SQLTemplates

protected SQLTemplates(String quoteStr,
                       char escape,
                       boolean useQuotes)
Method Detail

addClass2TypeMappings

public void addClass2TypeMappings(String type,
                                  Class<?>... classes)

getAsc

public String getAsc()

getAutoIncrement

public String getAutoIncrement()

getColumnAlias

public String getColumnAlias()

getCount

public String getCount()

getCountStar

public String getCountStar()

getDeleteFrom

public String getDeleteFrom()

getDesc

public String getDesc()

getDistinctCountEnd

public String getDistinctCountEnd()

getDistinctCountStart

public String getDistinctCountStart()

getDummyTable

public String getDummyTable()

getFrom

public String getFrom()

getFullJoin

public String getFullJoin()

getGroupBy

public String getGroupBy()

getHaving

public String getHaving()

getInnerJoin

public String getInnerJoin()

getInsertInto

public String getInsertInto()

getJoin

public String getJoin()

getJoinSymbol

public String getJoinSymbol(JoinType joinType)

getKey

public String getKey()

getLeftJoin

public String getLeftJoin()

getRightJoin

public String getRightJoin()

getLimitTemplate

public String getLimitTemplate()

getMergeInto

public String getMergeInto()

getNotNull

public String getNotNull()

getOffsetTemplate

public String getOffsetTemplate()

getOn

public String getOn()

getOrderBy

public String getOrderBy()

getSelect

public String getSelect()

getSelectDistinct

public String getSelectDistinct()

getSet

public String getSet()

getTableAlias

public String getTableAlias()

getTypeForCast

public String getTypeForCast(Class<?> cl)

getTypeForClass

public final String getTypeForClass(Class<?> cl)

getUnion

public String getUnion()

getUnionAll

public String getUnionAll()

getUpdate

public String getUpdate()

getValues

public String getValues()

getWhere

public String getWhere()

isNativeMerge

public boolean isNativeMerge()

isSupportsAlias

public boolean isSupportsAlias()

getCreateIndex

public String getCreateIndex()

getCreateUniqueIndex

public String getCreateUniqueIndex()

getCreateTable

public String getCreateTable()

isPrintSchema

public boolean isPrintSchema()

getWith

public String getWith()

isParameterMetadataAvailable

public boolean isParameterMetadataAvailable()

isBatchCountViaGetUpdateCount

public boolean isBatchCountViaGetUpdateCount()

newLineToSingleSpace

protected void newLineToSingleSpace()

quoteIdentifier

public String quoteIdentifier(String identifier)

requiresQuotes

protected boolean requiresQuotes(String identifier)

serialize

public void serialize(QueryMetadata metadata,
                      boolean forCountRow,
                      SerializationContext context)

serializeModifiers

protected void serializeModifiers(QueryMetadata metadata,
                                  SerializationContext context)

setAsc

protected void setAsc(String asc)

setAutoIncrement

protected void setAutoIncrement(String autoIncrement)

setColumnAlias

protected void setColumnAlias(String columnAlias)

setCount

protected void setCount(String count)

setCountStar

protected void setCountStar(String countStar)

setDeleteFrom

protected void setDeleteFrom(String deleteFrom)

setDesc

protected void setDesc(String desc)

setDistinctCountEnd

protected void setDistinctCountEnd(String distinctCountEnd)

setDistinctCountStart

protected void setDistinctCountStart(String distinctCountStart)

setDummyTable

protected void setDummyTable(String dummyTable)

setFrom

protected void setFrom(String from)

setFullJoin

protected void setFullJoin(String fullJoin)

setGroupBy

protected void setGroupBy(String groupBy)

setHaving

protected void setHaving(String having)

setInnerJoin

protected void setInnerJoin(String innerJoin)

setInsertInto

protected void setInsertInto(String insertInto)

setJoin

protected void setJoin(String join)

setKey

protected void setKey(String key)

setLeftJoin

protected void setLeftJoin(String leftJoin)

setRightJoin

protected void setRightJoin(String rightJoin)

setMergeInto

protected void setMergeInto(String mergeInto)

setNativeMerge

protected void setNativeMerge(boolean nativeMerge)

setNotNull

protected void setNotNull(String notNull)

setOffsetTemplate

protected void setOffsetTemplate(String offsetTemplate)

setOn

protected void setOn(String on)

setOrderBy

protected void setOrderBy(String orderBy)

setSelect

protected void setSelect(String select)

setSelectDistinct

protected void setSelectDistinct(String selectDistinct)

setSet

protected void setSet(String set)

setTableAlias

protected void setTableAlias(String tableAlias)

setUnion

protected void setUnion(String union)

setUnionAll

protected void setUnionAll(String unionAll)

setUpdate

protected void setUpdate(String update)

setValues

protected void setValues(String values)

setWhere

protected void setWhere(String where)

setWith

protected void setWith(String with)

setCreateIndex

protected void setCreateIndex(String createIndex)

setCreateUniqueIndex

protected void setCreateUniqueIndex(String createUniqueIndex)

setCreateTable

protected void setCreateTable(String createTable)

setPrintSchema

protected void setPrintSchema(boolean printSchema)

setParameterMetadataAvailable

protected void setParameterMetadataAvailable(boolean parameterMetadataAvailable)

setBatchCountViaGetUpdateCount

protected void setBatchCountViaGetUpdateCount(boolean batchCountViaGetUpdateCount)

isBigDecimalSupported

public boolean isBigDecimalSupported()

setBigDecimalSupported

public void setBigDecimalSupported(boolean bigDecimalSupported)

getForUpdate

public String getForUpdate()

setForUpdate

public void setForUpdate(String forUpdate)


Copyright © 2007-2012 Mysema Ltd. All Rights Reserved.