1 /*****************************************************************************
5 * Creation date 02.10.2012
6 * @author Author: Maria KRUCHININA
8 *****************************************************************************/
9 package org.splat.exception;
11 import org.splat.common.properties.MessageKeyEnum;
15 * Exception thrown when a lock already exists for another one.
16 * @author Maria KRUCHININA
19 public class LockAlreadyExistsException extends BusinessException {
22 * loginName of a user who has already locked an object.
24 private String _loginName;
26 * Version id for serialization.
28 private static final long serialVersionUID = -4596111071538834057L;
31 * Create a LockAlreadyExistsException.
33 * @param tableUid the table name uid
34 * @param rowUid the row uid
35 * @param pLogin The plogin of the user identified by the user ID
37 public LockAlreadyExistsException(final String tableUid, final String rowUid, final String pLogin) {
38 super(MessageKeyEnum.LCK_000001.toString(), tableUid, rowUid, pLogin);
43 * Create a LockAlreadyExistsException.
45 * @param throwable the cause
46 * @param tableUid the table name uid
47 * @param rowUid the row uid
48 * @param pLogin The plogin of the user identified by the user ID
50 public LockAlreadyExistsException(final Throwable throwable, final String tableUid, final String rowUid, final String pLogin) {
51 super(MessageKeyEnum.LCK_000001.toString(),throwable, tableUid, rowUid, pLogin);
56 * Create a LockAlreadyExistsException.
59 * the original LockAlreadyExistsException
65 public LockAlreadyExistsException(
66 final LockAlreadyExistsException throwable, final String msgKey,
67 final String objName) {
68 super(msgKey, throwable, objName, throwable.getLoginName());
69 _loginName = throwable.getLoginName();
74 * Get the loginName of a user who has already locked an object.
75 * @return the loginName
77 public final String getLoginName() {
82 * Set the loginName of a user who has already locked an object.
83 * @param loginName the loginName to set
85 public final void setLoginName(final String loginName) {
86 _loginName = loginName;