View Javadoc

1   /**
2    * Copyright 2010-2012 The Kuali Foundation
3    *
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.opensource.org/licenses/ecl2.php
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package org.kuali.common.jdbc.context;
17  
18  import java.util.Properties;
19  
20  import org.kuali.common.jdbc.DefaultJdbcService;
21  import org.kuali.common.jdbc.JdbcService;
22  import org.kuali.common.util.SimpleFormatter;
23  
24  public class DatabaseResetContext {
25  
26  	public static final String DEFAULT_SCHEMA_PROPERTY_PREFIX = "sql.schema.loc";
27  	public static final String DEFAULT_DATA_PROPERTY_PREFIX = "sql.data.loc";
28  	public static final String DEFAULT_CONSTRAINT_PROPERTY_PREFIX = "sql.constraints.loc";
29  	public static final String DEFAULT_LOCATION_LIST_PATTERN = ".loc.list";
30  
31  	JdbcService service = new DefaultJdbcService();
32  	SimpleFormatter formatter = new SimpleFormatter();
33  	String locationListPattern = DEFAULT_LOCATION_LIST_PATTERN;
34  	String schemaPropertyPrefix = DEFAULT_SCHEMA_PROPERTY_PREFIX;
35  	String dataPropertyPrefix = DEFAULT_DATA_PROPERTY_PREFIX;
36  	String constraintPropertyPrefix = DEFAULT_CONSTRAINT_PROPERTY_PREFIX;
37  
38  	String encoding;
39  	Properties properties;
40  	DatabaseProcessContext databaseProcessContext;
41  	JdbcContext normalJdbcContext;
42  	JdbcContext dbaJdbcContext;
43  	String dbaSql;
44  
45  	public String getEncoding() {
46  		return encoding;
47  	}
48  
49  	public void setEncoding(String encoding) {
50  		this.encoding = encoding;
51  	}
52  
53  	public SimpleFormatter getFormatter() {
54  		return formatter;
55  	}
56  
57  	public void setFormatter(SimpleFormatter formatter) {
58  		this.formatter = formatter;
59  	}
60  
61  	public Properties getProperties() {
62  		return properties;
63  	}
64  
65  	public void setProperties(Properties properties) {
66  		this.properties = properties;
67  	}
68  
69  	public DatabaseProcessContext getDatabaseProcessContext() {
70  		return databaseProcessContext;
71  	}
72  
73  	public void setDatabaseProcessContext(DatabaseProcessContext process) {
74  		this.databaseProcessContext = process;
75  	}
76  
77  	public JdbcService getService() {
78  		return service;
79  	}
80  
81  	public void setService(JdbcService service) {
82  		this.service = service;
83  	}
84  
85  	public JdbcContext getNormalJdbcContext() {
86  		return normalJdbcContext;
87  	}
88  
89  	public void setNormalJdbcContext(JdbcContext normal) {
90  		this.normalJdbcContext = normal;
91  	}
92  
93  	public JdbcContext getDbaJdbcContext() {
94  		return dbaJdbcContext;
95  	}
96  
97  	public void setDbaJdbcContext(JdbcContext dba) {
98  		this.dbaJdbcContext = dba;
99  	}
100 
101 	public String getSchemaPropertyPrefix() {
102 		return schemaPropertyPrefix;
103 	}
104 
105 	public void setSchemaPropertyPrefix(String schemaPropertyPrefix) {
106 		this.schemaPropertyPrefix = schemaPropertyPrefix;
107 	}
108 
109 	public String getDataPropertyPrefix() {
110 		return dataPropertyPrefix;
111 	}
112 
113 	public void setDataPropertyPrefix(String dataPropertyPrefix) {
114 		this.dataPropertyPrefix = dataPropertyPrefix;
115 	}
116 
117 	public String getConstraintPropertyPrefix() {
118 		return constraintPropertyPrefix;
119 	}
120 
121 	public void setConstraintPropertyPrefix(String constraintPropertyPrefix) {
122 		this.constraintPropertyPrefix = constraintPropertyPrefix;
123 	}
124 
125 	public String getLocationListPattern() {
126 		return locationListPattern;
127 	}
128 
129 	public void setLocationListPattern(String locationListSuffix) {
130 		this.locationListPattern = locationListSuffix;
131 	}
132 
133 	public String getDbaSql() {
134 		return dbaSql;
135 	}
136 
137 	public void setDbaSql(String dbaSql) {
138 		this.dbaSql = dbaSql;
139 	}
140 
141 }