1 23 24 29 30 package com.sun.jdo.api.persistence.model.mapping; 31 32 import java.util.List ; 33 import java.util.ArrayList ; 34 35 import org.netbeans.modules.dbschema.TableElement; 36 import org.netbeans.modules.dbschema.SchemaElement; 37 38 import com.sun.jdo.api.persistence.model.ModelException; 39 40 45 public interface MappingClassElement extends MappingElement 46 { 47 48 public static final String MAPPING_EXTENSION = "mapping"; 50 53 public static final int NONE_CONSISTENCY = 0x0; 54 55 60 public static final int CHECK_MODIFIED_AT_COMMIT_CONSISTENCY = 0x1; 61 62 68 public static final int CHECK_ALL_AT_COMMIT_CONSISTENCY = 0x2; 69 70 76 public static final int LOCK_WHEN_MODIFIED_CONSISTENCY = 0x4; 77 78 85 public static final int LOCK_WHEN_MODIFIED_CHECK_ALL_AT_COMMIT_CONSISTENCY = 86 CHECK_ALL_AT_COMMIT_CONSISTENCY | LOCK_WHEN_MODIFIED_CONSISTENCY; 87 88 92 public static final int LOCK_WHEN_LOADED_CONSISTENCY = 0x8; 93 94 98 public static final int VERSION_CONSISTENCY = 0x10; 99 100 106 111 public int getVersionNumber (); 112 113 118 public boolean hasOldVersionNumber (); 119 120 125 public void postUnarchive () throws ModelException; 126 127 132 public void preArchive () throws ModelException; 133 134 138 public boolean isModified (); 139 140 146 public void setModified (boolean flag); 147 148 157 public int getConsistencyLevel (); 158 159 169 public void setConsistencyLevel (int level) throws ModelException; 170 171 173 177 public String getDatabaseRoot (); 178 179 185 public void setDatabaseRoot (SchemaElement root) throws ModelException; 186 187 189 193 public ArrayList getTables (); 194 195 200 public MappingTableElement getTable (String name); 201 202 209 public void addTable (TableElement table) throws ModelException; 210 211 215 public void setPrimaryTable (TableElement table) throws ModelException; 216 217 225 public MappingReferenceKeyElement addSecondaryTable (MappingTableElement 226 parentTable, TableElement table) throws ModelException; 227 228 234 public void removeTable (MappingTableElement table) throws ModelException; 235 236 238 242 public ArrayList getFields (); 243 244 249 public MappingFieldElement getField (String name); 250 251 255 public void addField (MappingFieldElement field) throws ModelException; 256 257 261 public void removeField (MappingFieldElement field) throws ModelException; 262 263 268 public List getVersionFields (); 269 270 275 public boolean isNavigable (); 276 277 283 public void setNavigable (boolean flag) throws ModelException; 284 } 285 | Popular Tags |