File

src/app/core/basic-datatypes/boolean/boolean.datatype.ts

Extends

DiscreteDatatype

Index

Properties
Methods

Methods

transformToDatabaseFormat
transformToDatabaseFormat(value: boolean)
Inherited from DefaultDatatype
Defined in DefaultDatatype:12
Parameters :
Name Type Optional
value boolean No
Returns : boolean
transformToObjectFormat
transformToObjectFormat(value: boolean)
Inherited from DefaultDatatype
Defined in DefaultDatatype:16
Parameters :
Name Type Optional
value boolean No
Returns : boolean
importIncompleteAdditionalConfigBadge
importIncompleteAdditionalConfigBadge(col: ColumnMapping)
Inherited from DefaultDatatype
Defined in DefaultDatatype:37
Parameters :
Name Type Optional
col ColumnMapping No
Returns : string
Async importMapFunction
importMapFunction(val, schemaField: EntitySchemaField, additional: literal type)
Inherited from DefaultDatatype
Defined in DefaultDatatype:29
Parameters :
Name Type Optional
val No
schemaField EntitySchemaField No
additional literal type No
Returns : unknown
Async anonymize
anonymize(value: EntityType, schemaField: EntitySchemaField, parent: any)
Inherited from DefaultDatatype

(Partially) anonymize to "retain-anonymized" for reporting purposes without personal identifiable information.

Parameters :
Name Type Optional Description
value EntityType No

The original value to be anonymized

schemaField EntitySchemaField No
parent any No
Returns : Promise<any>

Properties

Static dataType
Type : string
Default value : "boolean"
Inherited from DefaultDatatype
Defined in DefaultDatatype:6
editComponent
Type : string
Default value : "EditBoolean"
Inherited from DefaultDatatype
Defined in DefaultDatatype:9
Static label
Type : string
Default value : $localize`:datatype-label:checkbox`
Inherited from DefaultDatatype
Defined in DefaultDatatype:7
viewComponent
Type : string
Default value : "DisplayCheckmark"
Inherited from DefaultDatatype
Defined in DefaultDatatype:10
importConfigComponent
Type : string
Default value : "DiscreteImportConfig"
Inherited from DefaultDatatype
Defined in DefaultDatatype:15
Readonly importAllowsMultiMapping
Type : boolean
Default value : false
Inherited from DefaultDatatype
Defined in DefaultDatatype:48

Whether this datatype allows multiple values to be mapped to the same entity field during import.

import { Injectable } from "@angular/core";
import { DiscreteDatatype } from "../discrete/discrete.datatype";

@Injectable()
export class BooleanDatatype extends DiscreteDatatype<boolean, boolean> {
  static override dataType = "boolean";
  static override label: string = $localize`:datatype-label:checkbox`;

  override editComponent = "EditBoolean";
  override viewComponent = "DisplayCheckmark";

  override transformToDatabaseFormat(value: boolean) {
    return value;
  }

  override transformToObjectFormat(value: boolean) {
    return value;
  }
}

results matching ""

    No results matching ""