Package io.jmix.dynmodel.impl.db
Class OracleDynamicModelDbSupport
java.lang.Object
io.jmix.dynmodel.impl.db.DynamicModelDbSupport
io.jmix.dynmodel.impl.db.OracleDynamicModelDbSupport
-
Field Summary
Fields inherited from class io.jmix.dynmodel.impl.db.DynamicModelDbSupport
DEFAULT_BYTES_LENGTH, DEFAULT_STRING_LENGTH, DEFAULT_URI_LENGTH, FALLBACK_IDENTIFIER, IDENTIFIER_HASH_LENGTH, maxIdentifierLength, metadataTools, reservedWords, STANDARD_RESERVED_WORDS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAddColumnSql(String tableName, String columnName, String columnType) Returns SQL that adds a single column to an existing table.getAlterColumnTypeSql(String tableName, String columnName, String columnType) Returns SQL that changes the type/length of an existing column.protected Stringprotected StringgetBytesType(int length) protected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected StringgetSqlTypeByJavaType(Class<?> javaType, MetaProperty property) protected StringgetStringType(int length) protected StringgetUniqueDuplicateCheckPredicate(List<String> columnNames) Returns the WHERE predicate (without theWHEREkeyword) that excludes rows from the duplicate-data pre-check run before adding a unique constraint, reflecting how this DBMS treats NULLs in unique keys.protected Stringprotected Booleanprotected ObjecttoDbBoolean(Boolean value) protected ObjecttoDbLocalTime(LocalTime value) protected ObjecttoDbOffsetDateTime(OffsetDateTime value) protected ObjecttoDbOffsetTime(OffsetTime value) protected Objectprotected OffsetDateTimetoOffsetDateTime(Object dbValue) protected OffsetTimetoOffsetTime(Object dbValue) protected UUIDbooleanuniqueConstraintExists(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate, String tableName, String constraintName) Checks whether the named unique constraint already exists on the given table.Methods inherited from class io.jmix.dynmodel.impl.db.DynamicModelDbSupport
appendTrailingUnderscore, applyPaging, canonicalizeIdentifier, configureIdentifierRules, extractUniqueConstraintName, getBytesLobType, getCreateUniqueConstraintSql, getDropUniqueConstraintSql, getEnumIdType, getLength, getLikeEscapeClause, getLocalDateTimeType, getReferenceJavaType, getSqlType, getStringLobType, hashIdentifier, isDuplicateConstraintException, isLob, isReservedWord, normalizeGeneratedIdentifier, resolveConstraintName, setMetadataTools, shortenIdentifier, toByteArray, toDbValue, toEnumValue, toLocalDate, toLocalDateTime, toLocalTime, toNumber, toPropertyValue, toUnderscoreSeparated
-
Constructor Details
-
OracleDynamicModelDbSupport
public OracleDynamicModelDbSupport()
-
-
Method Details
-
getAddColumnSql
Description copied from class:DynamicModelDbSupportReturns SQL that adds a single column to an existing table.- Overrides:
getAddColumnSqlin classDynamicModelDbSupport- Parameters:
tableName- physical table namecolumnName- physical column namecolumnType- physical column type- Returns:
- DDL statement
-
getAlterColumnTypeSql
Description copied from class:DynamicModelDbSupportReturns SQL that changes the type/length of an existing column.- Overrides:
getAlterColumnTypeSqlin classDynamicModelDbSupport- Parameters:
tableName- physical table namecolumnName- physical column namecolumnType- new physical column type- Returns:
- DDL statement
-
getUniqueDuplicateCheckPredicate
Description copied from class:DynamicModelDbSupportReturns the WHERE predicate (without theWHEREkeyword) that excludes rows from the duplicate-data pre-check run before adding a unique constraint, reflecting how this DBMS treats NULLs in unique keys. The default treats NULLs as distinct, so a row with a NULL in any constrained column never collides and is ignored. Returns an empty string when no rows should be excluded.- Overrides:
getUniqueDuplicateCheckPredicatein classDynamicModelDbSupport
-
getSqlTypeByJavaType
- Overrides:
getSqlTypeByJavaTypein classDynamicModelDbSupport
-
getUuidSqlType
- Specified by:
getUuidSqlTypein classDynamicModelDbSupport
-
getStringType
- Overrides:
getStringTypein classDynamicModelDbSupport
-
getBytesType
- Overrides:
getBytesTypein classDynamicModelDbSupport
-
getBooleanType
- Overrides:
getBooleanTypein classDynamicModelDbSupport
-
getLocalTimeType
- Overrides:
getLocalTimeTypein classDynamicModelDbSupport
-
toDbLocalTime
- Overrides:
toDbLocalTimein classDynamicModelDbSupport
-
getDoubleType
- Overrides:
getDoubleTypein classDynamicModelDbSupport
-
getFloatType
- Overrides:
getFloatTypein classDynamicModelDbSupport
-
getOffsetTimeType
- Overrides:
getOffsetTimeTypein classDynamicModelDbSupport
-
getOffsetDateTimeType
- Overrides:
getOffsetDateTimeTypein classDynamicModelDbSupport
-
toDbUuid
- Overrides:
toDbUuidin classDynamicModelDbSupport
-
toUuid
- Overrides:
toUuidin classDynamicModelDbSupport
-
toDbBoolean
- Overrides:
toDbBooleanin classDynamicModelDbSupport
-
toBoolean
- Overrides:
toBooleanin classDynamicModelDbSupport
-
toDbOffsetTime
- Overrides:
toDbOffsetTimein classDynamicModelDbSupport
-
toOffsetTime
- Overrides:
toOffsetTimein classDynamicModelDbSupport
-
toDbOffsetDateTime
- Overrides:
toDbOffsetDateTimein classDynamicModelDbSupport
-
toOffsetDateTime
- Overrides:
toOffsetDateTimein classDynamicModelDbSupport
-
getUniqueConstraintViolationPattern
- Overrides:
getUniqueConstraintViolationPatternin classDynamicModelDbSupport
-
uniqueConstraintExists
public boolean uniqueConstraintExists(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate, String tableName, String constraintName) Description copied from class:DynamicModelDbSupportChecks whether the named unique constraint already exists on the given table.- Overrides:
uniqueConstraintExistsin classDynamicModelDbSupport- Parameters:
jdbcTemplate- JDBC template for the target storetableName- physical table nameconstraintName- physical constraint name- Returns:
trueif the constraint already exists
-
getDuplicateConstraintPattern
- Overrides:
getDuplicateConstraintPatternin classDynamicModelDbSupport
-