001 package org.nanocontainer.persistence;
002
003 /**
004 * A specialization of {@link org.nanocontainer.persistence.ConcurrencyFailureException ConcurrencyFailureException}
005 * which is thrown when a version number or timestamp check failed or try delete or update a row that does not exist
006 * anymore.
007 *
008 * @version $Revision: $
009 */
010 public class StaleObjectStateException extends ConcurrencyFailureException {
011
012 private String entityName;
013 private Object objectId;
014
015 public StaleObjectStateException(Throwable cause, String entityName, Object objectId) {
016 super(cause);
017 this.entityName = entityName;
018 this.objectId = objectId;
019 }
020
021 public String getEntityName() {
022 return entityName;
023 }
024
025 public Object getObjectId() {
026 return objectId;
027 }
028
029 }