1 64 65 package com.jcorporate.expresso.core.dataobjects; 66 67 import com.jcorporate.expresso.core.cache.Cacheable; 68 import com.jcorporate.expresso.core.db.DBException; 69 import org.apache.oro.text.regex.Pattern; 70 71 import java.util.ArrayList ; 72 import java.util.Map ; 73 74 88 public interface DataObject extends Cacheable, ContextNested { 89 90 91 94 static final String STATUS_NEW = "NEW"; 95 96 100 static final String STATUS_CURRENT = "CURRENT"; 101 102 106 static final String STATUS_UPDATED = "UPDATED"; 107 108 111 static final String STATUS_DELETED = "DELETED"; 112 113 114 123 DataField getDataField(String fieldName) throws DBException; 124 125 126 136 DataObjectMetaData getMetaData(); 137 138 146 DataFieldMetaData getFieldMetaData(String fieldName); 147 148 149 156 Object get(String fieldName) throws DataException; 157 158 164 void set(String fieldName, Object o) throws DataException; 165 166 175 void setFieldsWithDefaults() throws DataException; 176 177 184 boolean equals(Object otherObject); 185 186 189 void add() throws DBException; 190 191 192 195 void update() throws DBException; 196 197 200 void delete() throws DBException; 201 202 203 206 void clear() throws DBException; 207 208 209 217 String getMappedDataContext(); 218 219 220 227 void setAttribute(String attributeName, Object attributeValue); 228 229 236 Object getAttribute(String attributeName); 237 238 244 Map getAllAttributes(); 245 246 247 255 String getField(String fieldName) throws DBException; 256 257 264 DataExecutorInterface getExecutor(); 265 266 273 DataQueryInterface getQueryInterface(); 274 275 286 void checkField(String fieldName, String fieldValue) throws DBException; 287 288 289 294 String getStatus(); 295 296 297 302 void setStatus(String statusValue); 303 304 311 java.util.List getValidValuesList(String fieldName) throws DBException; 312 313 314 319 void setLocale(java.util.Locale newLocale); 320 321 326 java.util.Locale getLocale(); 327 328 329 339 void setMaxRecords(int newMax) throws DBException; 340 341 342 349 int getMaxRecords(); 350 351 352 367 void setOffsetRecord(int newOffset) throws DBException; 368 369 370 381 int getOffsetRecord(); 382 383 393 ArrayList searchAndRetrieveList(String sortOrder) throws DBException; 394 395 403 ArrayList searchAndRetrieveList() throws DBException; 404 405 406 413 boolean find() throws DBException; 414 415 421 int count() throws DBException; 422 423 428 void setGlobalMask(Pattern newGlobalMask); 429 430 435 Pattern getGlobalMask(); 436 437 442 boolean isGlobalMasked(); 443 } 444 | Popular Tags |