Java源码示例:org.springframework.transaction.SavepointManager
示例1
public void setTransactionData(@Nullable Object transactionData) {
this.transactionData = transactionData;
getEntityManagerHolder().setTransactionActive(true);
if (transactionData instanceof SavepointManager) {
getEntityManagerHolder().setSavepointManager((SavepointManager) transactionData);
}
}
示例2
private SavepointManager getSavepointManager() {
if (!isSavepointAllowed()) {
throw new NestedTransactionNotSupportedException(
"Transaction manager does not allow nested transactions");
}
SavepointManager savepointManager = getEntityManagerHolder().getSavepointManager();
if (savepointManager == null) {
throw new NestedTransactionNotSupportedException(
"JpaDialect does not support savepoints - check your JPA provider's capabilities");
}
return savepointManager;
}
示例3
/**
* This implementation exposes the {@link SavepointManager} interface
* of the underlying transaction object, if any.
* @throws NestedTransactionNotSupportedException if savepoints are not supported
* @see #isTransactionSavepointManager()
*/
@Override
protected SavepointManager getSavepointManager() {
Object transaction = this.transaction;
if (!(transaction instanceof SavepointManager)) {
throw new NestedTransactionNotSupportedException(
"Transaction object [" + this.transaction + "] does not support savepoints");
}
return (SavepointManager) transaction;
}
示例4
public void setTransactionData(@Nullable Object transactionData) {
this.transactionData = transactionData;
getEntityManagerHolder().setTransactionActive(true);
if (transactionData instanceof SavepointManager) {
getEntityManagerHolder().setSavepointManager((SavepointManager) transactionData);
}
}
示例5
private SavepointManager getSavepointManager() {
if (!isSavepointAllowed()) {
throw new NestedTransactionNotSupportedException(
"Transaction manager does not allow nested transactions");
}
SavepointManager savepointManager = getEntityManagerHolder().getSavepointManager();
if (savepointManager == null) {
throw new NestedTransactionNotSupportedException(
"JpaDialect does not support savepoints - check your JPA provider's capabilities");
}
return savepointManager;
}
示例6
/**
* This implementation exposes the {@link SavepointManager} interface
* of the underlying transaction object, if any.
* @throws NestedTransactionNotSupportedException if savepoints are not supported
* @see #isTransactionSavepointManager()
*/
@Override
protected SavepointManager getSavepointManager() {
Object transaction = this.transaction;
if (!(transaction instanceof SavepointManager)) {
throw new NestedTransactionNotSupportedException(
"Transaction object [" + this.transaction + "] does not support savepoints");
}
return (SavepointManager) transaction;
}
示例7
/**
* This implementation exposes the SavepointManager interface
* of the underlying transaction object, if any.
*/
@Override
protected SavepointManager getSavepointManager() {
if (!isTransactionSavepointManager()) {
throw new NestedTransactionNotSupportedException(
"Transaction object [" + getTransaction() + "] does not support savepoints");
}
return (SavepointManager) getTransaction();
}
示例8
public void setTransactionData(Object transactionData) {
this.transactionData = transactionData;
this.entityManagerHolder.setTransactionActive(true);
if (transactionData instanceof SavepointManager) {
this.entityManagerHolder.setSavepointManager((SavepointManager) transactionData);
}
}
示例9
private SavepointManager getSavepointManager() {
if (!isSavepointAllowed()) {
throw new NestedTransactionNotSupportedException(
"Transaction manager does not allow nested transactions");
}
SavepointManager savepointManager = getEntityManagerHolder().getSavepointManager();
if (savepointManager == null) {
throw new NestedTransactionNotSupportedException(
"JpaDialect does not support savepoints - check your JPA provider's capabilities");
}
return savepointManager;
}
示例10
public void setTransactionData(Object transactionData) {
this.transactionData = transactionData;
this.entityManagerHolder.setTransactionActive(true);
if (transactionData instanceof SavepointManager) {
this.entityManagerHolder.setSavepointManager((SavepointManager) transactionData);
}
}
示例11
private SavepointManager getSavepointManager() {
if (!isSavepointAllowed()) {
throw new NestedTransactionNotSupportedException(
"Transaction manager does not allow nested transactions");
}
SavepointManager savepointManager = getEntityManagerHolder().getSavepointManager();
if (savepointManager == null) {
throw new NestedTransactionNotSupportedException(
"JpaDialect does not support savepoints - check your JPA provider's capabilities");
}
return savepointManager;
}
示例12
/**
* This implementation exposes the SavepointManager interface
* of the underlying transaction object, if any.
*/
@Override
protected SavepointManager getSavepointManager() {
if (!isTransactionSavepointManager()) {
throw new NestedTransactionNotSupportedException(
"Transaction object [" + getTransaction() + "] does not support savepoints");
}
return (SavepointManager) getTransaction();
}
示例13
protected void setSavepointManager(@Nullable SavepointManager savepointManager) {
this.savepointManager = savepointManager;
}
示例14
@Nullable
protected SavepointManager getSavepointManager() {
return this.savepointManager;
}
示例15
protected void setSavepointManager(@Nullable SavepointManager savepointManager) {
this.savepointManager = savepointManager;
}
示例16
@Nullable
protected SavepointManager getSavepointManager() {
return this.savepointManager;
}
示例17
protected void setSavepointManager(SavepointManager savepointManager) {
this.savepointManager = savepointManager;
}
示例18
protected SavepointManager getSavepointManager() {
return this.savepointManager;
}
示例19
protected void setSavepointManager(SavepointManager savepointManager) {
this.savepointManager = savepointManager;
}
示例20
protected SavepointManager getSavepointManager() {
return this.savepointManager;
}
示例21
/**
* Return whether the underlying transaction implements the {@link SavepointManager}
* interface and therefore supports savepoints.
* @see #getTransaction()
* @see #getSavepointManager()
*/
public boolean isTransactionSavepointManager() {
return (this.transaction instanceof SavepointManager);
}
示例22
/**
* Return a SavepointManager for the underlying transaction, if possible.
* <p>Default implementation always throws a NestedTransactionNotSupportedException.
* @throws org.springframework.transaction.NestedTransactionNotSupportedException
* if the underlying transaction does not support savepoints
*/
protected SavepointManager getSavepointManager() {
throw new NestedTransactionNotSupportedException("This transaction does not support savepoints");
}
示例23
/**
* Return whether the underlying transaction implements the {@link SavepointManager}
* interface and therefore supports savepoints.
* @see #getTransaction()
* @see #getSavepointManager()
*/
public boolean isTransactionSavepointManager() {
return (this.transaction instanceof SavepointManager);
}
示例24
/**
* Return a SavepointManager for the underlying transaction, if possible.
* <p>Default implementation always throws a NestedTransactionNotSupportedException.
* @throws org.springframework.transaction.NestedTransactionNotSupportedException
* if the underlying transaction does not support savepoints
*/
protected SavepointManager getSavepointManager() {
throw new NestedTransactionNotSupportedException("This transaction does not support savepoints");
}
示例25
/**
* Return whether the underlying transaction implements the
* SavepointManager interface.
* @see #getTransaction
* @see org.springframework.transaction.SavepointManager
*/
public boolean isTransactionSavepointManager() {
return (getTransaction() instanceof SavepointManager);
}
示例26
/**
* Return a SavepointManager for the underlying transaction, if possible.
* <p>Default implementation always throws a NestedTransactionNotSupportedException.
* @throws org.springframework.transaction.NestedTransactionNotSupportedException
* if the underlying transaction does not support savepoints
*/
protected SavepointManager getSavepointManager() {
throw new NestedTransactionNotSupportedException("This transaction does not support savepoints");
}
示例27
/**
* Return whether the underlying transaction implements the
* SavepointManager interface.
* @see #getTransaction
* @see org.springframework.transaction.SavepointManager
*/
public boolean isTransactionSavepointManager() {
return (getTransaction() instanceof SavepointManager);
}
示例28
/**
* Return a SavepointManager for the underlying transaction, if possible.
* <p>Default implementation always throws a NestedTransactionNotSupportedException.
* @throws org.springframework.transaction.NestedTransactionNotSupportedException
* if the underlying transaction does not support savepoints
*/
protected SavepointManager getSavepointManager() {
throw new NestedTransactionNotSupportedException("This transaction does not support savepoints");
}