Class AbstractTgTxOption<T extends AbstractTgTxOption<T>>
- java.lang.Object
-
- com.tsurugidb.iceaxe.transaction.option.AbstractTgTxOption<T>
-
- Type Parameters:
T
- concrete class
- All Implemented Interfaces:
TgTxOption
,java.lang.Cloneable
- Direct Known Subclasses:
AbstractTgTxOptionLong
,TgTxOptionOcc
@ThreadSafe public abstract class AbstractTgTxOption<T extends AbstractTgTxOption<T>> extends java.lang.Object implements TgTxOption
Tsurugi Transaction Option (common).
-
-
Constructor Summary
Constructors Constructor Description AbstractTgTxOption()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
appendString(java.lang.StringBuilder sb, java.lang.String name, java.lang.Object value)
append string.T
clone()
clone transaction option.T
clone(java.lang.String label)
clone transaction option.boolean
equals(java.lang.Object obj)
protected T
fillFrom(TgTxOption txOption)
fill from other transaction option.int
hashCode()
protected void
initializeLowTransactionOption(com.tsurugidb.sql.proto.SqlRequest.TransactionOption.Builder lowBuilder)
initialize low transaction option.java.lang.String
label()
get label.T
label(java.lang.String label)
set label.protected void
resetTransactionOption()
clear low transaction option.protected T
self()
returns this.com.tsurugidb.sql.proto.SqlRequest.TransactionOption
toLowTransactionOption()
convert toSqlRequest.TransactionOption
.java.lang.String
toString()
protected void
toString(java.lang.StringBuilder sb)
append string.-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.tsurugidb.iceaxe.transaction.option.TgTxOption
as, asLtxOption, asOccOption, asRtxOption, isLTX, isOCC, isRTX, type, typeName
-
-
-
-
Method Detail
-
self
protected final T self()
returns this.- Returns:
- this
-
label
public T label(java.lang.String label)
Description copied from interface:TgTxOption
set label.- Specified by:
label
in interfaceTgTxOption
- Parameters:
label
- label- Returns:
- this
-
label
public java.lang.String label()
Description copied from interface:TgTxOption
get label.- Specified by:
label
in interfaceTgTxOption
- Returns:
- label
-
resetTransactionOption
protected final void resetTransactionOption()
clear low transaction option.
-
toLowTransactionOption
public com.tsurugidb.sql.proto.SqlRequest.TransactionOption toLowTransactionOption()
Description copied from interface:TgTxOption
convert toSqlRequest.TransactionOption
.- Specified by:
toLowTransactionOption
in interfaceTgTxOption
- Returns:
- transaction option
-
initializeLowTransactionOption
@OverridingMethodsMustInvokeSuper protected void initializeLowTransactionOption(com.tsurugidb.sql.proto.SqlRequest.TransactionOption.Builder lowBuilder)
initialize low transaction option.- Parameters:
lowBuilder
- low transaction option builder
-
clone
public T clone()
Description copied from interface:TgTxOption
clone transaction option.- Specified by:
clone
in interfaceTgTxOption
- Overrides:
clone
in classjava.lang.Object
- Returns:
- new transaction option
-
clone
public T clone(java.lang.String label)
Description copied from interface:TgTxOption
clone transaction option.- Specified by:
clone
in interfaceTgTxOption
- Parameters:
label
- label- Returns:
- new transaction option
-
fillFrom
@OverridingMethodsMustInvokeSuper protected T fillFrom(@Nonnull TgTxOption txOption)
fill from other transaction option.- Parameters:
txOption
- source transaction option- Returns:
- this
-
hashCode
@OverridingMethodsMustInvokeSuper public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
@OverridingMethodsMustInvokeSuper public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
toString
@OverridingMethodsMustInvokeSuper protected void toString(java.lang.StringBuilder sb)
append string.- Parameters:
sb
- target string builder
-
appendString
protected final void appendString(java.lang.StringBuilder sb, java.lang.String name, java.lang.Object value)
append string.- Parameters:
sb
- target string buildername
- option namevalue
- option value
-
-