1 21 22 package org.continuent.sequoia.controller.semantic; 23 24 import java.util.SortedSet ; 25 26 32 public class SemanticBehavior 33 { 34 private SortedSet readSet; 35 private SortedSet writeSet; 36 private SortedSet proceduresReferenced; 37 private boolean altersDatabaseSchema; 38 private boolean altersMetadataCache; 39 private boolean altersQueryResultCache; 40 private boolean altersUsers; 41 private boolean isReadOnly; 42 private boolean needsMacroProcessing; 43 private int ordering; 44 private int requiresConnectionPoolFlush; 45 46 47 public static final int SERIALIZABLE_ORDER = 1; 48 49 public static final int OUT_OF_ORDER = 2; 50 51 52 public static final int FLUSH_CURRENT_USER = 1; 53 54 public static final int FLUSH_ALL_USERS = 2; 55 56 public static final int FLUSH_NONE = 3; 57 58 79 public SemanticBehavior(SortedSet readSet, SortedSet writeSet, 80 SortedSet proceduresReferenced, boolean altersDatabaseSchema, 81 boolean altersMetadataCache, boolean altersQueryResultCache, 82 boolean altersUsers, boolean isReadOnly, boolean needsMacroProcessing, 83 int ordering, int requiresConnectionPoolFlush) 84 { 85 this.readSet = readSet; 86 this.writeSet = writeSet; 87 this.proceduresReferenced = proceduresReferenced; 88 this.altersDatabaseSchema = altersDatabaseSchema; 89 this.altersMetadataCache = altersMetadataCache; 90 this.altersQueryResultCache = altersQueryResultCache; 91 this.altersUsers = altersUsers; 92 this.isReadOnly = isReadOnly; 93 this.needsMacroProcessing = needsMacroProcessing; 94 this.ordering = ordering; 95 this.requiresConnectionPoolFlush = requiresConnectionPoolFlush; 96 } 97 98 103 public boolean altersDatabaseSchema() 104 { 105 return altersDatabaseSchema; 106 } 107 108 113 public boolean altersMetadataCache() 114 { 115 return altersMetadataCache; 116 } 117 118 123 public boolean altersQueryResultCache() 124 { 125 return altersQueryResultCache; 126 } 127 128 133 public boolean altersUsers() 134 { 135 return altersUsers; 136 } 137 138 143 public boolean canExecuteOutOfOrder() 144 { 145 return ordering == OUT_OF_ORDER; 146 } 147 148 153 public int getOrdering() 154 { 155 return ordering; 156 } 157 158 163 public SortedSet getProceduresReferenced() 164 { 165 return proceduresReferenced; 166 } 167 168 173 public SortedSet getReadSet() 174 { 175 return readSet; 176 } 177 178 183 public int getRequiresConnectionPoolFlush() 184 { 185 return requiresConnectionPoolFlush; 186 } 187 188 193 public SortedSet getWriteSet() 194 { 195 return writeSet; 196 } 197 198 203 public boolean isReadOnly() 204 { 205 return isReadOnly; 206 } 207 208 213 public boolean needsMacroProcessing() 214 { 215 return needsMacroProcessing; 216 } 217 218 } 219 | Popular Tags |