Fields Summary |
---|
protected transient ObjectLevelModifyQuery | queryStore the query that raised the optimistic violation. |
public static final int | NO_VERSION_NUMBER_WHEN_DELETING |
public static final int | OBJECT_CHANGED_SINCE_LAST_READ_WHEN_DELETING |
public static final int | NO_VERSION_NUMBER_WHEN_UPDATING |
public static final int | OBJECT_CHANGED_SINCE_LAST_READ_WHEN_UPDATING |
public static final int | MUST_HAVE_MAPPING_WHEN_IN_OBJECT |
public static final int | NEED_TO_MAP_JAVA_SQL_TIMESTAMP |
public static final int | UNWRAPPING_OBJECT_DELETED_SINCE_LAST_READ |
public static final int | OBJECT_CHANGED_SINCE_LAST_MERGE |
Methods Summary |
---|
public java.lang.Object | getObject()PUBLIC:
Return the object for which the problem was detected.
return getQuery().getObject();
|
public oracle.toplink.essentials.queryframework.ObjectLevelModifyQuery | getQuery()PUBLIC:
Return the query in which the problem was detected.
return query;
|
public static oracle.toplink.essentials.exceptions.OptimisticLockException | mustHaveMappingWhenStoredInObject(java.lang.Class aClass)
Object[] args = { aClass };
OptimisticLockException optimisticLockException = new OptimisticLockException(ExceptionMessageGenerator.buildMessage(OptimisticLockException.class, MUST_HAVE_MAPPING_WHEN_IN_OBJECT, args));
optimisticLockException.setErrorCode(MUST_HAVE_MAPPING_WHEN_IN_OBJECT);
return optimisticLockException;
|
public static oracle.toplink.essentials.exceptions.OptimisticLockException | needToMapJavaSqlTimestampWhenStoredInObject()
Object[] args = { };
OptimisticLockException optimisticLockException = new OptimisticLockException(ExceptionMessageGenerator.buildMessage(OptimisticLockException.class, NEED_TO_MAP_JAVA_SQL_TIMESTAMP, args));
optimisticLockException.setErrorCode(NEED_TO_MAP_JAVA_SQL_TIMESTAMP);
return optimisticLockException;
|
public static oracle.toplink.essentials.exceptions.OptimisticLockException | noVersionNumberWhenDeleting(java.lang.Object object, oracle.toplink.essentials.queryframework.ObjectLevelModifyQuery query)
Vector key = new Vector();
if (query.getSession() != null) {
key = query.getSession().keyFromObject(object);
}
Object[] args = { object, object.getClass().getName(), key, CR };
OptimisticLockException optimisticLockException = new OptimisticLockException(ExceptionMessageGenerator.buildMessage(OptimisticLockException.class, NO_VERSION_NUMBER_WHEN_DELETING, args), query);
optimisticLockException.setErrorCode(NO_VERSION_NUMBER_WHEN_DELETING);
return optimisticLockException;
|
public static oracle.toplink.essentials.exceptions.OptimisticLockException | noVersionNumberWhenUpdating(java.lang.Object object, oracle.toplink.essentials.queryframework.ObjectLevelModifyQuery query)
Vector key = new Vector();
if (query.getSession() != null) {
key = query.getSession().keyFromObject(object);
}
Object[] args = { object, object.getClass().getName(), key, CR };
OptimisticLockException optimisticLockException = new OptimisticLockException(ExceptionMessageGenerator.buildMessage(OptimisticLockException.class, NO_VERSION_NUMBER_WHEN_UPDATING, args), query);
optimisticLockException.setErrorCode(NO_VERSION_NUMBER_WHEN_UPDATING);
return optimisticLockException;
|
public static oracle.toplink.essentials.exceptions.OptimisticLockException | objectChangedSinceLastMerge(java.lang.Object object)
Object[] args = { object, object.getClass().getName(), CR };
OptimisticLockException optimisticLockException = new OptimisticLockException(ExceptionMessageGenerator.buildMessage(OptimisticLockException.class, OBJECT_CHANGED_SINCE_LAST_MERGE, args));
optimisticLockException.setErrorCode(OBJECT_CHANGED_SINCE_LAST_MERGE);
return optimisticLockException;
|
public static oracle.toplink.essentials.exceptions.OptimisticLockException | objectChangedSinceLastReadWhenDeleting(java.lang.Object object, oracle.toplink.essentials.queryframework.ObjectLevelModifyQuery query)
Vector key = new Vector();
if (query.getSession() != null) {
key = query.getSession().keyFromObject(object);
}
Object[] args = { object, object.getClass().getName(), key, CR };
OptimisticLockException optimisticLockException = new OptimisticLockException(ExceptionMessageGenerator.buildMessage(OptimisticLockException.class, OBJECT_CHANGED_SINCE_LAST_READ_WHEN_DELETING, args), query);
optimisticLockException.setErrorCode(OBJECT_CHANGED_SINCE_LAST_READ_WHEN_DELETING);
return optimisticLockException;
|
public static oracle.toplink.essentials.exceptions.OptimisticLockException | objectChangedSinceLastReadWhenUpdating(java.lang.Object object, oracle.toplink.essentials.queryframework.ObjectLevelModifyQuery query)
Vector key = new Vector();
if (query.getSession() != null) {
key = query.getSession().keyFromObject(object);
}
Object[] args = { object, object.getClass().getName(), key, CR };
OptimisticLockException optimisticLockException = new OptimisticLockException(ExceptionMessageGenerator.buildMessage(OptimisticLockException.class, OBJECT_CHANGED_SINCE_LAST_READ_WHEN_UPDATING, args), query);
optimisticLockException.setErrorCode(OBJECT_CHANGED_SINCE_LAST_READ_WHEN_UPDATING);
return optimisticLockException;
|
public void | setQuery(oracle.toplink.essentials.queryframework.ObjectLevelModifyQuery query)INTERNAL:
Set the query in which the problem was detected.
this.query = query;
|
public static oracle.toplink.essentials.exceptions.OptimisticLockException | unwrappingObjectDeletedSinceLastRead(java.util.Vector pkVector, java.lang.String className)
Object[] args = { pkVector, className };
OptimisticLockException optimisticLockException = new OptimisticLockException(ExceptionMessageGenerator.buildMessage(OptimisticLockException.class, UNWRAPPING_OBJECT_DELETED_SINCE_LAST_READ, args));
optimisticLockException.setErrorCode(UNWRAPPING_OBJECT_DELETED_SINCE_LAST_READ);
return optimisticLockException;
|