Class JDBCTypeSettings
- java.lang.Object
-
- com.spotfire.ws.im.ds.sql.JDBCTypeSettings
-
public class JDBCTypeSettings extends Object
Settings for a JDBC data source type.
The settings are loaded from datasource templates.
- Since:
- 3.0
- Author:
- Magnus Rylander
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJDBCTypeSettings.TypeMappingMapping between a Java and a SQL type.
-
Constructor Summary
Constructors Constructor Description JDBCTypeSettings()Creates a newJDBCTypeSettingsinstance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddTypeMapping(JDBCTypeSettings.TypeMapping t)Add a Java to SQL type mapping.static JDBCTypeSettings[]getAllTypeSettings()Returns allJDBCTypeSettingsinstances that are currently enabled.booleangetAlwaysUsePreparedStatement()Indicates if prepared statement should be used even when no parameters are set.booleangetAutocommit()Get autocommit mode.intgetBatchSize()Returns the batch size that specifies the amount of data in each batch update.StringgetCatalogNamePattern()Returns the pattern used to format a catalog name in an SQL query.StringgetColumnAliasPattern()Returns the pattern used to format a column alias in an SQL query.StringgetColumnNamePattern()Returns the pattern used to format a column name in an SQL query.intgetConditionListThreshold()Return the condition list threshold.PropertiesgetConnectionProperties()Returns the connection properties used when creating a new connection to the database.String[]getCreateTempTableCommands()Returns the SQL commands needed for creating a temporary table that is used to store filter values (when more than 'condition-list-threshold') and to store result from subqueries.intgetCredentialsTimeout()Gets the credentials timeout for a JDBC data source.StringgetDateFormatExpression()Returns an expression that converts a date field to a string value on the format:"YYYY-MM-DD", e.g.StringgetDateLiteralFormatExpression()Returns an expression that converts a date literal to a database date value.StringgetDateTimeFormatExpression()Returns an expression that converts a datetime field to string value on the format: "YYYY-MM-DD HH:MM:SS", e.g.StringgetDateTimeLiteralFormatExpression()Returns an expression that converts a datetime literal to a database datetime value.StringgetDisplayName()Returns the name of the JDBC type to be displayed in a UI.StringgetDriverClass()Returns the JDBC driver class.String[]getDropTempTableCommands()Returns the SQL commands for deleting a temporary table.booleangetExpandInClause()Tells if an SQL IN-clause shall be expanded into OR conditions.intgetFetchSize()Returns the fetch size that specifies the amount of data fetched with each database round trip for a query.intgetLobThreshold()Returns the threshold value when LOB values used as parameters in a WHERE clause, must be written in temporary tables.intgetMaxColumnNameLength()Returns the maximum length allowed for column names.intgetMaxInClauseSize()Returns the maximum size of an SQL IN-clause.ClassgetMetadataProviderClass()Returns theJDBCMetadataProviderclass.intgetMinInClauseSize()Returns the minimum number of values for creating a SQL IN-clause.StringgetPingCommand()Returns the ping command used to verify a JDBC connection.StringgetProcedureExpressionPattern()Return the pattern that determines how a procedure expression is written in the SQL query.StringgetProcedureNamePattern()Returns the pattern used to format a procedure name in an SQL query.intgetProcedureTableJDBCType()Returns the JDBC type for procedure tables.StringgetProcedureTableTypeName()Returns the type name for procedure tables.ClassgetQueryBuilderClass()Returns the query builder class.StringgetSchemaNamePattern()Returns the pattern used to format a schema name in an SQL query.StringgetSQLAggregateFuntion(String datAggregateFuntion)Get the SQL aggregate function for the given DAT aggregate function, or null if no such SQL function exists.ClassgetSQLFilterClass()Returns theSQLFilterclass.ClassgetSQLRuntimeClass()Returns theSQLRuntimeclass.StringgetSQLType(Class javaType)Returns the SQL type for a given Java type.StringgetSQLType(Class javaType, int length)Returns the SQL type for a given Java type.StringgetStringLiteralQuote()Returns The character used as quote for string literals.StringgetTableExpressionPattern()Return the pattern that determines how a table expression is written in the SQL query.StringgetTableNamePattern()Returns the pattern used to format a table name in an SQL query.String[]getTableTypes()StringgetTempTableNamePattern()Returns the pattern used to format a temporary table name in an SQL command.StringgetTimeFormatExpression()Returns an expression that converts a time field to a string value on the format:"HH:MM:SS", e.g.StringgetTimeLiteralFormatExpression()Returns an expression that converts a time literal to a database time value.JDBCTypeSettings.TypeMapping[]getTypeMappings()Returns all Java to SQL type mappings.StringgetTypeName()Returns the name of the JDBC type.StringgetURLPattern()Returns the URL pattern.booleanisAnsiiStyleOuterJoin()Returns if an attempt should be done to go from oracle outer join syntax with '(+)' to ANSI form If useAnsiJoin() is true, then this setting has no effect.booleanisAnsiJoin()Returns if an attempt should be made to create ansi join syntax.voidsetAlwaysUsePreparedStatement(boolean alwaysUsePreparedStatement)Indicates if prepared statement should be used even when no parameters are set.voidsetAnsiiStyleOuterJoin(boolean outerJoin)Set if an attempt should be done to go from oracle outer join syntax with '(+)' to ANSI form If useAnsiJoin() is true, then this setting has no effect.voidsetAnsiJoin(boolean useAnsiJoin)Set if an attempt should be made to create ansi join syntax.voidsetAutocommit(boolean autocommit)Sets the auto commit mode for connection on the data source.voidsetBatchSize(int size)Sets the batch size that specifies the amount of data in each batch update.voidsetCatalogNamePattern(String p)Sets the pattern used to format a catalog name in an SQL query.voidsetColumnAliasPattern(String p)Sets the pattern used to format a column alias in an SQL query.voidsetColumnNamePattern(String p)Sets the pattern used to format a column name in an SQL query.voidsetConditionListThreshold(int i)Sets the condition list threshold.voidsetConnectionProperties(Properties connectionProperties)Sets the connection properties used when creating a new connection to the database.voidsetCreateTempTableCommands(String[] s)Sets the SQL commands needed for creating a temporary table that is used to store filter values (when more than 'condition-list-threshold') and to store result from subqueries.voidsetCredentialsTimeout(int credentialsTimeout)Sets the credentials timeout for a JDBC data source.voidsetDateFormatExpression(String s)Sets an expression that converts a date field to a string value on the format:"YYYY-MM-DD", e.g.voidsetDateLiteralFormatExpression(String s)Sets an expression that converts a date literal to a database date value.voidsetDateTimeFormatExpression(String s)Sets an expression that converts a datetime field to string value on the format: "YYYY-MM-DD HH:MM:SS", e.g.voidsetDateTimeLiteralFormatExpression(String s)Sets an expression that converts a datetime literal to a database datetime value.voidsetDriverClass(String c)Sets the JDBC driver class.voidsetDropTempTableCommands(String[] s)Sets the SQL commands for deleting a temporary table.voidsetExpandInClause(boolean b)Sets if an SQL IN-clause shall be expanded into OR conditions.voidsetFetchSize(int size)Sets the fetch size that specifies the amount of data fetched with each database round trip for a query.voidsetLobThreshold(int i)Sets the threshold value when LOB values used as parameters in a WHERE clause, must be written in temporary tables.voidsetMaxColumnNameLength(int i)Sets the maximum length allowed for database column names.voidsetMaxInClauseSize(int i)Size the maximum size of an SQL IN-clause.voidsetMetadataProviderClass(Class c)Sets theJDBCMetadataProviderclass.voidsetMinInClauseSize(int i)Sets the minimum number of values for creating a SQL IN-clause.voidsetPingCommand(String s)Sets the ping command used to verify a JDBC connection.voidsetProcedureExpressionPattern(String s)Sets the pattern that determines how a procedure expression is written in the SQL query.voidsetProcedureNamePattern(String p)Sets the pattern used to format a procedure name in an SQL query.voidsetProcedureTableJDBCType(int type)Sets the JDBC type for procedure tables.voidsetProcedureTableTypeName(String typeName)Sets the type name for procedure tables.voidsetSchemaNamePattern(String p)Sets the pattern used to format a schema name in an SQL query.voidsetSQLFilterClass(Class c)Sets theSQLFilterclass.voidsetSQLRuntimeClass(Class c)Sets theSQLRuntimeclass.voidsetStringLiteralQuote(String s)Sets The character used as quote for string literals.voidsetSupportsCatalogs(boolean b)Sets if the catalog level is supported in metadata.voidsetSupportsDistinct(boolean b)Sets if the DISTINCT keyword is supported in SQL queries.voidsetSupportsOrderBy(boolean b)Sets if the ORDER BY keyword is supported in SQL queries.voidsetSupportsProcedures(boolean b)Sets if procedures are supported in metadata.voidsetSupportsSchemas(boolean b)Sets if the schema level is supported in metadata.voidsetTableExpressionPattern(String s)Sets the pattern that determines how a table expression is written in the SQL query.voidsetTableNamePattern(String p)Sets the pattern used to format a table name in an SQL query.voidsetTableTypes(String[] types)voidsetTempTableNamePattern(String p)Sets the pattern used to format a temporary table name in an SQL command.voidsetTimeFormatExpression(String s)Sets an expression that converts a time field to a string value on the format:"HH:MM:SS", e.g.voidsetTimeLiteralFormatExpression(String s)Sets an expression that converts a time literal to a database time value.voidsetTypeMappings(JDBCTypeSettings.TypeMapping[] t)Sets all Java to SQL type mappings.voidsetTypeName(String name)Sets the name of the JDBC type.voidsetURLPattern(String s)Sets the URL pattern.booleansupportsCatalogs()Tells if the catalog level is supported in metadata.booleansupportsDistinct()Tells if the DISTINCT keyword is supported in SQL queries.booleansupportsOrderBy()Tells if the ORDER BY clause is supported in SQL queries.booleansupportsProcedures()Tells if procedures are supported in metadata.booleansupportsSchemas()Tells if the schema level is supported in metadata.StringtoString()Return a string showing the values of all the members.
-
-
-
Method Detail
-
getAllTypeSettings
public static JDBCTypeSettings[] getAllTypeSettings()
Returns allJDBCTypeSettingsinstances that are currently enabled.- Returns:
- all
JDBCTypeSettingsinstances - Since:
- 3.0
-
getTypeName
public String getTypeName()
Returns the name of the JDBC type.- Returns:
- a type name
- Since:
- 3.0
-
setTypeName
public void setTypeName(String name)
Sets the name of the JDBC type.- Parameters:
name- a type name- Since:
- 3.0
-
getDisplayName
public String getDisplayName()
Returns the name of the JDBC type to be displayed in a UI.- Returns:
- a display name
- Since:
- 3.0
-
getDriverClass
public String getDriverClass()
Returns the JDBC driver class.- Returns:
- a class name
- Since:
- 3.0
-
setDriverClass
public void setDriverClass(String c)
Sets the JDBC driver class.- Parameters:
c- a class name- Since:
- 3.0
-
getURLPattern
public String getURLPattern()
Returns the URL pattern.- Returns:
- a URL pattern
String - Since:
- 3.0
-
setURLPattern
public void setURLPattern(String s)
Sets the URL pattern.- Parameters:
s- a URL patternString- Since:
- 3.0
-
getPingCommand
public String getPingCommand()
Returns the ping command used to verify a JDBC connection.- Returns:
- a ping command
String - Since:
- 3.0
-
setPingCommand
public void setPingCommand(String s)
Sets the ping command used to verify a JDBC connection.- Parameters:
s- a ping commandString- Since:
- 3.0
-
getMetadataProviderClass
public Class getMetadataProviderClass()
Returns theJDBCMetadataProviderclass.- Returns:
- a
Classderived fromJDBCMetadataProvider - Since:
- 3.0
- See Also:
JDBCMetadataProvider
-
setMetadataProviderClass
public void setMetadataProviderClass(Class c)
Sets theJDBCMetadataProviderclass.- Parameters:
c- aClassderived fromJDBCMetadataProvider- Since:
- 3.0
- See Also:
JDBCMetadataProvider
-
getSQLFilterClass
public Class getSQLFilterClass()
Returns theSQLFilterclass.- Returns:
- a
Classderived fromSQLFilter - Since:
- 3.0
- See Also:
SQLFilter
-
setSQLFilterClass
public void setSQLFilterClass(Class c)
Sets theSQLFilterclass.- Parameters:
c- aClassderived fromSQLFilter- Since:
- 3.0
- See Also:
SQLFilter
-
getSQLRuntimeClass
public Class getSQLRuntimeClass()
Returns theSQLRuntimeclass.- Returns:
- a
Classderived fromSQLRuntime - Since:
- 3.0
- See Also:
SQLRuntime
-
setSQLRuntimeClass
public void setSQLRuntimeClass(Class c)
Sets theSQLRuntimeclass.- Parameters:
c- aClassderived fromSQLRuntime- Since:
- 3.0
- See Also:
SQLRuntime
-
getQueryBuilderClass
public Class getQueryBuilderClass()
Returns the query builder class. The default isSQLBuilder.- Returns:
- a
Classfor building queries. - Since:
- 3.0
-
getFetchSize
public int getFetchSize()
Returns the fetch size that specifies the amount of data fetched with each database round trip for a query. The fetch size is measured as the number of fields.- Returns:
- a fetch size value
- Since:
- 3.0
-
setFetchSize
public void setFetchSize(int size)
Sets the fetch size that specifies the amount of data fetched with each database round trip for a query. The fetch size is measured as the number of fields.- Parameters:
size- a fetch size value- Since:
- 3.0
-
getBatchSize
public int getBatchSize()
Returns the batch size that specifies the amount of data in each batch update. The batch size is measured as the number of fields.- Returns:
- a batch size value
- Since:
- 3.0
-
setBatchSize
public void setBatchSize(int size)
Sets the batch size that specifies the amount of data in each batch update. The batch size is measured as the number of fields.- Parameters:
size- a batch size value- Since:
- 3.0
-
getMaxColumnNameLength
public int getMaxColumnNameLength()
Returns the maximum length allowed for column names.- Returns:
- maximum column name length
- Since:
- 3.0
-
setMaxColumnNameLength
public void setMaxColumnNameLength(int i)
Sets the maximum length allowed for database column names.- Parameters:
i- maximum column name length- Since:
- 3.0
-
getTableTypes
public String[] getTableTypes()
- Returns:
- clone of tableTypes
- Since:
- 3.0
-
setTableTypes
public void setTableTypes(String[] types)
- Parameters:
types- types- Since:
- 3.0
-
supportsCatalogs
public boolean supportsCatalogs()
Tells if the catalog level is supported in metadata.- Returns:
trueif the catalog level is supported, false otherwise- Since:
- 3.0
- See Also:
JDBCMetadataProvider
-
setSupportsCatalogs
public void setSupportsCatalogs(boolean b)
Sets if the catalog level is supported in metadata.- Parameters:
b-trueif the catalog level is supported, false otherwise- Since:
- 3.0
- See Also:
JDBCMetadataProvider
-
supportsSchemas
public boolean supportsSchemas()
Tells if the schema level is supported in metadata.- Returns:
trueif the schema level is supported, false otherwise- Since:
- 3.0
- See Also:
JDBCMetadataProvider
-
setSupportsSchemas
public void setSupportsSchemas(boolean b)
Sets if the schema level is supported in metadata.- Parameters:
b-trueif the catalog level is supported, false otherwise- Since:
- 3.0
- See Also:
JDBCMetadataProvider
-
supportsProcedures
public boolean supportsProcedures()
Tells if procedures are supported in metadata.- Returns:
trueif procedures are supported, false otherwise- Since:
- 3.0
- See Also:
JDBCMetadataProvider
-
setSupportsProcedures
public void setSupportsProcedures(boolean b)
Sets if procedures are supported in metadata.- Parameters:
b-trueif procedures are supported, false otherwise- Since:
- 3.0
- See Also:
JDBCMetadataProvider
-
supportsDistinct
public boolean supportsDistinct()
Tells if the DISTINCT keyword is supported in SQL queries.- Returns:
trueif DISTINCT is supported, false otherwise- Since:
- 3.0
-
setSupportsDistinct
public void setSupportsDistinct(boolean b)
Sets if the DISTINCT keyword is supported in SQL queries.- Parameters:
b-trueif DISTINCT is supported, false otherwise- Since:
- 3.0
-
supportsOrderBy
public boolean supportsOrderBy()
Tells if the ORDER BY clause is supported in SQL queries.- Returns:
trueif ORDER BY is supported, false otherwise- Since:
- 3.0
-
setSupportsOrderBy
public void setSupportsOrderBy(boolean b)
Sets if the ORDER BY keyword is supported in SQL queries.- Parameters:
b-trueif ORDER BY is supported, false otherwise- Since:
- 3.0
-
getProcedureTableJDBCType
public int getProcedureTableJDBCType()
Returns the JDBC type for procedure tables.- Returns:
- a JDBC type
- Since:
- 3.0
-
setProcedureTableJDBCType
public void setProcedureTableJDBCType(int type)
Sets the JDBC type for procedure tables.- Parameters:
type- a JDBC type- Since:
- 3.0
-
getProcedureTableTypeName
public String getProcedureTableTypeName()
Returns the type name for procedure tables.- Returns:
- a type name
- Since:
- 3.0
-
setProcedureTableTypeName
public void setProcedureTableTypeName(String typeName)
Sets the type name for procedure tables.- Parameters:
typeName- a type name- Since:
- 3.0
-
getColumnNamePattern
public String getColumnNamePattern()
Returns the pattern used to format a column name in an SQL query.The name is represented by the tag
$$name$$.- Returns:
- a column name pattern
String - Since:
- 3.0
- See Also:
SQLFilter.formatColumnName(java.lang.String)
-
setColumnNamePattern
public void setColumnNamePattern(String p)
Sets the pattern used to format a column name in an SQL query.The name is represented by the tag
$$name$$.- Parameters:
p- a column name patternString- Since:
- 3.0
- See Also:
SQLFilter.formatColumnName(java.lang.String)
-
getTableNamePattern
public String getTableNamePattern()
Returns the pattern used to format a table name in an SQL query.The name is represented by the tag
$$name$$.- Returns:
- a table name pattern
String - Since:
- 3.0
- See Also:
SQLFilter.formatTableName(java.lang.String)
-
setTableNamePattern
public void setTableNamePattern(String p)
Sets the pattern used to format a table name in an SQL query.The name is represented by the tag
$$name$$.- Parameters:
p- a table name patternString- Since:
- 3.0
- See Also:
SQLFilter.formatTableName(java.lang.String)
-
getProcedureNamePattern
public String getProcedureNamePattern()
Returns the pattern used to format a procedure name in an SQL query.The name is represented by the tag
$$name$$.- Returns:
- a procedure name pattern
String - Since:
- 3.0
-
setProcedureNamePattern
public void setProcedureNamePattern(String p)
Sets the pattern used to format a procedure name in an SQL query.The name is represented by the tag
$$name$$.- Parameters:
p- a procedure name patternString- Since:
- 3.0
-
getSchemaNamePattern
public String getSchemaNamePattern()
Returns the pattern used to format a schema name in an SQL query.The name is represented by the tag
$$name$$.- Returns:
- a schema name pattern
String - Since:
- 3.0
- See Also:
SQLFilter.formatSchemaName(java.lang.String)
-
setSchemaNamePattern
public void setSchemaNamePattern(String p)
Sets the pattern used to format a schema name in an SQL query.The name is represented by the tag
$$name$$.- Parameters:
p- a schema name patternString- Since:
- 3.0
- See Also:
SQLFilter.formatSchemaName(java.lang.String)
-
getCatalogNamePattern
public String getCatalogNamePattern()
Returns the pattern used to format a catalog name in an SQL query.The name is represented by the tag
$$name$$.- Returns:
- a catalog name pattern
String - Since:
- 3.0
- See Also:
SQLFilter.formatCatalogName(java.lang.String)
-
setCatalogNamePattern
public void setCatalogNamePattern(String p)
Sets the pattern used to format a catalog name in an SQL query.The name is represented by the tag
$$name$$.- Parameters:
p- a catalog name patternString- Since:
- 3.0
- See Also:
SQLFilter.formatCatalogName(java.lang.String)
-
getColumnAliasPattern
public String getColumnAliasPattern()
Returns the pattern used to format a column alias in an SQL query.The name is represented by the tag
$$name$$.- Returns:
- a column alias pattern
String - Since:
- 3.0
- See Also:
SQLFilter.formatColumnAlias(java.lang.String)
-
setColumnAliasPattern
public void setColumnAliasPattern(String p)
Sets the pattern used to format a column alias in an SQL query.The alias is represented by the tag
$$name$$.- Parameters:
p- a column alias patternString- Since:
- 3.0
- See Also:
SQLFilter.formatColumnAlias(java.lang.String)
-
getStringLiteralQuote
public String getStringLiteralQuote()
Returns The character used as quote for string literals.- Returns:
- a string literal quote
String - Since:
- 3.0
- See Also:
SQLFilter.formatLiteral(java.lang.String, java.lang.Class)
-
setStringLiteralQuote
public void setStringLiteralQuote(String s)
Sets The character used as quote for string literals.- Parameters:
s- a string literal quoteString- Since:
- 3.0
- See Also:
SQLFilter.formatLiteral(java.lang.String, java.lang.Class)
-
getMinInClauseSize
public int getMinInClauseSize()
Returns the minimum number of values for creating a SQL IN-clause. For fewer values, each value will have its own condition.- Returns:
- minimum IN clause size
- Since:
- 3.0
-
setMinInClauseSize
public void setMinInClauseSize(int i)
Sets the minimum number of values for creating a SQL IN-clause. For fewer values, each value will have its own condition.- Parameters:
i- minimum IN clause size- Since:
- 3.0
-
getMaxInClauseSize
public int getMaxInClauseSize()
Returns the maximum size of an SQL IN-clause. Larger lists are split into several clauses that are OR:ed together.- Returns:
- maximum IN clause size
- Since:
- 3.0
-
setMaxInClauseSize
public void setMaxInClauseSize(int i)
Size the maximum size of an SQL IN-clause. Larger lists are split into several clauses that are OR:ed together.- Parameters:
i- maximum IN clause size- Since:
- 3.0
-
getConditionListThreshold
public int getConditionListThreshold()
Return the condition list threshold. A temporary table is used when executing an SQL query, where total size of a condition list is larger than this threshold value.- Returns:
- a condition list threshold value
- Since:
- 3.0
-
setConditionListThreshold
public void setConditionListThreshold(int i)
Sets the condition list threshold. A temporary table is used when executing an SQL query, where total size of a condition list is larger than this threshold value.- Parameters:
i- a condition list threshold value- Since:
- 3.0
-
getExpandInClause
public boolean getExpandInClause()
Tells if an SQL IN-clause shall be expanded into OR conditions.- Returns:
trueif IN-clauses shall be expanded,falseotherwise- Since:
- 3.0
-
setExpandInClause
public void setExpandInClause(boolean b)
Sets if an SQL IN-clause shall be expanded into OR conditions.- Parameters:
b-trueif IN-clauses shall be expanded,falseotherwise- Since:
- 3.0
-
getTableExpressionPattern
public String getTableExpressionPattern()
Return the pattern that determines how a table expression is written in the SQL query.The following tags are used as placeholders for the catalog, schema and table name:
$$catalog$$,$$schema$$and$$table$$.Optional parts are surrounded by brackets (
[and]).- Returns:
- a table expression pattern
String - Since:
- 3.0
- See Also:
SQLFilter.formatTable(java.lang.String, java.lang.String, java.lang.String)
-
setTableExpressionPattern
public void setTableExpressionPattern(String s)
Sets the pattern that determines how a table expression is written in the SQL query.The following tags are used as placeholders for the catalog, schema and table name:
$$catalog$$,$$schema$$and$$table$$.Optional parts are surrounded by brackets (
[and]).- Parameters:
s- a table expression patternString- Since:
- 3.0
- See Also:
SQLFilter.formatTable(java.lang.String, java.lang.String, java.lang.String)
-
getProcedureExpressionPattern
public String getProcedureExpressionPattern()
Return the pattern that determines how a procedure expression is written in the SQL query.The following tags are used as placeholders for the catalog, schema and procedure name:
$$catalog$$,$$schema$$and$$procedure$$.Optional parts are surrounded by brackets (
[and]).- Returns:
- a procedure expression pattern
String - Since:
- 3.0
- See Also:
SQLFilter.formatProcedure(java.lang.String, java.lang.String, java.lang.String)
-
setProcedureExpressionPattern
public void setProcedureExpressionPattern(String s)
Sets the pattern that determines how a procedure expression is written in the SQL query.The following tags are used as placeholders for the catalog, schema and table name:
$$catalog$$,$$schema$$and$$procedure$$.Optional parts are surrounded by brackets (
[and]).- Parameters:
s- a procedure expression patternString- Since:
- 3.0
- See Also:
SQLFilter.formatProcedure(java.lang.String, java.lang.String, java.lang.String)
-
getDateFormatExpression
public String getDateFormatExpression()
Returns an expression that converts a date field to a string value on the format:"YYYY-MM-DD", e.g. "2002-11-19".The expression contains a
$$value$$tag that is a placeholder for a date field.- Returns:
- an expression
String - Since:
- 3.0
- See Also:
SQLFilter.formatConditionExpression(java.lang.String, java.lang.Class)
-
setDateFormatExpression
public void setDateFormatExpression(String s)
Sets an expression that converts a date field to a string value on the format:"YYYY-MM-DD", e.g. "2002-11-19".The expression must contain a
$$value$$tag that is a placeholder for a date field.- Parameters:
s- an expressionString- Since:
- 3.0
- See Also:
SQLFilter.formatConditionExpression(java.lang.String, java.lang.Class)
-
getTimeFormatExpression
public String getTimeFormatExpression()
Returns an expression that converts a time field to a string value on the format:"HH:MM:SS", e.g. "14:59:00".The expression contains a
$$value$$tag that is a placeholder for a date field.- Returns:
- an expression
String - Since:
- 3.0
- See Also:
SQLFilter.formatConditionExpression(java.lang.String, java.lang.Class)
-
setTimeFormatExpression
public void setTimeFormatExpression(String s)
Sets an expression that converts a time field to a string value on the format:"HH:MM:SS", e.g. "14:59:00".The expression must contain a
$$value$$tag that is a placeholder for a date field.- Parameters:
s- an expressionString- Since:
- 3.0
- See Also:
SQLFilter.formatConditionExpression(java.lang.String, java.lang.Class)
-
getDateTimeFormatExpression
public String getDateTimeFormatExpression()
Returns an expression that converts a datetime field to string value on the format: "YYYY-MM-DD HH:MM:SS", e.g. "2002-11-19 14:59:00".The expression contains a
$$value$$tag that is a placeholder for a date field.- Returns:
- an expression
String - Since:
- 3.0
- See Also:
SQLFilter.formatConditionExpression(java.lang.String, java.lang.Class)
-
setDateTimeFormatExpression
public void setDateTimeFormatExpression(String s)
Sets an expression that converts a datetime field to string value on the format: "YYYY-MM-DD HH:MM:SS", e.g. "2002-11-19 14:59:00".The expression must contain a
$$value$$tag that is a placeholder for a date field.- Parameters:
s- an expressionString- Since:
- 3.0
- See Also:
SQLFilter.formatConditionExpression(java.lang.String, java.lang.Class)
-
getDateLiteralFormatExpression
public String getDateLiteralFormatExpression()
Returns an expression that converts a date literal to a database date value. The date literal is on the format "YYYY-MM-DD", e.g. "2002-11-19".The expression contains a
$$value$$tag that is a placeholder for a date literal.- Returns:
- an expression
String - Since:
- 3.0
- See Also:
SQLFilter.formatLiteral(java.lang.String, java.lang.Class)
-
setDateLiteralFormatExpression
public void setDateLiteralFormatExpression(String s)
Sets an expression that converts a date literal to a database date value. The date literal is on the format: "YYYY-MM-DD", e.g. "2002-11-19".The expression must contain a
$$value$$tag that is a placeholder for a date literal.- Parameters:
s- an expressionString- Since:
- 3.0
- See Also:
SQLFilter.formatLiteral(java.lang.String, java.lang.Class)
-
getTimeLiteralFormatExpression
public String getTimeLiteralFormatExpression()
Returns an expression that converts a time literal to a database time value. The time literal is on the format:"HH:MM:SS", e.g. "14:59:00".The expression contains a
$$value$$tag that is a placeholder for a date literal.- Returns:
- an expression
String - Since:
- 3.0
- See Also:
SQLFilter.formatLiteral(java.lang.String, java.lang.Class)
-
setTimeLiteralFormatExpression
public void setTimeLiteralFormatExpression(String s)
Sets an expression that converts a time literal to a database time value. The time literal is on the format:"HH:MM:SS", e.g. "14:59:00".The expression must contain a
$$value$$tag that is a placeholder for a date literal.- Parameters:
s- an expressionString- Since:
- 3.0
- See Also:
SQLFilter.formatLiteral(java.lang.String, java.lang.Class)
-
getDateTimeLiteralFormatExpression
public String getDateTimeLiteralFormatExpression()
Returns an expression that converts a datetime literal to a database datetime value. The datetime literal is on the format: "YYYY-MM-DD HH:MM:SS", e.g. "2002-11-19 14:59:00".The expression contains a
$$value$$tag that is a placeholder for a date literal.- Returns:
- an expression
String - Since:
- 3.0
- See Also:
SQLFilter.formatLiteral(java.lang.String, java.lang.Class)
-
setDateTimeLiteralFormatExpression
public void setDateTimeLiteralFormatExpression(String s)
Sets an expression that converts a datetime literal to a database datetime value. The datetime literal is on the format: "YYYY-MM-DD HH:MM:SS", e.g. "2002-11-19 14:59:00".The expression must contain a
$$value$$tag that is a placeholder for a date literal.- Parameters:
s- an expressionString- Since:
- 3.0
- See Also:
SQLFilter.formatLiteral(java.lang.String, java.lang.Class)
-
getSQLType
public String getSQLType(Class javaType)
Returns the SQL type for a given Java type.- Parameters:
javaType- a Java type- Returns:
- a SQL type
- Since:
- 3.0
- See Also:
SQLFilter.getSQLType(java.lang.Class, int),JDBCTypeSettings.TypeMapping
-
getSQLType
public String getSQLType(Class javaType, int length)
Returns the SQL type for a given Java type. If a positive length argument is specified, the method returns the type mapping with the smallest max-length that is larger than length. If a zero-length is specified, the method returns the first type-mapping in the list where max-length = -1, or if there is no such type-mapping with max-length = -1, then it returns the type mapping with largest max-length.- Parameters:
javaType- a Java typelength- the length whentypeisString- Returns:
- a SQL type
- Since:
- 3.0
- See Also:
SQLFilter.getSQLType(java.lang.Class, int),JDBCTypeSettings.TypeMapping
-
getTypeMappings
public JDBCTypeSettings.TypeMapping[] getTypeMappings()
Returns all Java to SQL type mappings.- Returns:
- a
TypeMappingarray - Since:
- 3.0
- See Also:
getSQLType(Class)
-
setTypeMappings
public void setTypeMappings(JDBCTypeSettings.TypeMapping[] t)
Sets all Java to SQL type mappings.- Parameters:
t- aTypeMappingarray- Since:
- 3.0
- See Also:
getSQLType(Class)
-
setAlwaysUsePreparedStatement
public void setAlwaysUsePreparedStatement(boolean alwaysUsePreparedStatement)
Indicates if prepared statement should be used even when no parameters are set.- Parameters:
alwaysUsePreparedStatement- the alwaysUsePreparedStatement to set- Since:
- 3.0
-
getAlwaysUsePreparedStatement
public boolean getAlwaysUsePreparedStatement()
Indicates if prepared statement should be used even when no parameters are set.- Returns:
- true if prepared statement should be used, false if not.
- Since:
- 3.0
-
addTypeMapping
public void addTypeMapping(JDBCTypeSettings.TypeMapping t)
Add a Java to SQL type mapping.- Parameters:
t- aTypeMappingobject- Since:
- 3.0
- See Also:
getSQLType(Class)
-
getSQLAggregateFuntion
public String getSQLAggregateFuntion(String datAggregateFuntion)
Get the SQL aggregate function for the given DAT aggregate function, or null if no such SQL function exists.- Parameters:
datAggregateFuntion- a DAT aggregate function.- Returns:
- an SQL aggregate function.
- Since:
- 3.0
-
getTempTableNamePattern
public String getTempTableNamePattern()
Returns the pattern used to format a temporary table name in an SQL command.The name is represented by the tag
$$name$$.- Returns:
- a table name pattern
String - Since:
- 3.0
- See Also:
SQLFilter.formatCreateTableSQL(java.lang.String, java.lang.String[], java.lang.String[])
-
setTempTableNamePattern
public void setTempTableNamePattern(String p)
Sets the pattern used to format a temporary table name in an SQL command.The name is represented by the tag
$$name$$.- Parameters:
p- a table name patternString- Since:
- 3.0
- See Also:
SQLFilter.formatCreateTableSQL(java.lang.String, java.lang.String[], java.lang.String[])
-
getCreateTempTableCommands
public String[] getCreateTempTableCommands()
Returns the SQL commands needed for creating a temporary table that is used to store filter values (when more than 'condition-list-threshold') and to store result from subqueries.The
$$name$$tag is a placeholder for the table name. The$$column_list$$tag is a placeholder for a column list on the format "(name type, name type, ...)"- Returns:
- a command
Stringarray - Since:
- 3.0
- See Also:
SQLFilter.formatCreateTableSQL(java.lang.String, java.lang.String[], java.lang.String[]),SQLFilter.formatColumnList(java.lang.String[], java.lang.String[])
-
setCreateTempTableCommands
public void setCreateTempTableCommands(String[] s)
Sets the SQL commands needed for creating a temporary table that is used to store filter values (when more than 'condition-list-threshold') and to store result from subqueries.The
$$name$$tag is a placeholder for the table name. The$$column_list$$tag is a placeholder for a column list on the format "(name type, name type, ...)"- Parameters:
s- a commandStringarray- Since:
- 3.0
- See Also:
SQLFilter.formatCreateTableSQL(java.lang.String, java.lang.String[], java.lang.String[]),SQLFilter.formatColumnList(java.lang.String[], java.lang.String[])
-
getDropTempTableCommands
public String[] getDropTempTableCommands()
Returns the SQL commands for deleting a temporary table.The
$$name$$tag is a placeholder for the table name.- Returns:
- a command
Stringarray - Since:
- 3.0
- See Also:
SQLFilter.formatDropTableSQL(java.lang.String)
-
setDropTempTableCommands
public void setDropTempTableCommands(String[] s)
Sets the SQL commands for deleting a temporary table.The
$$name$$tag is a placeholder for the table name.- Parameters:
s- a commandStringarray- Since:
- 3.0
- See Also:
SQLFilter.formatDropTableSQL(java.lang.String)
-
getLobThreshold
public int getLobThreshold()
Returns the threshold value when LOB values used as parameters in a WHERE clause, must be written in temporary tables.- Returns:
- a threshold value, -1 means no limit
- Since:
- 3.0
-
setLobThreshold
public void setLobThreshold(int i)
Sets the threshold value when LOB values used as parameters in a WHERE clause, must be written in temporary tables.- Parameters:
i- a threshold value, -1 means no limit- Since:
- 3.0
-
isAnsiiStyleOuterJoin
public boolean isAnsiiStyleOuterJoin()
Returns if an attempt should be done to go from oracle outer join syntax with '(+)' to ANSI form If useAnsiJoin() is true, then this setting has no effect.- Returns:
- if we should rewrite
- Since:
- 3.0
-
setAnsiiStyleOuterJoin
public void setAnsiiStyleOuterJoin(boolean outerJoin)
Set if an attempt should be done to go from oracle outer join syntax with '(+)' to ANSI form If useAnsiJoin() is true, then this setting has no effect.- Parameters:
outerJoin- if rewrite should take place- Since:
- 3.0
-
isAnsiJoin
public boolean isAnsiJoin()
Returns if an attempt should be made to create ansi join syntax.- Returns:
- true if attempts should be made to create ansi join syntax, false if not.
- Since:
- 7.5
-
setAnsiJoin
public void setAnsiJoin(boolean useAnsiJoin)
Set if an attempt should be made to create ansi join syntax.- Parameters:
useAnsiJoin- if set to true attempts should be made to create ansi join syntax, if false no attempt to rewrite inner joins will be made and outer joins depend on value for isAnsiiStyleOuterJoin().- Since:
- 7.5
-
getConnectionProperties
public Properties getConnectionProperties()
Returns the connection properties used when creating a new connection to the database.- Returns:
- a
Propertiesvalue - Since:
- 3.0
-
setConnectionProperties
public void setConnectionProperties(Properties connectionProperties)
Sets the connection properties used when creating a new connection to the database.- Parameters:
connectionProperties- the connection properties- Since:
- 3.0
-
getCredentialsTimeout
public int getCredentialsTimeout()
Gets the credentials timeout for a JDBC data source. The timeout is given in seconds.- Returns:
- the credentials timeout, in seconds, for a JDBC data source.
- Since:
- 3.2
-
setCredentialsTimeout
public void setCredentialsTimeout(int credentialsTimeout)
Sets the credentials timeout for a JDBC data source. The timeout is stated in seconds.- Parameters:
credentialsTimeout- the credentials timeout, in seconds, for a JDBC data source- Since:
- 3.2
-
setAutocommit
public void setAutocommit(boolean autocommit)
Sets the auto commit mode for connection on the data source.- Parameters:
autocommit- false means autocommit is not set, true means autocommit is set if supported.- Since:
- 3.2
-
getAutocommit
public boolean getAutocommit()
Get autocommit mode.- Returns:
- true if autocommit mode is set, false otherwise.
- Since:
- 3.2
-
-