public class OracleHelper extends GenericDbmsHelper
databasePlatform
Constructor and Description |
---|
OracleHelper(org.eclipse.persistence.platform.database.DatabasePlatform databasePlatform) |
Modifier and Type | Method and Description |
---|---|
String |
getCopyColumnToAnotherTableStatement(String sourceTable,
String sourceColumnName,
String sourceIDColumnName,
String targetTable,
String targetColumnName,
String targetIDColumnName)
Get's the
UPDATE statement for sourceTable for copy column from targetTable by matching
table keys sourceIDColumnName and targetIDColumnName |
String |
getCopyColumnToAnotherTableStatement(String sourceTable,
String sourceColumnName,
String sourceIDColumnName1,
String sourceIDColumnName2,
String sourceIDColumnName3,
String targetTable,
String targetColumnName,
String targetIDColumnName1,
String targetIDColumnName2,
String targetIDColumnName3,
String sourceConditionFieldName,
String condition)
Get's the
UPDATE statement for sourceTable for copy column from targetTable by matching
table keys sourceIDColumnName and targetIDColumnName
and condition sourceConditionFieldName = condition |
boolean |
isConstraintSupportedAfterNullability()
Gets whether the database platform supports adding contraints after the
NULL constraint. |
boolean |
supportsColumnTypeChange()
Check if column type can be modified directly
|
StringBuilder |
writeColumnModifyString(StringBuilder builder,
DBAccessor.DBColumnInfo columnInfo) |
StringBuilder |
writeColumnRenameString(StringBuilder builder,
String oldName,
DBAccessor.DBColumnInfo newColumnInfo) |
String |
writeGetTableConstraints(String databaseName,
String tableName) |
StringBuilder |
writeSetNullableString(StringBuilder builder,
String tableName,
DBAccessor.DBColumnInfo columnInfo,
boolean nullable) |
convertToFieldDefinition, createStubAbstractSessionFromPlatform, getAddColumnStatement, getAddForeignKeyStatement, getAddPrimaryKeyConstraintStatement, getAddUniqueConstraintStatement, getAlterColumnStatement, getColumnUpdateStatementWhereColumnIsNull, getCreateIndexStatement, getCreateIndexStatement, getCreateTableStatement, getDropFKConstraintStatement, getDropIndexStatement, getDropPrimaryKeyStatement, getDropSequenceStatement, getDropTableColumnStatement, getDropTableStatement, getDropUniqueConstraintStatement, getRenameColumnStatement, getRenameColumnStatement, getSetNullableStatement, getTableConstraintsStatement, quoteObjectName, writeAddPrimaryKeyString, writeAlterTableClause, writeColumnType, writeCreateTableStatement, writeDropPrimaryKeyStatement, writeDropTableColumnStatement
public OracleHelper(org.eclipse.persistence.platform.database.DatabasePlatform databasePlatform)
public boolean supportsColumnTypeChange()
DbmsHelper
supportsColumnTypeChange
in interface DbmsHelper
supportsColumnTypeChange
in class GenericDbmsHelper
public StringBuilder writeColumnRenameString(StringBuilder builder, String oldName, DBAccessor.DBColumnInfo newColumnInfo)
writeColumnRenameString
in class GenericDbmsHelper
public StringBuilder writeColumnModifyString(StringBuilder builder, DBAccessor.DBColumnInfo columnInfo)
writeColumnModifyString
in class GenericDbmsHelper
public StringBuilder writeSetNullableString(StringBuilder builder, String tableName, DBAccessor.DBColumnInfo columnInfo, boolean nullable)
writeSetNullableString
in class GenericDbmsHelper
public String writeGetTableConstraints(String databaseName, String tableName)
writeGetTableConstraints
in class GenericDbmsHelper
public boolean isConstraintSupportedAfterNullability()
NULL
constraint. Some database, such as Oracle, don't allow this.
Unfortunately, EclipsLink hard codes the order of constraints.
Oracle supports the format:
ALTER TABLE foo ADD COLUMN bar varchar2(32) DEFAULT 'baz' NOT NULLThis syntax doesn't allow contraints added after the
NULL
constraint.isConstraintSupportedAfterNullability
in interface DbmsHelper
isConstraintSupportedAfterNullability
in class GenericDbmsHelper
true
if contraints can be added after the NULL
constraint, false
otherwise.public String getCopyColumnToAnotherTableStatement(String sourceTable, String sourceColumnName, String sourceIDColumnName, String targetTable, String targetColumnName, String targetIDColumnName)
UPDATE
statement for sourceTable
for copy column from targetTable
by matching
table keys sourceIDColumnName
and targetIDColumnName
getCopyColumnToAnotherTableStatement
in interface DbmsHelper
getCopyColumnToAnotherTableStatement
in class GenericDbmsHelper
sourceTable
- the source table namesourceColumnName
- the source column namesourceIDColumnName
- source key id column which would be used to math right rows for targetTable
targetTable
- the destination table nametargetColumnName
- the destination column nametargetIDColumnName
- destination key id column name which should math sourceIDColumnName
public String getCopyColumnToAnotherTableStatement(String sourceTable, String sourceColumnName, String sourceIDColumnName1, String sourceIDColumnName2, String sourceIDColumnName3, String targetTable, String targetColumnName, String targetIDColumnName1, String targetIDColumnName2, String targetIDColumnName3, String sourceConditionFieldName, String condition)
UPDATE
statement for sourceTable
for copy column from targetTable
by matching
table keys sourceIDColumnName
and targetIDColumnName
and condition sourceConditionFieldName
= condition
getCopyColumnToAnotherTableStatement
in interface DbmsHelper
getCopyColumnToAnotherTableStatement
in class GenericDbmsHelper
sourceTable
- the source table namesourceColumnName
- the source column namesourceIDColumnName1
- source key id column which would be used to math right rows for targetTable
sourceIDColumnName2
- source key id column which would be used to math right rows for targetTable
sourceIDColumnName3
- source key id column which would be used to math right rows for targetTable
targetTable
- the destination table nametargetColumnName
- the destination column nametargetIDColumnName1
- destination key id column name which should match sourceIDColumnName1
targetIDColumnName2
- destination key id column name which should match sourceIDColumnName1
targetIDColumnName3
- destination key id column name which should match sourceIDColumnName1
sourceConditionFieldName
- source key column name which should match condition
condition
- value which should match sourceConditionFieldName
Copyright © 2022 Apache Software Foundation. All rights reserved.