2.17.2: 2011-06-17

net.sf.basedb.core
Class ItemModifiedException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by net.sf.basedb.core.BaseException
                  extended by net.sf.basedb.core.PermissionDeniedException
                      extended by net.sf.basedb.core.ItemModifiedException
All Implemented Interfaces:
Serializable

public class ItemModifiedException
extends PermissionDeniedException

This exception is thrown when trying to save an item to the database that has been updated (or deleted) by another process in the meantime.

Version:
2.0
Author:
Nicklas
See Also:
Serialized Form
Last modified
$Date: 2009-04-06 14:52:39 +0200 (Mon, 06 Apr 2009) $

Field Summary
private static Pattern FIND_WHAT
          A pattern to extract the Xxxx and id parts from a string containing [net.sf.basedb.core.data.XxxxData#id].
private static long serialVersionUID
           
 
Constructor Summary
ItemModifiedException(org.hibernate.StaleStateException ex)
          Create a new ItemModifiedException trying to find the item information from the Hibernate exception.
ItemModifiedException(String what)
          Creates a new ItemModifiedException.
 
Method Summary
private static String findWhat(org.hibernate.StaleStateException ex)
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

FIND_WHAT

private static final Pattern FIND_WHAT
A pattern to extract the Xxxx and id parts from a string containing [net.sf.basedb.core.data.XxxxData#id].

Constructor Detail

ItemModifiedException

public ItemModifiedException(String what)
Creates a new ItemModifiedException. The error message produced will look like: The item User[id=325] was modified by another transaction.

Parameters:
what - A description of what was modified, for example User[Id=325]

ItemModifiedException

public ItemModifiedException(org.hibernate.StaleStateException ex)
Create a new ItemModifiedException trying to find the item information from the Hibernate exception. Normally the item is specified in the message like: [net.sf.basedb.core.data.XxxxData#id].

Parameters:
ex - Exception generated by Hibernate.
Method Detail

findWhat

private static String findWhat(org.hibernate.StaleStateException ex)

2.17.2: 2011-06-17