# Class T8PropertySetRepository<TUnit>

Repository for managing and retrieving property sets from a T8 Client Model. Handles property set resolution, nested property sets, and conflict merging when multiple property sets with the same name exist.

#### Example

    const repository = new T8PropertySetRepository(dto, units);
    const propertySets = repository.getPropertySets(collectionId, indices, hasConflict);

#### Type Parameters

- TUnit

  The type used to represent units of measurement

##### Index

### Constructors

constructor

### Methods

getPropertySets

## Constructors

### constructor

- new T8PropertySetRepository<TUnit>(
  sets: T8ClientPropertySetDTO[],
  setNameValues: string[],
  valueNameValues: string[],
  valueValues: T8ClientPropertyValueDTO[],
  valueTypeValues: string[],
  strings: string[],
  units: TUnit[],
  ): T8PropertySetRepository<TUnit>

  Creates a new T8PropertySetRepository instance.

  #### Type Parameters

  - TUnit

  #### Parameters

  - sets: T8ClientPropertySetDTO[]
  - setNameValues: string[]
  - valueNameValues: string[]
  - valueValues: T8ClientPropertyValueDTO[]
  - valueTypeValues: string[]
  - strings: string[]
  - units: TUnit[]

    Array of unit definitions for property values

  #### Returns T8PropertySetRepository<TUnit>

## Methods

### getPropertySets

- getPropertySets(
  indices?: TypedArray,
  hasConflict?: boolean,
  ): Record<string, T8PropertySet<TUnit>>

  Retrieves property sets for a specific collection by ID. Results are cached for performance.

  #### Parameters

  - `Optional` indices: TypedArray

    Optional array of indices into the property sets array

  - `Optional` hasConflict: boolean

    If true, property sets with duplicate names will be merged

  #### Returns Record<string, T8PropertySet<TUnit>>

  Record of property sets keyed by their names, or empty record if no indices provided

  #### Example

      const propertySets = repository.getPropertySets(123, new Uint16Array([0, 1, 2]), false);
      const wallProps = propertySets['Pset_WallCommon'];