Class Transaction.Builder

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

    public static final class Transaction.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Transaction.Builder>
    implements TransactionOrBuilder
     A transaction.
     
    Protobuf type google.spanner.v1.Transaction
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Transaction.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)  
      Transaction build()  
      Transaction buildPartial()  
      Transaction.Builder clear()  
      Transaction.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)  
      Transaction.Builder clearId()
      `id` may be used to identify the transaction in subsequent [Read][google.spanner.v1.Spanner.Read], [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql], [Commit][google.spanner.v1.Spanner.Commit], or [Rollback][google.spanner.v1.Spanner.Rollback] calls.
      Transaction.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)  
      Transaction.Builder clearReadTimestamp()
      For snapshot read-only transactions, the read timestamp chosen for the transaction.
      Transaction.Builder clone()  
      Transaction getDefaultInstanceForType()  
      static com.google.protobuf.Descriptors.Descriptor getDescriptor()  
      com.google.protobuf.Descriptors.Descriptor getDescriptorForType()  
      com.google.protobuf.ByteString getId()
      `id` may be used to identify the transaction in subsequent [Read][google.spanner.v1.Spanner.Read], [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql], [Commit][google.spanner.v1.Spanner.Commit], or [Rollback][google.spanner.v1.Spanner.Rollback] calls.
      com.google.protobuf.Timestamp getReadTimestamp()
      For snapshot read-only transactions, the read timestamp chosen for the transaction.
      com.google.protobuf.Timestamp.Builder getReadTimestampBuilder()
      For snapshot read-only transactions, the read timestamp chosen for the transaction.
      com.google.protobuf.TimestampOrBuilder getReadTimestampOrBuilder()
      For snapshot read-only transactions, the read timestamp chosen for the transaction.
      boolean hasReadTimestamp()
      For snapshot read-only transactions, the read timestamp chosen for the transaction.
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()  
      boolean isInitialized()  
      Transaction.Builder mergeFrom​(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)  
      Transaction.Builder mergeFrom​(com.google.protobuf.Message other)  
      Transaction.Builder mergeFrom​(Transaction other)  
      Transaction.Builder mergeReadTimestamp​(com.google.protobuf.Timestamp value)
      For snapshot read-only transactions, the read timestamp chosen for the transaction.
      Transaction.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)  
      Transaction.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)  
      Transaction.Builder setId​(com.google.protobuf.ByteString value)
      `id` may be used to identify the transaction in subsequent [Read][google.spanner.v1.Spanner.Read], [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql], [Commit][google.spanner.v1.Spanner.Commit], or [Rollback][google.spanner.v1.Spanner.Rollback] calls.
      Transaction.Builder setReadTimestamp​(com.google.protobuf.Timestamp value)
      For snapshot read-only transactions, the read timestamp chosen for the transaction.
      Transaction.Builder setReadTimestamp​(com.google.protobuf.Timestamp.Builder builderForValue)
      For snapshot read-only transactions, the read timestamp chosen for the transaction.
      Transaction.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)  
      Transaction.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)  
      • Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder

        getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
      • Methods inherited from class com.google.protobuf.AbstractMessage.Builder

        findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
      • Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

        addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
      • Methods inherited from interface com.google.protobuf.Message.Builder

        mergeDelimitedFrom, mergeDelimitedFrom
      • Methods inherited from interface com.google.protobuf.MessageLite.Builder

        mergeFrom
      • Methods inherited from interface com.google.protobuf.MessageOrBuilder

        findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
    • 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<Transaction.Builder>
      • clear

        public Transaction.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<Transaction.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<Transaction.Builder>
      • getDefaultInstanceForType

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

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

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

        public Transaction.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<Transaction.Builder>
      • setField

        public Transaction.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<Transaction.Builder>
      • clearField

        public Transaction.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<Transaction.Builder>
      • clearOneof

        public Transaction.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<Transaction.Builder>
      • setRepeatedField

        public Transaction.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<Transaction.Builder>
      • addRepeatedField

        public Transaction.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<Transaction.Builder>
      • mergeFrom

        public Transaction.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<Transaction.Builder>
      • isInitialized

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

        public Transaction.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<Transaction.Builder>
        Throws:
        IOException
      • getId

        public com.google.protobuf.ByteString getId()
         `id` may be used to identify the transaction in subsequent
         [Read][google.spanner.v1.Spanner.Read],
         [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql],
         [Commit][google.spanner.v1.Spanner.Commit], or
         [Rollback][google.spanner.v1.Spanner.Rollback] calls.
        
         Single-use read-only transactions do not have IDs, because
         single-use transactions do not support multiple requests.
         
        bytes id = 1;
        Specified by:
        getId in interface TransactionOrBuilder
        Returns:
        The id.
      • setId

        public Transaction.Builder setId​(com.google.protobuf.ByteString value)
         `id` may be used to identify the transaction in subsequent
         [Read][google.spanner.v1.Spanner.Read],
         [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql],
         [Commit][google.spanner.v1.Spanner.Commit], or
         [Rollback][google.spanner.v1.Spanner.Rollback] calls.
        
         Single-use read-only transactions do not have IDs, because
         single-use transactions do not support multiple requests.
         
        bytes id = 1;
        Parameters:
        value - The id to set.
        Returns:
        This builder for chaining.
      • clearId

        public Transaction.Builder clearId()
         `id` may be used to identify the transaction in subsequent
         [Read][google.spanner.v1.Spanner.Read],
         [ExecuteSql][google.spanner.v1.Spanner.ExecuteSql],
         [Commit][google.spanner.v1.Spanner.Commit], or
         [Rollback][google.spanner.v1.Spanner.Rollback] calls.
        
         Single-use read-only transactions do not have IDs, because
         single-use transactions do not support multiple requests.
         
        bytes id = 1;
        Returns:
        This builder for chaining.
      • hasReadTimestamp

        public boolean hasReadTimestamp()
         For snapshot read-only transactions, the read timestamp chosen
         for the transaction. Not returned by default: see
         [TransactionOptions.ReadOnly.return_read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.return_read_timestamp].
        
         A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
         Example: `"2014-10-02T15:01:23.045123456Z"`.
         
        .google.protobuf.Timestamp read_timestamp = 2;
        Specified by:
        hasReadTimestamp in interface TransactionOrBuilder
        Returns:
        Whether the readTimestamp field is set.
      • getReadTimestamp

        public com.google.protobuf.Timestamp getReadTimestamp()
         For snapshot read-only transactions, the read timestamp chosen
         for the transaction. Not returned by default: see
         [TransactionOptions.ReadOnly.return_read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.return_read_timestamp].
        
         A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
         Example: `"2014-10-02T15:01:23.045123456Z"`.
         
        .google.protobuf.Timestamp read_timestamp = 2;
        Specified by:
        getReadTimestamp in interface TransactionOrBuilder
        Returns:
        The readTimestamp.
      • setReadTimestamp

        public Transaction.Builder setReadTimestamp​(com.google.protobuf.Timestamp value)
         For snapshot read-only transactions, the read timestamp chosen
         for the transaction. Not returned by default: see
         [TransactionOptions.ReadOnly.return_read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.return_read_timestamp].
        
         A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
         Example: `"2014-10-02T15:01:23.045123456Z"`.
         
        .google.protobuf.Timestamp read_timestamp = 2;
      • setReadTimestamp

        public Transaction.Builder setReadTimestamp​(com.google.protobuf.Timestamp.Builder builderForValue)
         For snapshot read-only transactions, the read timestamp chosen
         for the transaction. Not returned by default: see
         [TransactionOptions.ReadOnly.return_read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.return_read_timestamp].
        
         A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
         Example: `"2014-10-02T15:01:23.045123456Z"`.
         
        .google.protobuf.Timestamp read_timestamp = 2;
      • mergeReadTimestamp

        public Transaction.Builder mergeReadTimestamp​(com.google.protobuf.Timestamp value)
         For snapshot read-only transactions, the read timestamp chosen
         for the transaction. Not returned by default: see
         [TransactionOptions.ReadOnly.return_read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.return_read_timestamp].
        
         A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
         Example: `"2014-10-02T15:01:23.045123456Z"`.
         
        .google.protobuf.Timestamp read_timestamp = 2;
      • clearReadTimestamp

        public Transaction.Builder clearReadTimestamp()
         For snapshot read-only transactions, the read timestamp chosen
         for the transaction. Not returned by default: see
         [TransactionOptions.ReadOnly.return_read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.return_read_timestamp].
        
         A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
         Example: `"2014-10-02T15:01:23.045123456Z"`.
         
        .google.protobuf.Timestamp read_timestamp = 2;
      • getReadTimestampBuilder

        public com.google.protobuf.Timestamp.Builder getReadTimestampBuilder()
         For snapshot read-only transactions, the read timestamp chosen
         for the transaction. Not returned by default: see
         [TransactionOptions.ReadOnly.return_read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.return_read_timestamp].
        
         A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
         Example: `"2014-10-02T15:01:23.045123456Z"`.
         
        .google.protobuf.Timestamp read_timestamp = 2;
      • getReadTimestampOrBuilder

        public com.google.protobuf.TimestampOrBuilder getReadTimestampOrBuilder()
         For snapshot read-only transactions, the read timestamp chosen
         for the transaction. Not returned by default: see
         [TransactionOptions.ReadOnly.return_read_timestamp][google.spanner.v1.TransactionOptions.ReadOnly.return_read_timestamp].
        
         A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds.
         Example: `"2014-10-02T15:01:23.045123456Z"`.
         
        .google.protobuf.Timestamp read_timestamp = 2;
        Specified by:
        getReadTimestampOrBuilder in interface TransactionOrBuilder
      • setUnknownFields

        public final Transaction.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<Transaction.Builder>
      • mergeUnknownFields

        public final Transaction.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<Transaction.Builder>