Class JdbcMappingContext

java.lang.Object
org.springframework.data.mapping.context.AbstractMappingContext<org.springframework.data.relational.core.mapping.RelationalPersistentEntity<?>, org.springframework.data.relational.core.mapping.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<org.springframework.data.relational.core.mapping.RelationalPersistentEntity<?>, org.springframework.data.relational.core.mapping.RelationalPersistentProperty>

public class JdbcMappingContext extends org.springframework.data.relational.core.mapping.RelationalMappingContext
MappingContext implementation for JDBC.
Author:
Jens Schauder, Greg Turnquist, Kazuki Shimizu, Oliver Gierke, Mark Paluch, Paul-Christian Volkmer
  • Constructor Details

    • JdbcMappingContext

      public JdbcMappingContext()
      Creates a new JdbcMappingContext.
    • JdbcMappingContext

      public JdbcMappingContext(org.springframework.data.relational.core.mapping.NamingStrategy namingStrategy)
      Creates a new JdbcMappingContext using the given NamingStrategy.
      Parameters:
      namingStrategy - must not be null.
  • Method Details

    • forPlainIdentifiers

      public static JdbcMappingContext forPlainIdentifiers()
      Create a new JdbcMappingContext using plain identifiers. Plain identifiers (i.e. table and column names) are typically not case-sensitive (case-sensitivity can be still enforced by specific database configurations).
      Returns:
      a new JdbcMappingContext using plain identifiers.
      Since:
      4.0
    • forPlainIdentifiers

      public static JdbcMappingContext forPlainIdentifiers(org.springframework.data.relational.core.mapping.NamingStrategy namingStrategy)
      Create a new JdbcMappingContext using plain identifiers and the given NamingStrategy. Plain identifiers (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 JdbcMappingContext using plain identifiers.
      Since:
      4.0
    • forQuotedIdentifiers

      public static JdbcMappingContext forQuotedIdentifiers()
      Create a new JdbcMappingContext using quoted identifiers (default behavior). Quoted identifiers (i.e. table and column names) are typically case-sensitive.
      Returns:
      a new JdbcMappingContext using quoted identifiers.
      Since:
      4.0
    • forQuotedIdentifiers

      public static JdbcMappingContext forQuotedIdentifiers(org.springframework.data.relational.core.mapping.NamingStrategy namingStrategy)
      Create a new JdbcMappingContext using quoted identifiers (default behavior) and the given NamingStrategy. Quoted identifiers (i.e. table and column names) are typically case-sensitive.
      Parameters:
      namingStrategy - must not be null.
      Returns:
      a new JdbcMappingContext using quoted identifiers.
      Since:
      4.0
    • createPersistentProperty

      protected org.springframework.data.relational.core.mapping.RelationalPersistentProperty createPersistentProperty(Property property, org.springframework.data.relational.core.mapping.RelationalPersistentEntity<?> owner, SimpleTypeHolder simpleTypeHolder)
      Overrides:
      createPersistentProperty in class org.springframework.data.relational.core.mapping.RelationalMappingContext
    • shouldCreatePersistentEntityFor

      protected boolean shouldCreatePersistentEntityFor(TypeInformation<?> type)
      Overrides:
      shouldCreatePersistentEntityFor in class AbstractMappingContext<org.springframework.data.relational.core.mapping.RelationalPersistentEntity<?>, org.springframework.data.relational.core.mapping.RelationalPersistentProperty>