FDO SDK API Reference
    Preparing search index...

    Interface FDORecord

    Represents a single FDO record that is optionally associated with a registered PID.

    A record consists of attributes, each with one or more values. Each attribute is uniquely identified by its PID.

    interface FDORecord {
        PID: string | undefined;
        addAttribute(attribute: string, value: RecordValue): void;
        addAttribute<Attr extends Attribute<RecordValue>>(
            attribute: Attr,
            value: Attr extends Attribute<T> ? T : never,
        ): void;
        addProfile<P extends Profile<ProfileAttributes>>(
            profile: P,
            attributes: P extends Profile<A> ? WithMarkers<A> : never,
        ): void;
        addRecord(record: FDORecord): void;
        addReference(
            fromAttribute: string | Attribute<string | string[]>,
            toRecord: string | LocalFDORecord | PublishedFDORecord,
        ): void;
        addReferenceBidi(
            fromAttribute: string | Attribute<string | string[]>,
            toAttribute: string | Attribute<string | string[]>,
            toRecord: string | LocalFDORecord | PublishedFDORecord,
        ): void;
        get(attribute: string | Attribute<never>): RecordValue | undefined;
        getAll(): Map<string, RecordValue>;
        getProfiles(): string[];
        getReferences(): ReferenceDeclaration[];
        has(attribute: string | Attribute<never>): boolean;
        remove(attribute: string | Attribute<never>): void;
        set(attribute: string, value: RecordValue): void;
        set<T extends RecordValue>(attribute: Attribute<T>, value: T): void;
        toJSON(): Record<string, RecordValue>;
        toString(): string;
    }

    Hierarchy (View Summary)

    Implemented by

    Index
    PID: string | undefined

    The globally unique and registered identifier of this record. Undefined only if this record has not been published yet.

    • Add a bidirectional reference from this record to another record and back. The target record must be in the current local or remote graph in order to create the back-reference

      Parameters

      • fromAttribute: string | Attribute<string | string[]>

        The attribute of this record where the reference will be placed

      • toAttribute: string | Attribute<string | string[]>

        The attribute of the target record where the back-reference will be placed

      • toRecord: string | LocalFDORecord | PublishedFDORecord

        the record that should be referenced, or a local ID (LocalID) or PID of the referenced record. Must either be known locally or be resolvable via its PID

      Returns void

      FDORecord.addReference for unidirectional references

    • Set the value of the specified attribute. Will add the attribute to the record if it does not exist yet. Will replace (all) existing value(s) of this attribute with the specified value.

      Parameters

      • attribute: string

        PID of the attribute.

      • value: RecordValue

        New value of the attribute. Can be an array to add multiple values, if allowed by the attribute.

      Returns void

    • Set the value of the specified attribute. Will add the attribute to the record if it does not exist yet. Will replace (all) existing value(s) of this attribute with the specified value.

      Type Parameters

      Parameters

      • attribute: Attribute<T>

        Attribute instance of the attribute.

      • value: T

        New value of the attribute. Can be an array to add multiple values, if allowed by the attribute.

      Returns void