1 17 package org.apache.ws.jaxme.sqls.db2; 18 19 import java.util.Iterator ; 20 21 import org.apache.ws.jaxme.sqls.SQLFactory; 22 23 24 44 public interface TableSpace { 45 public interface Name extends SQLFactory.Ident { 46 } 47 48 50 public interface Container { 51 56 public boolean isSystemManaged(); 57 61 public boolean isDatabaseManaged(); 62 } 63 64 68 public interface SystemManagedContainer extends Container { 69 71 public String getFile(); 72 } 73 74 80 public interface DatabaseManagedContainer extends Container { 81 86 public String getFile(); 87 92 public String getDevice(); 93 95 public long getNumOfPages(); 96 } 97 98 103 public class Type { 104 106 public static final Type REGULAR = new Type("REGULAR"); 107 110 public static final Type LONG = new Type("LONG"); 111 119 public static final Type SYSTEM_TEMPORARY = new Type("SYSTEM TEMPORARY"); 120 126 public static final Type USER_TEMPORARY = new Type("USER TEMPORARY"); 127 private static final Type[] instances = 128 new Type[]{REGULAR, LONG, SYSTEM_TEMPORARY, USER_TEMPORARY}; 129 private String name; 130 private Type(String pName) { 131 name = pName; 132 } 133 public String toString() { return name; } 134 public String getName() { return name; } 135 public boolean equals(Object pOther) { 136 return pOther != null && pOther instanceof Type && 137 name.equals(((Type) pOther).name); 138 } 139 public int hashCode() { return name.hashCode(); } 140 public static Type[] getInstances() { return instances; } 141 public static Type valueOf(String pName) { 142 for (int i = 0; i < instances.length; i++) { 143 if (instances[i].name.equalsIgnoreCase(pName)) { 144 return instances[i]; 145 } 146 } 147 throw new IllegalArgumentException ("Invalid type name: " + pName); 148 } 149 } 150 151 154 public DB2SQLFactory getSQLFactory(); 155 156 159 public TableSpace.Name getName(); 160 161 163 public TableSpace.Type getType(); 164 165 170 public PageSize getPageSize(); 171 172 175 public void setPageSize(PageSize pSize); 176 177 184 public Long getExtentSize(); 185 186 193 public void setExtentSize(Long pSize); 194 195 202 public Long getPrefetchSize(); 203 204 211 public void setPrefetchSize(Long pSize); 212 213 220 public Number getOverhead(); 221 222 229 public void setOverhead(Number pOverhead); 230 231 238 public Number getTransferRate(); 239 240 247 public void setTransferRate(Number pNumber); 248 249 256 public Boolean hasDroppedTableRecovery(); 257 258 265 public void setDroppedTableRecovery(Boolean pRecoverable); 266 267 269 public Container newSystemManagedContainer(String pFile); 270 271 274 public Container newDatabaseManagedContainerInFile(String pFile, long pNumPages); 275 276 279 public Container newDatabaseManagedContainerInDevice(String pDevice, long pNumPages); 280 281 288 public Iterator getContainers(); 289 290 292 public void setBufferPool(BufferPool pBufferPool); 293 294 296 public BufferPool getBufferPool(); 297 298 300 public boolean isPredefined(); 301 } 302 | Popular Tags |