Class JdbcMappingContext
java.lang.Object
org.springframework.data.mapping.context.AbstractMappingContext<RelationalPersistentEntity<?>, RelationalPersistentProperty>
org.springframework.data.relational.core.mapping.RelationalMappingContext
org.springframework.data.jdbc.core.mapping.JdbcMappingContext
- All Implemented Interfaces:
Aware, BeanFactoryAware, InitializingBean, ApplicationContextAware, ApplicationEventPublisherAware, EnvironmentAware, MappingContext<RelationalPersistentEntity<?>, RelationalPersistentProperty>
MappingContext implementation for JDBC.- Author:
- Jens Schauder, Greg Turnquist, Kazuki Shimizu, Oliver Gierke, Mark Paluch, Paul-Christian Volkmer
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a newJdbcMappingContext.JdbcMappingContext(NamingStrategy namingStrategy) Creates a newJdbcMappingContextusing the givenNamingStrategy. -
Method Summary
Modifier and TypeMethodDescriptionprotected RelationalPersistentPropertycreatePersistentProperty(Property property, RelationalPersistentEntity<?> owner, SimpleTypeHolder simpleTypeHolder) static JdbcMappingContextCreate a newJdbcMappingContextusingplain identifiers.static JdbcMappingContextforPlainIdentifiers(NamingStrategy namingStrategy) static JdbcMappingContextCreate a newJdbcMappingContextusingquoted identifiers(default behavior).static JdbcMappingContextforQuotedIdentifiers(NamingStrategy namingStrategy) Create a newJdbcMappingContextusingquoted identifiers(default behavior) and the givenNamingStrategy.protected booleanshouldCreatePersistentEntityFor(org.springframework.data.core.TypeInformation<?> type) Methods inherited from class RelationalMappingContext
applyDefaults, createPersistentEntity, getAggregatePath, getAggregatePath, getNamingStrategy, getPersistentEntity, isForceQuote, isSingleQueryLoadingEnabled, setApplicationContext, setEnvironment, setForceQuote, setSingleQueryLoadingEnabled, setSqlIdentifierSanitizerMethods inherited from class AbstractMappingContext
addPersistentEntity, addPersistentEntity, afterPropertiesSet, doFindPersistentPropertyPaths, findPersistentPropertyPaths, getManagedTypes, getPersistentEntities, getPersistentEntity, getPersistentEntity, getPersistentPropertyPath, getPersistentPropertyPath, getPersistentPropertyPath, hasPersistentEntityFor, initialize, setApplicationEventPublisher, setBeanFactory, setInitialEntitySet, setManagedTypes, setSimpleTypeHolder, setStrict, shouldCreatePropertiesMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface MappingContext
getRequiredPersistentEntity, getRequiredPersistentEntity, getRequiredPersistentEntity
-
Constructor Details
-
JdbcMappingContext
public JdbcMappingContext()Creates a newJdbcMappingContext. -
JdbcMappingContext
Creates a newJdbcMappingContextusing the givenNamingStrategy.- Parameters:
namingStrategy- must not be null.
-
-
Method Details
-
forPlainIdentifiers
Create a newJdbcMappingContextusingplain identifiers. Plainidentifiers(i.e. table and column names) are typically not case-sensitive (case-sensitivity can be still enforced by specific database configurations).- Returns:
- a new
JdbcMappingContextusing plain identifiers. - Since:
- 4.0
-
forPlainIdentifiers
Create a newJdbcMappingContextusingplain identifiersand the givenNamingStrategy. Plainidentifiers(i.e. table and column names) are typically not case-sensitive (case-sensitivity can be still enforced by specific database configurations).- Parameters:
namingStrategy- must not be null.- Returns:
- a new
JdbcMappingContextusing plain identifiers. - Since:
- 4.0
-
forQuotedIdentifiers
Create a newJdbcMappingContextusingquoted identifiers(default behavior). Quotedidentifiers(i.e. table and column names) are typically case-sensitive.- Returns:
- a new
JdbcMappingContextusing quoted identifiers. - Since:
- 4.0
-
forQuotedIdentifiers
Create a newJdbcMappingContextusingquoted identifiers(default behavior) and the givenNamingStrategy. Quotedidentifiers(i.e. table and column names) are typically case-sensitive.- Parameters:
namingStrategy- must not be null.- Returns:
- a new
JdbcMappingContextusing quoted identifiers. - Since:
- 4.0
-
createPersistentProperty
protected RelationalPersistentProperty createPersistentProperty(Property property, RelationalPersistentEntity<?> owner, SimpleTypeHolder simpleTypeHolder) - Overrides:
createPersistentPropertyin classRelationalMappingContext
-
shouldCreatePersistentEntityFor
protected boolean shouldCreatePersistentEntityFor(org.springframework.data.core.TypeInformation<?> type) - Overrides:
shouldCreatePersistentEntityForin classAbstractMappingContext<RelationalPersistentEntity<?>, RelationalPersistentProperty>
-