1 9 package org.jboss.portal.setup.impl.sl.dbloader.hibernate; 10 11 import org.jboss.portal.setup.sl.HibernateSchemaLoaderConfig; 12 import org.jboss.portal.setup.sl.SchemaLoadType; 13 import org.jboss.portal.setup.impl.sl.SchemaLoaderConfiBase; 14 import org.jboss.portal.setup.config.HibernateConfig; 15 import org.jboss.portal.setup.PortalSetupException; 16 17 import java.util.List ; 18 import java.util.ArrayList ; 19 import java.util.regex.Pattern ; 20 21 29 public class HibernateSchemaLoaderConfigImpl extends SchemaLoaderConfiBase implements HibernateSchemaLoaderConfig 30 { 31 private static final String hbm = "*.hbm.xml"; 32 33 private String m_schemaQueryStr = null; 34 boolean m_useSchemaExport = true; 35 private HibernateConfig m_hibernateConfig = null; 36 private String m_schemaLoaderClassName = null; 37 38 public HibernateSchemaLoaderConfigImpl() 39 { 40 super(new String []{hbm}); 41 } 42 43 47 public void setSchemaLoaderClass(String classname) 48 { 49 m_schemaLoaderClassName = classname; 50 } 51 52 56 public String getSchemaLoaderClass() 57 { 58 return m_schemaLoaderClassName; 59 } 60 61 62 67 public String getSchemaLoadRule() 68 { 69 SchemaLoadType type = getSchemaLoadType(); 70 return type == null ? null : type.toString(); 71 } 72 73 78 public void setSchemaLoadRule(String rule) throws PortalSetupException 79 { 80 setSchemaLoadType(rule); 81 } 82 83 84 88 public String getSchemaQueryString() 89 { 90 return m_schemaQueryStr; 91 } 92 93 97 public void setSchemaQueryString(String queryStr) 98 { 99 m_schemaQueryStr = queryStr; 100 } 101 102 103 107 public HibernateConfig getHibernateConfig() 108 { 109 return m_hibernateConfig; 110 } 111 112 116 public void setHibernateConfig(HibernateConfig hbConfig) 117 { 118 m_hibernateConfig = (HibernateConfig)hbConfig.getConfiguration(); 119 } 120 121 124 public boolean getUseHibernateSchemaExport() 125 { 126 return m_useSchemaExport; 127 } 128 129 } 130 | Popular Tags |