TRORequestParam

Overview

The TRORequestParam class is used to represent an individual parameter in a TRODynamicRequest.

Location

 

constructor Create  override

Creates a new instance.

constructor Create(Collection: TCollection)

Parameters:

  • Collection: collection

AsAnsiString

Gets or sets the value of the parameter as a 8-bit ANSI String.

property AsAnsiString: ROAnsiString read write

AsBinary

Gets or sets the value of the parameter as a Binary. If the parameter is not a Binary type, nil will be returned.

property AsBinary: Binary read write

AsBoolean

Gets or sets the value of the parameter as a Boolean.

property AsBoolean: boolean read write

AsComplexType

Gets or sets the value of the parameter as a ComplexType (Struct). If the parameter is not a ComplexType, nil will be returned.

property AsComplexType: TROComplexType read write

AsCurrency

Gets or sets the value of the parameter as Currency.

property AsCurrency: currency read write

AsDateTime

Gets or sets the value of the parameter as a DateTime.

property AsDateTime: TDateTime read write

AsDecimal

Gets or sets the value of the parameter as a Decimal.

property AsDecimal: TBcd read write

AsFloat

Gets or sets the value of the parameter as a Float/Double.

property AsFloat: double read write

AsGuid

Gets or sets the value of the parameter as a Guid.

property AsGuid: TGUID read write

AsInt64

Gets or sets the value of the parameter as a 64-bit Integer.

property AsInt64: Int64 read write

AsInteger

Gets or sets the value of the parameter as a 32-bit Integer.

property AsInteger: integer read write

Assign  override

Copies data from a given source.

procedure Assign(Source: TPersistent)

Parameters:

  • Source: Instance whose properties will be copied

AsString

Gets or sets the value of the parameter as a 8-bit ANSI String.

property AsString: string read write

AsUTF8String

Gets or sets the value of the parameter as a UTF8string.

property AsUTF8String: ROUTF8String read write

AsVariant

Gets or sets the value of the parameter as a Variant.

property AsVariant: variant read write

AsWideString

Gets or sets the value of the parameter as a 16-bit Unicode Widestring.

property AsWideString: UnicodeString read write

AsXml

Gets or sets the value of the parameter as a Xml.

property AsXml: IXmlNode read write

Check

procedure Check

ClearValue

Sets the internal value of the parameter to null. If OwnsBinary or OwnsComplexType are true, objects assigned to AsBinary or AsComplexType will automatically be freed.

procedure ClearValue

CopyRODLParam

procedure CopyRODLParam(aSourceParam: TRODLOperationParam; aPersistValues: boolean; aOldParams: TRORequestParamCollection)

Parameters:

  • aSourceParam:
  • aPersistValues:
  • aOldParams:

DataType

Uses a value from the TRODataType enum. If rtUserDefined is selected to specify a complex type/struct, then TypeName must also be set to the exact name of the type.

property DataType: TRODataType read write

DefineProperties  override

procedure DefineProperties(Filer: TFiler)

Parameters:

  • Filer:

Flag

Defines the direction flag (in, out, var or result) of the parameter as one of the values of TRODLParamFlag.

property Flag: TRODLParamFlag read write

GetDisplayName  protected override

Returns the name of the parameter as it appears in the collection editor.

function GetDisplayName: string

GetSimpleValueReference

function GetSimpleValueReference: PVariant

IsNull

Returns whether the contained value is Null. Depending on the DataType configured for the parameter, the property will either check the AsBinary or AsComplexType reference, or the internal Variant Value for null. This means that IsNull is valid for all data types.

property IsNull: boolean read write

Name

Sets the name of the parameter. Depending on the message format used, this name must match the name specified in the RODL definition for the called service method.

property Name: string read write

OwnsBinary

Determines whether the parameter owns the Binary value contained in AsBinary, and will automatically free it when the DataType changes or the parameter is destroyed (true), or not (false). When setting DataType to rtBinary, the parameter will automatically instantiate a new Binary object if needed, and set OwnsBinary to true; conversely, if a Binary is manually assigned to AsBinary via code, OwnsBinary will be set to false.
You can manually set OwnsBinary to either value to change the default behavior, either to hold on to the auto-created Binary and free it yourself, or to transfer ownership of a manually created Binary to the parameter.

property OwnsBinary: boolean read write

OwnsComplexType

Toggles whether the parameter owns the ComplexType value contained in AsComplexType, and will automatically free it when the DataType changes or the parameter is destroyed (true), or not (false). You can manually set OwnsComplexType to true in order to transfer ownership of a manually created Binary to the parameter.

property OwnsComplexType: boolean read write

ReadBinaryValue

procedure ReadBinaryValue(Stream: TStream)

Parameters:

  • Stream:

ReadComplexTypeValue

procedure ReadComplexTypeValue(Reader: TReader)

Parameters:

  • Reader:

ReadSimpleValue

procedure ReadSimpleValue(Reader: TReader)

Parameters:

  • Reader:

TypeName

Specifies the class name to be used for a complex type/struct parameter. Setting TypeName to a non-empty value will automatically set DataType to rtUserDefined.

property TypeName: string read write

Value

Gets or sets the contained variant value, if the DataType is not set to Binary or ComplexType.

property Value: variant read write

WriteBinaryValue

procedure WriteBinaryValue(Stream: TStream)

Parameters:

  • Stream:

WriteComplexTypeValue

procedure WriteComplexTypeValue(Writer: TWriter)

Parameters:

  • Writer:

WriteSimpleValue

procedure WriteSimpleValue(Writer: TWriter)

Parameters:

  • Writer:

 

AsAnsiString

Gets or sets the value of the parameter as a 8-bit ANSI String.

property AsAnsiString: ROAnsiString read write

AsBinary

Gets or sets the value of the parameter as a Binary. If the parameter is not a Binary type, nil will be returned.

property AsBinary: Binary read write

AsBoolean

Gets or sets the value of the parameter as a Boolean.

property AsBoolean: boolean read write

AsComplexType

Gets or sets the value of the parameter as a ComplexType (Struct). If the parameter is not a ComplexType, nil will be returned.

property AsComplexType: TROComplexType read write

AsCurrency

Gets or sets the value of the parameter as Currency.

property AsCurrency: currency read write

AsDateTime

Gets or sets the value of the parameter as a DateTime.

property AsDateTime: TDateTime read write

AsDecimal

Gets or sets the value of the parameter as a Decimal.

property AsDecimal: TBcd read write

AsFloat

Gets or sets the value of the parameter as a Float/Double.

property AsFloat: double read write

AsGuid

Gets or sets the value of the parameter as a Guid.

property AsGuid: TGUID read write

AsInt64

Gets or sets the value of the parameter as a 64-bit Integer.

property AsInt64: Int64 read write

AsInteger

Gets or sets the value of the parameter as a 32-bit Integer.

property AsInteger: integer read write

AsString

Gets or sets the value of the parameter as a 8-bit ANSI String.

property AsString: string read write

AsUTF8String

Gets or sets the value of the parameter as a UTF8string.

property AsUTF8String: ROUTF8String read write

AsVariant

Gets or sets the value of the parameter as a Variant.

property AsVariant: variant read write

AsWideString

Gets or sets the value of the parameter as a 16-bit Unicode Widestring.

property AsWideString: UnicodeString read write

AsXml

Gets or sets the value of the parameter as a Xml.

property AsXml: IXmlNode read write

DataType

Uses a value from the TRODataType enum. If rtUserDefined is selected to specify a complex type/struct, then TypeName must also be set to the exact name of the type.

property DataType: TRODataType read write

Flag

Defines the direction flag (in, out, var or result) of the parameter as one of the values of TRODLParamFlag.

property Flag: TRODLParamFlag read write

IsNull

Returns whether the contained value is Null. Depending on the DataType configured for the parameter, the property will either check the AsBinary or AsComplexType reference, or the internal Variant Value for null. This means that IsNull is valid for all data types.

property IsNull: boolean read write

Name

Sets the name of the parameter. Depending on the message format used, this name must match the name specified in the RODL definition for the called service method.

property Name: string read write

OwnsBinary

Determines whether the parameter owns the Binary value contained in AsBinary, and will automatically free it when the DataType changes or the parameter is destroyed (true), or not (false). When setting DataType to rtBinary, the parameter will automatically instantiate a new Binary object if needed, and set OwnsBinary to true; conversely, if a Binary is manually assigned to AsBinary via code, OwnsBinary will be set to false.
You can manually set OwnsBinary to either value to change the default behavior, either to hold on to the auto-created Binary and free it yourself, or to transfer ownership of a manually created Binary to the parameter.

property OwnsBinary: boolean read write

OwnsComplexType

Toggles whether the parameter owns the ComplexType value contained in AsComplexType, and will automatically free it when the DataType changes or the parameter is destroyed (true), or not (false). You can manually set OwnsComplexType to true in order to transfer ownership of a manually created Binary to the parameter.

property OwnsComplexType: boolean read write

TypeName

Specifies the class name to be used for a complex type/struct parameter. Setting TypeName to a non-empty value will automatically set DataType to rtUserDefined.

property TypeName: string read write

Value

Gets or sets the contained variant value, if the DataType is not set to Binary or ComplexType.

property Value: variant read write

 

constructor Create  override

Creates a new instance.

constructor Create(Collection: TCollection)

Parameters:

  • Collection: collection

Assign  override

Copies data from a given source.

procedure Assign(Source: TPersistent)

Parameters:

  • Source: Instance whose properties will be copied

Check

procedure Check

ClearValue

Sets the internal value of the parameter to null. If OwnsBinary or OwnsComplexType are true, objects assigned to AsBinary or AsComplexType will automatically be freed.

procedure ClearValue

CopyRODLParam

procedure CopyRODLParam(aSourceParam: TRODLOperationParam; aPersistValues: boolean; aOldParams: TRORequestParamCollection)

Parameters:

  • aSourceParam:
  • aPersistValues:
  • aOldParams:

DefineProperties  override

procedure DefineProperties(Filer: TFiler)

Parameters:

  • Filer:

GetDisplayName  protected override

Returns the name of the parameter as it appears in the collection editor.

function GetDisplayName: string

GetSimpleValueReference

function GetSimpleValueReference: PVariant

ReadBinaryValue

procedure ReadBinaryValue(Stream: TStream)

Parameters:

  • Stream:

ReadComplexTypeValue

procedure ReadComplexTypeValue(Reader: TReader)

Parameters:

  • Reader:

ReadSimpleValue

procedure ReadSimpleValue(Reader: TReader)

Parameters:

  • Reader:

WriteBinaryValue

procedure WriteBinaryValue(Stream: TStream)

Parameters:

  • Stream:

WriteComplexTypeValue

procedure WriteComplexTypeValue(Writer: TWriter)

Parameters:

  • Writer:

WriteSimpleValue

procedure WriteSimpleValue(Writer: TWriter)

Parameters:

  • Writer:

See Also