Member Junction
    Preparing search index...

    Base class for tracking a collection of field name(key)/value pair combinations with utility methods for working with them.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    KeyValuePairs: KeyValuePair[]

    Accessors

    Methods

    • returns the value of the key value pair for the specified field name

      Parameters

      • fieldName: string

        the field name to get the value for

      Returns any

      the value of the key value pair for the specified field name

    • returns the value of the key value pair at the specified index

      Parameters

      • index: number

        the index of the key value pair to get the value for

      Returns any

      the value of the key value pair at the specified index

    • Utility to load the object from a string representation of the key value pairs in the format "Field1|Value1||Field2|Value2" etc. The delimiters between the fields default to '||' and the values default to '|', but can be anything desired.

      Parameters

      • concatenatedString: string
      • fieldDelimiter: string = '||'
      • valueDelimiter: string = '|'

      Returns void

    • Loads the KeyValuePairs from a list of strings in the format "FieldName=Value"

      Parameters

      • list: string[]

        the list of strings to load from

      • Optionaldelimiter: string

        the delimiter to use between the field name and value. Defaults to '='

      Returns void

      ["ID=1", "Name=John"]
      
    • Parses a provided url segment using the provided delimiter and loads the key value pairs from it. If the segment just contains a single value and no delimiter, it will assume the field name is the primary key field name of the entity and load that way.

      Parameters

      Returns void

    • Parses the provided routeSegment and assumes the field names are included in the segment

      Parameters

      • urlSegment: string

      Returns void

    • Utility to generate a string representation of the key value pairs in the format "Field1|Value1||Field2|Value2" etc. The field delimiter defaults to '||' and the value delimiter defaults to '|'

      Parameters

      • fieldDelimiter: string = '||'
      • valueDelimiter: string = '|'

      Returns string

    • Parameters

      • Optionaldelimiter: string

        the delimiter to use between the field name and value. Defaults to '='

      Returns string[]

      the KeyValuePairs as a list of strings in the format "FieldName=Value"

      ["ID=1", "Name=John"]
      
    • Parameters

      • OptionaluseIsNull: boolean

        if true, will return "FieldName IS NULL" for any key value pair that has a null or undefined value

      Returns string

      a string representation of the primary key values in the format "FieldName=Value"

      "ID=1 AND Name=John"
      
    • For URL segments, we use | and || as the standard delimiters for field and value respectively in order to avoid conflicts with the standard URL delimiters like = and &. This method converts the key value pairs to a URL segment

      Parameters

      • Optionalsegment: string

      Returns string

    • Utility function to return a string representation of the composite key in the format "FieldName=Value AND FieldName=Value"

      Parameters

      • useIsNull: boolean = true

        if true, will return "FieldName IS NULL" for any key value pair that has a null or undefined value, if false, will return "FieldName=Value"

      • quoteStyle: "single" | "double" = 'single'

      Returns string

      a string representation of the composite key in the format "FieldName=Value AND FieldName=Value"

      "ID=1 AND Name='John'"
      
    • Parameters

      • Optionaldelimiter: string

        the delimiter to use between the values. Defaults to ', '

      Returns string

      the value of each key value pair in the format "Value1, Value2, Value3"

      "1, John"