Class AbstractTgTxOption<T extends 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 Detail

      • AbstractTgTxOption

        public AbstractTgTxOption()
    • 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 interface TgTxOption
        Parameters:
        label - label
        Returns:
        this
      • label

        public java.lang.String label()
        Description copied from interface: TgTxOption
        get label.
        Specified by:
        label in interface TgTxOption
        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 to SqlRequest.TransactionOption.
        Specified by:
        toLowTransactionOption in interface TgTxOption
        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 interface TgTxOption
        Overrides:
        clone in class java.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 interface TgTxOption
        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 class java.lang.Object
      • equals

        @OverridingMethodsMustInvokeSuper
        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.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 builder
        name - option name
        value - option value