public final class OracleDialect extends GeneratorDialect
NOW
Constructor and Description |
---|
OracleDialect() |
Modifier and Type | Method and Description |
---|---|
List<? extends EntityStatement> |
adjustNextSequenceValue(String sequenceName,
long currentSequenceValue,
long nextSequenceValue,
int incrementSize)
Adjusts the given sequence to ensure that the next value is exactly the given value.
|
String |
buildCurrentSequenceValue(String sequence,
int incrementSize)
Builds the SQL expression that is used for referencing the current value of the given sequence.
|
String |
buildNextSequenceValue(String sequence,
int incrementSize)
Builds the SQL expression resp. statement that is used for creating the next value of the given sequence.
|
String |
convertTemporalValue(Date value,
javax.persistence.TemporalType type)
Converts a date to an appropriate SQL expression.
|
String |
createBlobExpression(byte[] blob)
Converts the given byte array to an SQL expression for the current database.
|
String |
getOptionalTable()
Returns the string to use when no table is required, e.g. for "SELECT 1, 2 FROM DUAL" this would return "FROM
DUAL".
|
boolean |
isEmptyStringEqualToNull()
Indicates that the empty string is equal to
null in this database. |
boolean |
isIdentitySupported()
Indicates that identity columns are supported by the database.
|
boolean |
isSequenceInWhereSupported()
Indicates that references to sequences in
WHERE expressions are supported. |
String |
quoteString(String value)
Quotes the given string.
|
addQuotedCharacter, adjustNextIdentityValue, convertBooleanValue, createHexBlobExpression, createSql, getAutoGenerationType, isNextSequenceValueInInsertSupported, isSequenceSupported
public List<? extends EntityStatement> adjustNextSequenceValue(String sequenceName, long currentSequenceValue, long nextSequenceValue, int incrementSize)
GeneratorDialect
adjustNextSequenceValue
in class GeneratorDialect
sequenceName
- the name of the sequencecurrentSequenceValue
- the current value of the sequencenextSequenceValue
- the next value of the sequenceincrementSize
- the increment size of the sequencepublic String buildCurrentSequenceValue(String sequence, int incrementSize)
GeneratorDialect
buildCurrentSequenceValue
in class GeneratorDialect
sequence
- the name of the sequenceincrementSize
- the expected incrementSize, as given in the schema - used by some dialects to ensure that exactly that
inrement is usedpublic String buildNextSequenceValue(String sequence, int incrementSize)
GeneratorDialect
GeneratorDialect.isNextSequenceValueInInsertSupported()
this will return an expression or a statement.buildNextSequenceValue
in class GeneratorDialect
sequence
- the name of the sequenceincrementSize
- the expected incrementSize, as given in the schema - used by some dialects to ensure that exactly that
inrement is usedpublic String convertTemporalValue(Date value, javax.persistence.TemporalType type)
GeneratorDialect
convertTemporalValue
in class GeneratorDialect
value
- the timestamp valuetype
- the typepublic String createBlobExpression(byte[] blob)
GeneratorDialect
createBlobExpression
in class GeneratorDialect
blob
- the bytes to convertpublic String getOptionalTable()
GeneratorDialect
getOptionalTable
in class GeneratorDialect
public boolean isEmptyStringEqualToNull()
GeneratorDialect
null
in this database.
Important for NotNull
constraints, where an empty string would result in the same constraint violation.isEmptyStringEqualToNull
in class GeneratorDialect
true
if this database assumes that an empty string is the same as null
public boolean isIdentitySupported()
GeneratorDialect
isIdentitySupported
in class GeneratorDialect
true
if the database supports identitiespublic boolean isSequenceInWhereSupported()
GeneratorDialect
WHERE
expressions are supported.isSequenceInWhereSupported
in class GeneratorDialect
true
if this database supports sequences in WHERE
expressionspublic String quoteString(String value)
GeneratorDialect
quoteString
in class GeneratorDialect
value
- the value to quoteCopyright © 2016 fastnate.org. All rights reserved.