Class TransactionSelector.Builder

  • All Implemented Interfaces:
    com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, TransactionSelectorOrBuilder, Cloneable
    Enclosing class:
    TransactionSelector

    public static final class TransactionSelector.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<TransactionSelector.Builder>
    implements TransactionSelectorOrBuilder
     This message is used to select the transaction in which a
     [Read][google.spanner.v1.Spanner.Read] or
     [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql] call runs.
    
     See [TransactionOptions][google.spanner.v1.TransactionOptions] for more
     information about transactions.
     
    Protobuf type google.spanner.v1.TransactionSelector
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<TransactionSelector.Builder>
      • clear

        public TransactionSelector.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<TransactionSelector.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<TransactionSelector.Builder>
      • getDefaultInstanceForType

        public TransactionSelector getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public TransactionSelector build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public TransactionSelector buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public TransactionSelector.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<TransactionSelector.Builder>
      • setField

        public TransactionSelector.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                    Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<TransactionSelector.Builder>
      • clearField

        public TransactionSelector.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<TransactionSelector.Builder>
      • clearOneof

        public TransactionSelector.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<TransactionSelector.Builder>
      • setRepeatedField

        public TransactionSelector.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                            int index,
                                                            Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<TransactionSelector.Builder>
      • addRepeatedField

        public TransactionSelector.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                            Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<TransactionSelector.Builder>
      • mergeFrom

        public TransactionSelector.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<TransactionSelector.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<TransactionSelector.Builder>
      • mergeFrom

        public TransactionSelector.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                     com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                              throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<TransactionSelector.Builder>
        Throws:
        IOException
      • hasSingleUse

        public boolean hasSingleUse()
         Execute the read or SQL query in a temporary transaction.
         This is the most efficient way to execute a transaction that
         consists of a single SQL query.
         
        .google.spanner.v1.TransactionOptions single_use = 1;
        Specified by:
        hasSingleUse in interface TransactionSelectorOrBuilder
        Returns:
        Whether the singleUse field is set.
      • getSingleUse

        public TransactionOptions getSingleUse()
         Execute the read or SQL query in a temporary transaction.
         This is the most efficient way to execute a transaction that
         consists of a single SQL query.
         
        .google.spanner.v1.TransactionOptions single_use = 1;
        Specified by:
        getSingleUse in interface TransactionSelectorOrBuilder
        Returns:
        The singleUse.
      • setSingleUse

        public TransactionSelector.Builder setSingleUse​(TransactionOptions value)
         Execute the read or SQL query in a temporary transaction.
         This is the most efficient way to execute a transaction that
         consists of a single SQL query.
         
        .google.spanner.v1.TransactionOptions single_use = 1;
      • setSingleUse

        public TransactionSelector.Builder setSingleUse​(TransactionOptions.Builder builderForValue)
         Execute the read or SQL query in a temporary transaction.
         This is the most efficient way to execute a transaction that
         consists of a single SQL query.
         
        .google.spanner.v1.TransactionOptions single_use = 1;
      • mergeSingleUse

        public TransactionSelector.Builder mergeSingleUse​(TransactionOptions value)
         Execute the read or SQL query in a temporary transaction.
         This is the most efficient way to execute a transaction that
         consists of a single SQL query.
         
        .google.spanner.v1.TransactionOptions single_use = 1;
      • clearSingleUse

        public TransactionSelector.Builder clearSingleUse()
         Execute the read or SQL query in a temporary transaction.
         This is the most efficient way to execute a transaction that
         consists of a single SQL query.
         
        .google.spanner.v1.TransactionOptions single_use = 1;
      • getSingleUseBuilder

        public TransactionOptions.Builder getSingleUseBuilder()
         Execute the read or SQL query in a temporary transaction.
         This is the most efficient way to execute a transaction that
         consists of a single SQL query.
         
        .google.spanner.v1.TransactionOptions single_use = 1;
      • hasId

        public boolean hasId()
         Execute the read or SQL query in a previously-started transaction.
         
        bytes id = 2;
        Specified by:
        hasId in interface TransactionSelectorOrBuilder
        Returns:
        Whether the id field is set.
      • getId

        public com.google.protobuf.ByteString getId()
         Execute the read or SQL query in a previously-started transaction.
         
        bytes id = 2;
        Specified by:
        getId in interface TransactionSelectorOrBuilder
        Returns:
        The id.
      • setId

        public TransactionSelector.Builder setId​(com.google.protobuf.ByteString value)
         Execute the read or SQL query in a previously-started transaction.
         
        bytes id = 2;
        Parameters:
        value - The id to set.
        Returns:
        This builder for chaining.
      • clearId

        public TransactionSelector.Builder clearId()
         Execute the read or SQL query in a previously-started transaction.
         
        bytes id = 2;
        Returns:
        This builder for chaining.
      • hasBegin

        public boolean hasBegin()
         Begin a new transaction and execute this read or SQL query in
         it. The transaction ID of the new transaction is returned in
         [ResultSetMetadata.transaction][google.spanner.v1.ResultSetMetadata.transaction],
         which is a [Transaction][google.spanner.v1.Transaction].
         
        .google.spanner.v1.TransactionOptions begin = 3;
        Specified by:
        hasBegin in interface TransactionSelectorOrBuilder
        Returns:
        Whether the begin field is set.
      • getBegin

        public TransactionOptions getBegin()
         Begin a new transaction and execute this read or SQL query in
         it. The transaction ID of the new transaction is returned in
         [ResultSetMetadata.transaction][google.spanner.v1.ResultSetMetadata.transaction],
         which is a [Transaction][google.spanner.v1.Transaction].
         
        .google.spanner.v1.TransactionOptions begin = 3;
        Specified by:
        getBegin in interface TransactionSelectorOrBuilder
        Returns:
        The begin.
      • setBegin

        public TransactionSelector.Builder setBegin​(TransactionOptions value)
         Begin a new transaction and execute this read or SQL query in
         it. The transaction ID of the new transaction is returned in
         [ResultSetMetadata.transaction][google.spanner.v1.ResultSetMetadata.transaction],
         which is a [Transaction][google.spanner.v1.Transaction].
         
        .google.spanner.v1.TransactionOptions begin = 3;
      • setBegin

        public TransactionSelector.Builder setBegin​(TransactionOptions.Builder builderForValue)
         Begin a new transaction and execute this read or SQL query in
         it. The transaction ID of the new transaction is returned in
         [ResultSetMetadata.transaction][google.spanner.v1.ResultSetMetadata.transaction],
         which is a [Transaction][google.spanner.v1.Transaction].
         
        .google.spanner.v1.TransactionOptions begin = 3;
      • mergeBegin

        public TransactionSelector.Builder mergeBegin​(TransactionOptions value)
         Begin a new transaction and execute this read or SQL query in
         it. The transaction ID of the new transaction is returned in
         [ResultSetMetadata.transaction][google.spanner.v1.ResultSetMetadata.transaction],
         which is a [Transaction][google.spanner.v1.Transaction].
         
        .google.spanner.v1.TransactionOptions begin = 3;
      • clearBegin

        public TransactionSelector.Builder clearBegin()
         Begin a new transaction and execute this read or SQL query in
         it. The transaction ID of the new transaction is returned in
         [ResultSetMetadata.transaction][google.spanner.v1.ResultSetMetadata.transaction],
         which is a [Transaction][google.spanner.v1.Transaction].
         
        .google.spanner.v1.TransactionOptions begin = 3;
      • getBeginBuilder

        public TransactionOptions.Builder getBeginBuilder()
         Begin a new transaction and execute this read or SQL query in
         it. The transaction ID of the new transaction is returned in
         [ResultSetMetadata.transaction][google.spanner.v1.ResultSetMetadata.transaction],
         which is a [Transaction][google.spanner.v1.Transaction].
         
        .google.spanner.v1.TransactionOptions begin = 3;
      • getBeginOrBuilder

        public TransactionOptionsOrBuilder getBeginOrBuilder()
         Begin a new transaction and execute this read or SQL query in
         it. The transaction ID of the new transaction is returned in
         [ResultSetMetadata.transaction][google.spanner.v1.ResultSetMetadata.transaction],
         which is a [Transaction][google.spanner.v1.Transaction].
         
        .google.spanner.v1.TransactionOptions begin = 3;
        Specified by:
        getBeginOrBuilder in interface TransactionSelectorOrBuilder
      • setUnknownFields

        public final TransactionSelector.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<TransactionSelector.Builder>
      • mergeUnknownFields

        public final TransactionSelector.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<TransactionSelector.Builder>