1 30 package com.genimen.djeneric.repository; 31 32 import com.genimen.djeneric.repository.exceptions.DjenericException; 33 34 47 public abstract class DjCursor 48 { 49 private DjSession _session; 50 private DjList _newObjects; 51 private String _idColumnName; 52 private boolean _forceReloadFromDB; 53 private DjExtent _extent; 54 55 61 public abstract DjObject getNext() throws DjenericException; 62 63 68 public abstract void close() throws DjenericException; 69 70 79 protected DjCursor(DjSession session, DjExtent extent, DjList sessionObjects, boolean forceReloadFromDB) 80 throws DjenericException 81 { 82 _session = session; 83 _forceReloadFromDB = forceReloadFromDB; 84 _extent = extent; 85 _newObjects = new DjList(); 86 _newObjects.setStoredTypeName(extent); 87 _newObjects.addAll(sessionObjects); 88 _idColumnName = extent.getIdProperty().getName(); 89 } 90 91 96 public DjExtent getExtent() 97 { 98 return _extent; 99 } 100 101 106 protected DjSession getSession() 107 { 108 return _session; 109 } 110 111 117 protected DjList getSessionObjects() 118 { 119 return _newObjects; 120 } 121 122 127 protected String getIdColumnName() 128 { 129 return _idColumnName; 130 } 131 132 138 protected boolean isForceReloadFromDB() 139 { 140 return _forceReloadFromDB; 141 } 142 143 } | Popular Tags |