/** * Returns true of this Transaction can be committed on this object * * @param t is the transaction to commit, should be the same as the * one passed during the join(Transaction t) call. * @return true if the trsaction commiting would be successful */publicsynchronizedboolean canCommit(Transaction t) throws TransactionFailure {
if (!isDeleted) { // HK2-127: validate only if not marked for deletion Set constraintViolations =
beanValidator.validate(this.getProxy(this.getProxyType()));
try {
handleValidationException(constraintViolations);
} catch (ConstraintViolationException constraintViolationException) {
thrownew TransactionFailure(constraintViolationException.getMessage(), constraintViolationException);
}
}
return currentTx==t;
}

/** * Returns true of this Transaction can be committed on this object * * @param t is the transaction to commit, should be the same as the * one passed during the join(Transaction t) call. * @return true if the trsaction commiting would be successful */publicsynchronizedboolean canCommit(Transaction t) throws TransactionFailure {
Set constraintViolations =
beanValidator.validate(this.getProxy(this.getProxyType()));
try {
handleValidationException(constraintViolations);
} catch (ConstraintViolationException constraintViolationException) {
thrownew TransactionFailure(constraintViolationException.getMessage(), constraintViolationException);
}
return currentTx==t;
}

/** * Returns true of this Transaction can be committed on this object * * @param t is the transaction to commit, should be the same as the * one passed during the join(Transaction t) call. * @return true if the trsaction commiting would be successful */publicsynchronizedboolean canCommit(Transaction t) throws TransactionFailure {
if (!isDeleted) { // HK2-127: validate only if not marked for deletion Set constraintViolations =
beanValidator.validate(this.getProxy(this.getProxyType()));
try {
handleValidationException(constraintViolations);
} catch (ConstraintViolationException constraintViolationException) {
thrownew TransactionFailure(constraintViolationException.getMessage(), constraintViolationException);
}
}
return currentTx==t;
}

/** * Returns true of this Transaction can be committed on this object * * @param t is the transaction to commit, should be the same as the * one passed during the join(Transaction t) call. * @return true if the trsaction commiting would be successful */publicsynchronizedboolean canCommit(Transaction t) throws TransactionFailure {
Set constraintViolations =
beanValidator.validate(this.getProxy(this.getProxyType()));
try {
handleValidationException(constraintViolations);
} catch (ConstraintViolationException constraintViolationException) {
thrownew TransactionFailure(constraintViolationException.getMessage(), constraintViolationException);
}
return currentTx==t;
}

/** * Returns true of this Transaction can be committed on this object * * @param t is the transaction to commit, should be the same as the * one passed during the join(Transaction t) call. * @return true if the trsaction commiting would be successful */publicsynchronizedboolean canCommit(Transaction t) throws TransactionFailure {
if (!isDeleted) { // HK2-127: validate only if not marked for deletion Set constraintViolations =
beanValidator.validate(this.getProxy(this.getProxyType()));
try {
handleValidationException(constraintViolations);
} catch (ConstraintViolationException constraintViolationException) {
thrownew TransactionFailure(constraintViolationException.getMessage(), constraintViolationException);
}
}
return currentTx==t;
}