001 /**
002 * Copyright 2010-2013 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016 package org.kuali.common.jdbc.context;
017
018 import java.util.List;
019
020 import javax.sql.DataSource;
021
022 import org.kuali.common.jdbc.CommitMode;
023 import org.kuali.common.jdbc.listener.NoOpSqlListener;
024 import org.kuali.common.jdbc.listener.SqlListener;
025 import org.kuali.common.jdbc.supplier.SqlSupplier;
026
027 /**
028 * @deprecated
029 */
030 @Deprecated
031 public class JdbcContext {
032
033 // If true, no SQL is executed.
034 // Everything leading up to SQL execution still takes place
035 // Connecting to the database, parsing SQL, etc.
036 boolean skip;
037
038 // Use this to enable multi-threaded SQL execution
039 // When used, SQL supplied to this context does not execute sequentially
040 int threads = 1;
041 boolean multithreaded;
042 SqlListener listener = new NoOpSqlListener();
043 CommitMode commitMode = CommitMode.PER_SUPPLIER;
044 DataSource dataSource;
045 List<SqlSupplier> suppliers;
046 String message;
047 boolean skipMetaData;
048 boolean trackProgressByUpdateCount;
049
050 public boolean isSkip() {
051 return skip;
052 }
053
054 public void setSkip(boolean skip) {
055 this.skip = skip;
056 }
057
058 public int getThreads() {
059 return threads;
060 }
061
062 public void setThreads(int threads) {
063 this.threads = threads;
064 }
065
066 public SqlListener getListener() {
067 return listener;
068 }
069
070 public void setListener(SqlListener listener) {
071 this.listener = listener;
072 }
073
074 public CommitMode getCommitMode() {
075 return commitMode;
076 }
077
078 public void setCommitMode(CommitMode commitMode) {
079 this.commitMode = commitMode;
080 }
081
082 public DataSource getDataSource() {
083 return dataSource;
084 }
085
086 public void setDataSource(DataSource dataSource) {
087 this.dataSource = dataSource;
088 }
089
090 public List<SqlSupplier> getSuppliers() {
091 return suppliers;
092 }
093
094 public void setSuppliers(List<SqlSupplier> suppliers) {
095 this.suppliers = suppliers;
096 }
097
098 public String getMessage() {
099 return message;
100 }
101
102 public void setMessage(String message) {
103 this.message = message;
104 }
105
106 public boolean isMultithreaded() {
107 return multithreaded;
108 }
109
110 public void setMultithreaded(boolean multithreaded) {
111 this.multithreaded = multithreaded;
112 }
113
114 public boolean isSkipMetaData() {
115 return skipMetaData;
116 }
117
118 public void setSkipMetaData(boolean skipMetaData) {
119 this.skipMetaData = skipMetaData;
120 }
121
122 public boolean isTrackProgressByUpdateCount() {
123 return trackProgressByUpdateCount;
124 }
125
126 public void setTrackProgressByUpdateCount(boolean trackProgressByUpdateCount) {
127 this.trackProgressByUpdateCount = trackProgressByUpdateCount;
128 }
129
130 }