src/app/core/basic-datatypes/boolean/boolean.datatype.ts
Properties |
|
Methods |
| transformToDatabaseFormat | ||||||
transformToDatabaseFormat(value: boolean)
|
||||||
|
Inherited from
DefaultDatatype
|
||||||
|
Defined in
DefaultDatatype:12
|
||||||
|
Parameters :
Returns :
boolean
|
| transformToObjectFormat | ||||||
transformToObjectFormat(value: boolean)
|
||||||
|
Inherited from
DefaultDatatype
|
||||||
|
Defined in
DefaultDatatype:16
|
||||||
|
Parameters :
Returns :
boolean
|
| importIncompleteAdditionalConfigBadge | ||||||
importIncompleteAdditionalConfigBadge(col: ColumnMapping)
|
||||||
|
Inherited from
DefaultDatatype
|
||||||
|
Defined in
DefaultDatatype:51
|
||||||
|
Parameters :
Returns :
string
|
| Async importMapFunction | ||||||||||||
importMapFunction(val: unknown, schemaField: EntitySchemaField, additional: DiscreteColumnMappingAdditional)
|
||||||||||||
|
Inherited from
DefaultDatatype
|
||||||||||||
|
Defined in
DefaultDatatype:29
|
||||||||||||
|
Parameters :
Returns :
unknown
|
| Async anonymize | ||||||||||||||||
anonymize(value: EntityType, schemaField: EntitySchemaField, parent: any)
|
||||||||||||||||
|
Inherited from
DefaultDatatype
|
||||||||||||||||
|
Defined in
DefaultDatatype:190
|
||||||||||||||||
|
(Partially) anonymize to "retain-anonymized" for reporting purposes without personal identifiable information.
Parameters :
Returns :
Promise<any>
|
| Static detectFieldInEntity | ||||||||||||
detectFieldInEntity(entityOrType: Entity | EntityConstructor, dataTypes: string | string[])
|
||||||||||||
|
Inherited from
DefaultDatatype
|
||||||||||||
|
Defined in
DefaultDatatype:57
|
||||||||||||
|
Detect the first field of the given datatype(s) in an entity's schema. Scans the schema for a field whose Subclasses typically override this without the extra
Parameters :
Returns :
string | undefined
The field name of the first matching field, or |
| normalizeSchemaField | ||||||||
normalizeSchemaField(schemaField: EntitySchemaField)
|
||||||||
|
Inherited from
DefaultDatatype
|
||||||||
|
Defined in
DefaultDatatype:182
|
||||||||
|
Return the (potentially adjusted) schema field for this datatype. Called when schema fields are set up (e.g. from config), allowing the datatype to normalize or fill in required settings. Override this in a subclass to enforce constraints
(e.g. always setting
Parameters :
Returns :
EntitySchemaField
The schema field to use (default: unchanged) |
| 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:80
|
|
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;
}
}