1 21 22 package org.continuent.sequoia.controller.sql.schema; 23 24 import org.continuent.sequoia.common.xml.DatabasesXmlTags; 25 import org.continuent.sequoia.common.xml.XmlComponent; 26 27 34 public class DynamicDatabaseSchema implements XmlComponent 35 { 36 37 private boolean useStoredProcedures; 38 39 private boolean useViews; 40 41 private boolean gatherSystemTables; 42 43 private String schemaName; 44 45 54 public DynamicDatabaseSchema(boolean useStoredProcedures, boolean useViews, 55 boolean gatherSystemTables, String schemaName) 56 { 57 this.useStoredProcedures = useStoredProcedures; 58 this.useViews = useViews; 59 this.gatherSystemTables = gatherSystemTables; 60 this.schemaName = schemaName; 61 } 62 63 68 public final String getSchemaName() 69 { 70 return schemaName; 71 } 72 73 78 public final boolean gatherSystemTables() 79 { 80 return gatherSystemTables; 81 } 82 83 88 public boolean useColumns() 89 { 90 return false; 92 } 93 94 99 public final boolean useStoredProcedures() 100 { 101 return useStoredProcedures; 102 } 103 104 109 public final boolean useViews() 110 { 111 return useViews; 112 } 113 114 119 public String getXml() 120 { 121 StringBuffer info = new StringBuffer (); 122 info.append("<" + DatabasesXmlTags.ELT_DatabaseSchema + " " 123 + DatabasesXmlTags.ATT_useStoredProcedures + "=\"" 124 + useStoredProcedures + "\" " + DatabasesXmlTags.ATT_gatherSystemTables 125 + "=\"" + gatherSystemTables + "\" " + DatabasesXmlTags.ATT_schemaName 126 + "=\"" + schemaName + "\" " + " />"); 127 return info.toString(); 128 } 129 130 } 131 | Popular Tags |