1 19 20 package org.netbeans.modules.j2ee.persistence.provider; 21 22 import java.util.Collections ; 23 import java.util.Map ; 24 import org.openide.util.NbBundle; 25 26 31 class HibernateProvider extends Provider{ 32 33 protected HibernateProvider(){ 34 super("org.hibernate.ejb.HibernatePersistence"); 35 } 36 37 public String getDisplayName() { 38 return NbBundle.getMessage(HibernateProvider.class, "LBL_Hibernate"); } 40 41 public String getJdbcUrl() { 42 return "hibernate.connection.url"; 43 } 44 45 public String getJdbcDriver() { 46 return "hibernate.connection.driver_class"; 47 } 48 49 public String getJdbcUsername() { 50 return "hibernate.connection.username"; 51 } 52 53 public String getJdbcPassword() { 54 return "hibernate.connection.password"; 55 } 56 57 public String getTableGenerationPropertyName() { 58 return "hibernate.hbm2ddl.auto"; 59 } 60 61 public String getTableGenerationDropCreateValue() { 62 return "create-drop"; 63 } 64 65 public String getTableGenerationCreateValue() { 66 return "update"; 67 } 68 69 public Map getUnresolvedVendorSpecificProperties() { 70 return Collections.EMPTY_MAP; 71 } 72 73 public Map getDefaultVendorSpecificProperties() { 74 return Collections.singletonMap( 75 "hibernate.cache.provider_class", 76 "org.hibernate.cache.NoCacheProvider"); 77 } 78 } 79 | Popular Tags |