1 28 package com.genimen.djeneric.repository; 29 30 import java.math.BigDecimal ; 31 32 import com.genimen.djeneric.repository.exceptions.CanNotDeleteException; 33 import com.genimen.djeneric.repository.exceptions.DjenericException; 34 import com.genimen.djeneric.repository.exceptions.ObjectNotDefinedException; 35 import com.genimen.djeneric.repository.exceptions.PropertyFormatException; 36 import com.genimen.djeneric.repository.exceptions.PropertyRequiredException; 37 38 44 public interface DjValueObject 45 { 46 51 public abstract void reload() throws DjenericException; 52 53 58 public abstract boolean isMarkedForDelete() throws DjenericException;; 59 60 66 public abstract long getObjectId() throws DjenericException; 67 68 73 public abstract DjAssociation[] getDetailAssociations() throws DjenericException; 74 75 82 public abstract DjAssociation getDetailAssociationByName(String assocName) throws ObjectNotDefinedException, 83 DjenericException; 84 85 91 public abstract void checkRequiredProperties() throws PropertyRequiredException, ObjectNotDefinedException, 92 DjenericException; 93 94 99 public abstract void validate() throws DjenericException; 100 101 public abstract void setNull(String propertyName) throws ObjectNotDefinedException, DjenericException; 103 104 111 public abstract boolean isNull(String propertyName) throws ObjectNotDefinedException, DjenericException; 112 113 121 public abstract Object get(String propertyName) throws ObjectNotDefinedException, DjenericException; 122 123 132 public abstract void set(String propertyName, Object value) throws ObjectNotDefinedException, 133 PropertyFormatException, DjenericException; 134 135 143 public abstract void setString(String propertyName, String value) throws ObjectNotDefinedException, 144 PropertyFormatException, DjenericException; 145 146 153 public abstract String getString(String propertyName) throws ObjectNotDefinedException, DjenericException; 154 155 163 public abstract void setBytes(String propertyName, byte[] value) throws ObjectNotDefinedException, 164 PropertyFormatException, DjenericException; 165 166 174 public abstract void setBigDecimal(String propertyName, BigDecimal value) throws ObjectNotDefinedException, 175 PropertyFormatException, DjenericException; 176 177 184 public abstract BigDecimal getBigDecimal(String propertyName) throws ObjectNotDefinedException, DjenericException; 185 186 193 public abstract byte[] getBytes(String propertyName) throws ObjectNotDefinedException, DjenericException; 194 195 203 public abstract void setInt(String propertyName, int value) throws ObjectNotDefinedException, 204 PropertyFormatException, DjenericException; 205 206 214 public abstract void setInt(String propertyName, Integer value) throws PropertyFormatException, 215 ObjectNotDefinedException, DjenericException; 216 217 224 public abstract int getInt(String propertyName) throws ObjectNotDefinedException, DjenericException; 225 226 234 public abstract void setLong(String propertyName, long value) throws ObjectNotDefinedException, 235 PropertyFormatException, DjenericException; 236 237 245 public abstract void setLong(String propertyName, Long value) throws PropertyFormatException, 246 ObjectNotDefinedException, DjenericException; 247 248 255 public abstract long getLong(String propertyName) throws ObjectNotDefinedException, DjenericException; 256 257 265 public abstract void setDate(String propertyName, java.util.Date dt) throws ObjectNotDefinedException, 266 PropertyFormatException, DjenericException; 267 268 275 public abstract java.util.Date getDate(String propertyName) throws ObjectNotDefinedException, DjenericException; 276 277 279 public abstract boolean exists(); 280 281 public abstract boolean isModified() throws DjenericException; 282 283 288 public abstract boolean isNew() throws DjenericException; 289 290 295 public abstract boolean isPersisted() throws DjenericException; 296 297 302 public abstract boolean isEmpty() throws DjenericException; 303 304 310 public abstract void markForDelete() throws DjenericException, CanNotDeleteException; 311 } | Popular Tags |