1 16 17 package org.springframework.orm.jpa.vendor; 18 19 import javax.persistence.EntityManagerFactory; 20 21 import org.springframework.orm.jpa.JpaVendorAdapter; 22 23 31 public abstract class AbstractJpaVendorAdapter implements JpaVendorAdapter { 32 33 private Database database = Database.DEFAULT; 34 35 private String databasePlatform; 36 37 private boolean generateDdl; 38 39 private boolean showSql; 40 41 42 47 public void setDatabase(Database database) { 48 this.database = database; 49 } 50 51 54 protected Database getDatabase() { 55 return database; 56 } 57 58 62 public void setDatabasePlatform(String databasePlatform) { 63 this.databasePlatform = databasePlatform; 64 } 65 66 69 protected String getDatabasePlatform() { 70 return databasePlatform; 71 } 72 73 81 public void setGenerateDdl(boolean generateDdl) { 82 this.generateDdl = generateDdl; 83 } 84 85 89 protected boolean isGenerateDdl() { 90 return generateDdl; 91 } 92 93 99 public void setShowSql(boolean showSql) { 100 this.showSql = showSql; 101 } 102 103 106 protected boolean isShowSql() { 107 return showSql; 108 } 109 110 111 115 public void postProcessEntityManagerFactory(EntityManagerFactory emf) { 116 } 117 118 } 119 | Popular Tags |