From 4aa60980a16fceef0837eb0321aff3e4d81dded7 Mon Sep 17 00:00:00 2001 From: reinjens Date: Tue, 29 Oct 2024 16:15:11 +0100 Subject: [PATCH] #AMB-36 -> entities, repositories and fetchApis... --- .env | 2 +- lib/main.dart | 31 +- lib/src/domain/entity/entities.dart | 14 - .../_general}/file/file_part.dart | 2 +- .../_general}/file/file_part.g.dart | 0 .../_general}/file/thumbnail.dart | 0 .../_general}/file/thumbnail.g.dart | 0 .../_general}/file/thumbnails.dart | 2 +- .../_general}/file/thumbnails.g.dart | 0 .../_general}/id_value/id_value.dart | 0 .../_general}/id_value/id_value.g.dart | 0 .../id_value_color/id_value_color.dart | 0 .../id_value_color/id_value_color.g.dart | 0 .../_general}/id_value_mix/id_value_mix.dart | 2 +- .../id_value_mix/id_value_mix.g.dart | 0 .../_general}/month/month.dart | 0 .../approval_requirement.dart | 30 + .../approval_requirement.g.dart | 1303 +++ .../approval_requirement_repository.dart | 10 + lib/src/{domain => }/entity/base_entity.dart | 0 lib/src/entity/business/business.dart | 73 + lib/src/entity/business/business.g.dart | 7238 +++++++++++++++++ .../entity/business/business_repository.dart | 10 + lib/src/entity/entities.dart | 25 + .../experience_report/experience_report.dart | 25 + .../experience_report.g.dart | 1153 +++ .../experience_report_repository.dart | 10 + .../funding_program/funding_program.dart | 2 +- .../funding_program/funding_program.g.dart | 0 .../funding_program_repository.dart | 3 +- .../location_requirements.dart | 43 + .../location_requirements.g.dart | 2194 +++++ .../location_requirements_repository.dart | 10 + lib/src/entity/material/material.dart | 24 + lib/src/entity/material/material.g.dart | 917 +++ .../entity/material/material_repository.dart | 10 + .../{domain => }/entity/measure/measure.dart | 2 +- .../entity/measure/measure.g.dart | 0 .../measure}/measure_repository.dart | 3 +- .../measure_combination.dart | 2 +- .../measure_combination.g.dart | 0 .../measure_combination_repository.dart | 3 +- .../number_factsheet/number_factsheet.dart | 30 + .../number_factsheet/number_factsheet.g.dart | 2334 ++++++ .../number_factsheet_repository.dart | 10 + .../entity/organism/organism.dart | 2 +- .../entity/organism/organism.g.dart | 0 .../organism}/organism_repository.dart | 3 +- .../reference_implementation.dart | 65 + .../reference_implementation.g.dart | 5763 +++++++++++++ .../reference_implementation_repository.dart | 10 + .../service_provider/service_provider.dart | 40 + .../service_provider/service_provider.g.dart | 2648 ++++++ .../service_provider_contact_person.dart | 27 + .../service_provider_contact_person.g.dart | 1765 ++++ ...ce_provider_contact_person_repository.dart | 10 + .../service_provider_repository.dart | 10 + lib/src/entity/source/source.dart | 43 + lib/src/entity/source/source.g.dart | 2977 +++++++ lib/src/entity/source/source_repository.dart | 10 + .../entity/tree_type/tree_type.dart | 2 +- .../entity/tree_type/tree_type.g.dart | 0 .../tree_type}/tree_type_repository.dart | 5 +- lib/src/packages/ambito_api/base.dart | 65 - lib/src/packages/ambito_api/base_api.dart | 103 + lib/src/packages/ambito_db/base_db.dart | 44 +- .../ambito_db/repositories/_repositories.dart | 15 + lib/src/pages/actions/actions_page.dart | 144 +- lib/src/pages/start/start_page.dart | 41 +- .../form/fields/field_daterangepicker.dart | 1 + .../widgets/form/fields/field_dropdown.dart | 1 + .../form/fields/field_monthsrangepicker.dart | 1 + 72 files changed, 29111 insertions(+), 201 deletions(-) delete mode 100644 lib/src/domain/entity/entities.dart rename lib/src/{domain/entity/general => entity/_general}/file/file_part.dart (92%) rename lib/src/{domain/entity/general => entity/_general}/file/file_part.g.dart (100%) rename lib/src/{domain/entity/general => entity/_general}/file/thumbnail.dart (100%) rename lib/src/{domain/entity/general => entity/_general}/file/thumbnail.g.dart (100%) rename lib/src/{domain/entity/general => entity/_general}/file/thumbnails.dart (88%) rename lib/src/{domain/entity/general => entity/_general}/file/thumbnails.g.dart (100%) rename lib/src/{domain/entity/general => entity/_general}/id_value/id_value.dart (100%) rename lib/src/{domain/entity/general => entity/_general}/id_value/id_value.g.dart (100%) rename lib/src/{domain/entity/general => entity/_general}/id_value_color/id_value_color.dart (100%) rename lib/src/{domain/entity/general => entity/_general}/id_value_color/id_value_color.g.dart (100%) rename lib/src/{domain/entity/general => entity/_general}/id_value_mix/id_value_mix.dart (87%) rename lib/src/{domain/entity/general => entity/_general}/id_value_mix/id_value_mix.g.dart (100%) rename lib/src/{domain/entity/general => entity/_general}/month/month.dart (100%) create mode 100644 lib/src/entity/approval_requirement/approval_requirement.dart create mode 100644 lib/src/entity/approval_requirement/approval_requirement.g.dart create mode 100644 lib/src/entity/approval_requirement/approval_requirement_repository.dart rename lib/src/{domain => }/entity/base_entity.dart (100%) create mode 100644 lib/src/entity/business/business.dart create mode 100644 lib/src/entity/business/business.g.dart create mode 100644 lib/src/entity/business/business_repository.dart create mode 100644 lib/src/entity/entities.dart create mode 100644 lib/src/entity/experience_report/experience_report.dart create mode 100644 lib/src/entity/experience_report/experience_report.g.dart create mode 100644 lib/src/entity/experience_report/experience_report_repository.dart rename lib/src/{domain => }/entity/funding_program/funding_program.dart (93%) rename lib/src/{domain => }/entity/funding_program/funding_program.g.dart (100%) rename lib/src/{packages/ambito_db/repositories => entity/funding_program}/funding_program_repository.dart (74%) create mode 100644 lib/src/entity/location_requirements/location_requirements.dart create mode 100644 lib/src/entity/location_requirements/location_requirements.g.dart create mode 100644 lib/src/entity/location_requirements/location_requirements_repository.dart create mode 100644 lib/src/entity/material/material.dart create mode 100644 lib/src/entity/material/material.g.dart create mode 100644 lib/src/entity/material/material_repository.dart rename lib/src/{domain => }/entity/measure/measure.dart (99%) rename lib/src/{domain => }/entity/measure/measure.g.dart (100%) rename lib/src/{packages/ambito_db/repositories => entity/measure}/measure_repository.dart (77%) rename lib/src/{domain => }/entity/measure_combination/measure_combination.dart (91%) rename lib/src/{domain => }/entity/measure_combination/measure_combination.g.dart (100%) rename lib/src/{packages/ambito_db/repositories => entity/measure_combination}/measure_combination_repository.dart (79%) create mode 100644 lib/src/entity/number_factsheet/number_factsheet.dart create mode 100644 lib/src/entity/number_factsheet/number_factsheet.g.dart create mode 100644 lib/src/entity/number_factsheet/number_factsheet_repository.dart rename lib/src/{domain => }/entity/organism/organism.dart (88%) rename lib/src/{domain => }/entity/organism/organism.g.dart (100%) rename lib/src/{packages/ambito_db/repositories => entity/organism}/organism_repository.dart (77%) create mode 100644 lib/src/entity/reference_implementation/reference_implementation.dart create mode 100644 lib/src/entity/reference_implementation/reference_implementation.g.dart create mode 100644 lib/src/entity/reference_implementation/reference_implementation_repository.dart create mode 100644 lib/src/entity/service_provider/service_provider.dart create mode 100644 lib/src/entity/service_provider/service_provider.g.dart create mode 100644 lib/src/entity/service_provider/service_provider_contact_person.dart create mode 100644 lib/src/entity/service_provider/service_provider_contact_person.g.dart create mode 100644 lib/src/entity/service_provider/service_provider_contact_person_repository.dart create mode 100644 lib/src/entity/service_provider/service_provider_repository.dart create mode 100644 lib/src/entity/source/source.dart create mode 100644 lib/src/entity/source/source.g.dart create mode 100644 lib/src/entity/source/source_repository.dart rename lib/src/{domain => }/entity/tree_type/tree_type.dart (97%) rename lib/src/{domain => }/entity/tree_type/tree_type.g.dart (100%) rename lib/src/{packages/ambito_db/repositories => entity/tree_type}/tree_type_repository.dart (58%) delete mode 100644 lib/src/packages/ambito_api/base.dart create mode 100644 lib/src/packages/ambito_api/base_api.dart create mode 100644 lib/src/packages/ambito_db/repositories/_repositories.dart diff --git a/.env b/.env index 99e17ba..5e194b4 100644 --- a/.env +++ b/.env @@ -1,2 +1,2 @@ BASEROW_TOKEN="TFxO7vzBLVRCu9I3VMoHmTuCvSu8aCDi" -BASEROW_IDS='{"measure": 328253, "measure_combination": 328217, "organism": 328255, "funding_program": 328256, "factsheet": 328273, "standortansprueche": 328188, "referenzumsetzung": 328465, "betriebsverzeichnis": 328472, "erfahrungsbericht": 330802, "genehmigungspflicht": 330806, "dienstleister": 330824, "ansprechperson": 330832, "material": 330836, "quellen": 334231, "tree_type": 342622, "aenderungfactsheet": 330946}' \ No newline at end of file +BASEROW_IDS='{"measure": 328253,"measure_combination": 328217, "organism": 328255, "funding_program": 328256, "factsheet": 328273, "location_requirements": 328188, "reference_implementation": 328465, "business": 328472, "experience_report": 330802, "approval_requirement": 330806, "service_provider": 330824, "service_provider_contact_person": 330832, "material": 330836, "source": 334231, "tree_type": 342622, "aenderungfactsheet": 330946}' \ No newline at end of file diff --git a/lib/main.dart b/lib/main.dart index bd3a134..2440930 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,6 +1,5 @@ -import 'package:ambito/src/domain/entity/entities.dart'; -import 'package:ambito/src/domain/entity/funding_program/funding_program.dart'; -import 'package:ambito/src/packages/ambito_api/base.dart'; +import 'package:ambito/src/packages/ambito_api/base_api.dart'; +import 'package:ambito/src/packages/ambito_db/base_db.dart'; import 'package:ambito/src/pages/loading/loading_page.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; @@ -20,31 +19,23 @@ late Isar isar; void main() async { WidgetsFlutterBinding.ensureInitialized(); - await dotenv.load(fileName: '.env'); - await Isar.initialize(); - const dir = Isar.sqliteInMemory; - const engine = kIsWeb ? IsarEngine.sqlite : IsarEngine.isar; - isar = Isar.open( - schemas: [ - FundingProgramSchema, - MeasureSchema, - MeasureCombinationSchema, - OrganismSchema, - TreeTypeSchema, - ], - directory: dir, - engine: engine, - inspector: true, - ); + await AmbitoIsarDB().init(); await Future.wait([ - BaseApi().getContent('tree_type'), + /*BaseApi().getContent('tree_type'), BaseApi().getContent('measure'), BaseApi().getContent('measure_combination'), BaseApi().getContent('organism'), BaseApi().getContent('funding_program'), + BaseApi().getContent('location_requirements'), + BaseApi().getContent('reference_implementation'), + BaseApi().getContent('business'), + BaseApi().getContent('service_provider'), + BaseApi().getContent('service_provider_contact_person'), + BaseApi().getContent('material'),*/ + BaseApi().getContent('source'), ]); runApp(const Ambito()); diff --git a/lib/src/domain/entity/entities.dart b/lib/src/domain/entity/entities.dart deleted file mode 100644 index 80382b3..0000000 --- a/lib/src/domain/entity/entities.dart +++ /dev/null @@ -1,14 +0,0 @@ -library ambito_entities; - -export 'base_entity.dart'; -export 'general/file/file_part.dart'; -export 'general/file/thumbnail.dart'; -export 'general/file/thumbnails.dart'; -export 'general/id_value/id_value.dart'; -export 'general/id_value_color/id_value_color.dart'; -export 'general/id_value_mix/id_value_mix.dart'; -export 'general/month/month.dart'; -export 'measure/measure.dart'; -export 'measure_combination/measure_combination.dart'; -export 'organism/organism.dart'; -export 'tree_type//tree_type.dart'; diff --git a/lib/src/domain/entity/general/file/file_part.dart b/lib/src/entity/_general/file/file_part.dart similarity index 92% rename from lib/src/domain/entity/general/file/file_part.dart rename to lib/src/entity/_general/file/file_part.dart index a2da222..71443c6 100644 --- a/lib/src/domain/entity/general/file/file_part.dart +++ b/lib/src/entity/_general/file/file_part.dart @@ -1,4 +1,4 @@ -import 'package:ambito/src/domain/entity/entities.dart'; +import 'package:ambito/src/entity/entities.dart'; import 'package:isar/isar.dart'; import 'package:json_annotation/json_annotation.dart'; diff --git a/lib/src/domain/entity/general/file/file_part.g.dart b/lib/src/entity/_general/file/file_part.g.dart similarity index 100% rename from lib/src/domain/entity/general/file/file_part.g.dart rename to lib/src/entity/_general/file/file_part.g.dart diff --git a/lib/src/domain/entity/general/file/thumbnail.dart b/lib/src/entity/_general/file/thumbnail.dart similarity index 100% rename from lib/src/domain/entity/general/file/thumbnail.dart rename to lib/src/entity/_general/file/thumbnail.dart diff --git a/lib/src/domain/entity/general/file/thumbnail.g.dart b/lib/src/entity/_general/file/thumbnail.g.dart similarity index 100% rename from lib/src/domain/entity/general/file/thumbnail.g.dart rename to lib/src/entity/_general/file/thumbnail.g.dart diff --git a/lib/src/domain/entity/general/file/thumbnails.dart b/lib/src/entity/_general/file/thumbnails.dart similarity index 88% rename from lib/src/domain/entity/general/file/thumbnails.dart rename to lib/src/entity/_general/file/thumbnails.dart index 5f9c6df..9018099 100644 --- a/lib/src/domain/entity/general/file/thumbnails.dart +++ b/lib/src/entity/_general/file/thumbnails.dart @@ -1,4 +1,4 @@ -import 'package:ambito/src/domain/entity/entities.dart'; +import 'package:ambito/src/entity/entities.dart'; import 'package:isar/isar.dart'; import 'package:json_annotation/json_annotation.dart'; diff --git a/lib/src/domain/entity/general/file/thumbnails.g.dart b/lib/src/entity/_general/file/thumbnails.g.dart similarity index 100% rename from lib/src/domain/entity/general/file/thumbnails.g.dart rename to lib/src/entity/_general/file/thumbnails.g.dart diff --git a/lib/src/domain/entity/general/id_value/id_value.dart b/lib/src/entity/_general/id_value/id_value.dart similarity index 100% rename from lib/src/domain/entity/general/id_value/id_value.dart rename to lib/src/entity/_general/id_value/id_value.dart diff --git a/lib/src/domain/entity/general/id_value/id_value.g.dart b/lib/src/entity/_general/id_value/id_value.g.dart similarity index 100% rename from lib/src/domain/entity/general/id_value/id_value.g.dart rename to lib/src/entity/_general/id_value/id_value.g.dart diff --git a/lib/src/domain/entity/general/id_value_color/id_value_color.dart b/lib/src/entity/_general/id_value_color/id_value_color.dart similarity index 100% rename from lib/src/domain/entity/general/id_value_color/id_value_color.dart rename to lib/src/entity/_general/id_value_color/id_value_color.dart diff --git a/lib/src/domain/entity/general/id_value_color/id_value_color.g.dart b/lib/src/entity/_general/id_value_color/id_value_color.g.dart similarity index 100% rename from lib/src/domain/entity/general/id_value_color/id_value_color.g.dart rename to lib/src/entity/_general/id_value_color/id_value_color.g.dart diff --git a/lib/src/domain/entity/general/id_value_mix/id_value_mix.dart b/lib/src/entity/_general/id_value_mix/id_value_mix.dart similarity index 87% rename from lib/src/domain/entity/general/id_value_mix/id_value_mix.dart rename to lib/src/entity/_general/id_value_mix/id_value_mix.dart index 41a0bf2..9a6dc26 100644 --- a/lib/src/domain/entity/general/id_value_mix/id_value_mix.dart +++ b/lib/src/entity/_general/id_value_mix/id_value_mix.dart @@ -1,4 +1,4 @@ -import 'package:ambito/src/domain/entity/entities.dart'; +import 'package:ambito/src/entity/entities.dart'; import 'package:isar/isar.dart'; import 'package:json_annotation/json_annotation.dart'; diff --git a/lib/src/domain/entity/general/id_value_mix/id_value_mix.g.dart b/lib/src/entity/_general/id_value_mix/id_value_mix.g.dart similarity index 100% rename from lib/src/domain/entity/general/id_value_mix/id_value_mix.g.dart rename to lib/src/entity/_general/id_value_mix/id_value_mix.g.dart diff --git a/lib/src/domain/entity/general/month/month.dart b/lib/src/entity/_general/month/month.dart similarity index 100% rename from lib/src/domain/entity/general/month/month.dart rename to lib/src/entity/_general/month/month.dart diff --git a/lib/src/entity/approval_requirement/approval_requirement.dart b/lib/src/entity/approval_requirement/approval_requirement.dart new file mode 100644 index 0000000..328c5ab --- /dev/null +++ b/lib/src/entity/approval_requirement/approval_requirement.dart @@ -0,0 +1,30 @@ +import 'package:ambito/src/entity/_general/id_value/id_value.dart'; +import 'package:ambito/src/entity/_general/id_value_color/id_value_color.dart'; +import 'package:ambito/src/entity/base_entity.dart'; +import 'package:isar/isar.dart'; +import 'package:json_annotation/json_annotation.dart'; + +part 'approval_requirement.g.dart'; + +@JsonSerializable(explicitToJson: true) +@collection +class ApprovalRequirement extends BaseEntity with EntityWithId { + ApprovalRequirement(); + + @JsonKey(name: 'Name der Genehmigung') + @Index() + String? name; + @JsonKey(name: 'Anmerkungen') + String? notes; + @JsonKey(name: 'Maßnahme') + List? measures; + @JsonKey(name: 'Behörde') + List? authority; + @JsonKey(name: 'Art der Genehmigung') + List? typeOfApproval; + + factory ApprovalRequirement.fromJson(Map json) => + _$ApprovalRequirementFromJson(json); + + Map toJson() => _$ApprovalRequirementToJson(this); +} diff --git a/lib/src/entity/approval_requirement/approval_requirement.g.dart b/lib/src/entity/approval_requirement/approval_requirement.g.dart new file mode 100644 index 0000000..fe4975f --- /dev/null +++ b/lib/src/entity/approval_requirement/approval_requirement.g.dart @@ -0,0 +1,1303 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'approval_requirement.dart'; + +// ************************************************************************** +// _IsarCollectionGenerator +// ************************************************************************** + +// coverage:ignore-file +// ignore_for_file: duplicate_ignore, invalid_use_of_protected_member, lines_longer_than_80_chars, constant_identifier_names, avoid_js_rounded_ints, no_leading_underscores_for_local_identifiers, require_trailing_commas, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_in_if_null_operators, library_private_types_in_public_api, prefer_const_constructors +// ignore_for_file: type=lint + +extension GetApprovalRequirementCollection on Isar { + IsarCollection get approvalRequirements => + this.collection(); +} + +const ApprovalRequirementSchema = IsarGeneratedSchema( + schema: IsarSchema( + name: 'ApprovalRequirement', + idName: 'id', + embedded: false, + properties: [ + IsarPropertySchema( + name: 'name', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'notes', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'measures', + type: IsarType.objectList, + target: 'IdValue', + ), + IsarPropertySchema( + name: 'authority', + type: IsarType.objectList, + target: 'IdValueColor', + ), + IsarPropertySchema( + name: 'typeOfApproval', + type: IsarType.objectList, + target: 'IdValueColor', + ), + ], + indexes: [ + IsarIndexSchema( + name: 'name', + properties: [ + "name", + ], + unique: false, + hash: false, + ), + ], + ), + converter: IsarObjectConverter( + serialize: serializeApprovalRequirement, + deserialize: deserializeApprovalRequirement, + deserializeProperty: deserializeApprovalRequirementProp, + ), + embeddedSchemas: [IdValueSchema, IdValueColorSchema], +); + +@isarProtected +int serializeApprovalRequirement( + IsarWriter writer, ApprovalRequirement object) { + { + final value = object.name; + if (value == null) { + IsarCore.writeNull(writer, 1); + } else { + IsarCore.writeString(writer, 1, value); + } + } + { + final value = object.notes; + if (value == null) { + IsarCore.writeNull(writer, 2); + } else { + IsarCore.writeString(writer, 2, value); + } + } + { + final list = object.measures; + if (list == null) { + IsarCore.writeNull(writer, 3); + } else { + final listWriter = IsarCore.beginList(writer, 3, list.length); + for (var i = 0; i < list.length; i++) { + { + final value = list[i]; + final objectWriter = IsarCore.beginObject(listWriter, i); + serializeIdValue(objectWriter, value); + IsarCore.endObject(listWriter, objectWriter); + } + } + IsarCore.endList(writer, listWriter); + } + } + { + final list = object.authority; + if (list == null) { + IsarCore.writeNull(writer, 4); + } else { + final listWriter = IsarCore.beginList(writer, 4, list.length); + for (var i = 0; i < list.length; i++) { + { + final value = list[i]; + final objectWriter = IsarCore.beginObject(listWriter, i); + serializeIdValueColor(objectWriter, value); + IsarCore.endObject(listWriter, objectWriter); + } + } + IsarCore.endList(writer, listWriter); + } + } + { + final list = object.typeOfApproval; + if (list == null) { + IsarCore.writeNull(writer, 5); + } else { + final listWriter = IsarCore.beginList(writer, 5, list.length); + for (var i = 0; i < list.length; i++) { + { + final value = list[i]; + final objectWriter = IsarCore.beginObject(listWriter, i); + serializeIdValueColor(objectWriter, value); + IsarCore.endObject(listWriter, objectWriter); + } + } + IsarCore.endList(writer, listWriter); + } + } + return object.id; +} + +@isarProtected +ApprovalRequirement deserializeApprovalRequirement(IsarReader reader) { + final object = ApprovalRequirement(); + object.name = IsarCore.readString(reader, 1); + object.notes = IsarCore.readString(reader, 2); + { + final length = IsarCore.readList(reader, 3, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.measures = null; + } else { + final list = List.filled(length, IdValue(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValue(); + } else { + final embedded = deserializeIdValue(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + object.measures = list; + } + } + } + { + final length = IsarCore.readList(reader, 4, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.authority = null; + } else { + final list = + List.filled(length, IdValueColor(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValueColor(); + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + object.authority = list; + } + } + } + { + final length = IsarCore.readList(reader, 5, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.typeOfApproval = null; + } else { + final list = + List.filled(length, IdValueColor(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValueColor(); + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + object.typeOfApproval = list; + } + } + } + object.id = IsarCore.readId(reader); + return object; +} + +@isarProtected +dynamic deserializeApprovalRequirementProp(IsarReader reader, int property) { + switch (property) { + case 1: + return IsarCore.readString(reader, 1); + case 2: + return IsarCore.readString(reader, 2); + case 3: + { + final length = IsarCore.readList(reader, 3, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = + List.filled(length, IdValue(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValue(); + } else { + final embedded = deserializeIdValue(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 4: + { + final length = IsarCore.readList(reader, 4, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = List.filled(length, IdValueColor(), + growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValueColor(); + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 5: + { + final length = IsarCore.readList(reader, 5, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = List.filled(length, IdValueColor(), + growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValueColor(); + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 0: + return IsarCore.readId(reader); + default: + throw ArgumentError('Unknown property: $property'); + } +} + +sealed class _ApprovalRequirementUpdate { + bool call({ + required int id, + String? name, + String? notes, + }); +} + +class _ApprovalRequirementUpdateImpl implements _ApprovalRequirementUpdate { + const _ApprovalRequirementUpdateImpl(this.collection); + + final IsarCollection collection; + + @override + bool call({ + required int id, + Object? name = ignore, + Object? notes = ignore, + }) { + return collection.updateProperties([ + id + ], { + if (name != ignore) 1: name as String?, + if (notes != ignore) 2: notes as String?, + }) > + 0; + } +} + +sealed class _ApprovalRequirementUpdateAll { + int call({ + required List id, + String? name, + String? notes, + }); +} + +class _ApprovalRequirementUpdateAllImpl + implements _ApprovalRequirementUpdateAll { + const _ApprovalRequirementUpdateAllImpl(this.collection); + + final IsarCollection collection; + + @override + int call({ + required List id, + Object? name = ignore, + Object? notes = ignore, + }) { + return collection.updateProperties(id, { + if (name != ignore) 1: name as String?, + if (notes != ignore) 2: notes as String?, + }); + } +} + +extension ApprovalRequirementUpdate + on IsarCollection { + _ApprovalRequirementUpdate get update => _ApprovalRequirementUpdateImpl(this); + + _ApprovalRequirementUpdateAll get updateAll => + _ApprovalRequirementUpdateAllImpl(this); +} + +sealed class _ApprovalRequirementQueryUpdate { + int call({ + String? name, + String? notes, + }); +} + +class _ApprovalRequirementQueryUpdateImpl + implements _ApprovalRequirementQueryUpdate { + const _ApprovalRequirementQueryUpdateImpl(this.query, {this.limit}); + + final IsarQuery query; + final int? limit; + + @override + int call({ + Object? name = ignore, + Object? notes = ignore, + }) { + return query.updateProperties(limit: limit, { + if (name != ignore) 1: name as String?, + if (notes != ignore) 2: notes as String?, + }); + } +} + +extension ApprovalRequirementQueryUpdate on IsarQuery { + _ApprovalRequirementQueryUpdate get updateFirst => + _ApprovalRequirementQueryUpdateImpl(this, limit: 1); + + _ApprovalRequirementQueryUpdate get updateAll => + _ApprovalRequirementQueryUpdateImpl(this); +} + +class _ApprovalRequirementQueryBuilderUpdateImpl + implements _ApprovalRequirementQueryUpdate { + const _ApprovalRequirementQueryBuilderUpdateImpl(this.query, {this.limit}); + + final QueryBuilder + query; + final int? limit; + + @override + int call({ + Object? name = ignore, + Object? notes = ignore, + }) { + final q = query.build(); + try { + return q.updateProperties(limit: limit, { + if (name != ignore) 1: name as String?, + if (notes != ignore) 2: notes as String?, + }); + } finally { + q.close(); + } + } +} + +extension ApprovalRequirementQueryBuilderUpdate + on QueryBuilder { + _ApprovalRequirementQueryUpdate get updateFirst => + _ApprovalRequirementQueryBuilderUpdateImpl(this, limit: 1); + + _ApprovalRequirementQueryUpdate get updateAll => + _ApprovalRequirementQueryBuilderUpdateImpl(this); +} + +extension ApprovalRequirementQueryFilter on QueryBuilder { + QueryBuilder + nameIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 1)); + }); + } + + QueryBuilder + nameIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 1)); + }); + } + + QueryBuilder + nameEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + nameGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + nameGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + nameLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + nameLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + nameBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 1, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + nameStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + nameEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + nameContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + nameMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 1, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + nameIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 1, + value: '', + ), + ); + }); + } + + QueryBuilder + nameIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 1, + value: '', + ), + ); + }); + } + + QueryBuilder + notesIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 2)); + }); + } + + QueryBuilder + notesIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 2)); + }); + } + + QueryBuilder + notesEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + notesGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + notesGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + notesLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + notesLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + notesBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 2, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + notesStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + notesEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + notesContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + notesMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 2, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + notesIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 2, + value: '', + ), + ); + }); + } + + QueryBuilder + notesIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 2, + value: '', + ), + ); + }); + } + + QueryBuilder + measuresIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 3)); + }); + } + + QueryBuilder + measuresIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 3)); + }); + } + + QueryBuilder + measuresIsEmpty() { + return not().group( + (q) => q.measuresIsNull().or().measuresIsNotEmpty(), + ); + } + + QueryBuilder + measuresIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 3, value: null), + ); + }); + } + + QueryBuilder + authorityIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 4)); + }); + } + + QueryBuilder + authorityIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 4)); + }); + } + + QueryBuilder + authorityIsEmpty() { + return not().group( + (q) => q.authorityIsNull().or().authorityIsNotEmpty(), + ); + } + + QueryBuilder + authorityIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 4, value: null), + ); + }); + } + + QueryBuilder + typeOfApprovalIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 5)); + }); + } + + QueryBuilder + typeOfApprovalIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 5)); + }); + } + + QueryBuilder + typeOfApprovalIsEmpty() { + return not().group( + (q) => q.typeOfApprovalIsNull().or().typeOfApprovalIsNotEmpty(), + ); + } + + QueryBuilder + typeOfApprovalIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 5, value: null), + ); + }); + } + + QueryBuilder + idEqualTo( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder + idGreaterThan( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder + idGreaterThanOrEqualTo( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder + idLessThan( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder + idLessThanOrEqualTo( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder + idBetween( + int lower, + int upper, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 0, + lower: lower, + upper: upper, + ), + ); + }); + } +} + +extension ApprovalRequirementQueryObject on QueryBuilder {} + +extension ApprovalRequirementQuerySortBy + on QueryBuilder { + QueryBuilder + sortByName({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 1, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByNameDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 1, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByNotes({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 2, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByNotesDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 2, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortById() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0); + }); + } + + QueryBuilder + sortByIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0, sort: Sort.desc); + }); + } +} + +extension ApprovalRequirementQuerySortThenBy + on QueryBuilder { + QueryBuilder + thenByName({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(1, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByNameDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(1, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByNotes({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(2, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByNotesDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(2, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenById() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0); + }); + } + + QueryBuilder + thenByIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0, sort: Sort.desc); + }); + } +} + +extension ApprovalRequirementQueryWhereDistinct + on QueryBuilder { + QueryBuilder + distinctByName({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(1, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByNotes({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(2, caseSensitive: caseSensitive); + }); + } +} + +extension ApprovalRequirementQueryProperty1 + on QueryBuilder { + QueryBuilder nameProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(1); + }); + } + + QueryBuilder notesProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(2); + }); + } + + QueryBuilder?, QAfterProperty> + measuresProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(3); + }); + } + + QueryBuilder?, QAfterProperty> + authorityProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(4); + }); + } + + QueryBuilder?, QAfterProperty> + typeOfApprovalProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(5); + }); + } + + QueryBuilder idProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(0); + }); + } +} + +extension ApprovalRequirementQueryProperty2 + on QueryBuilder { + QueryBuilder + nameProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(1); + }); + } + + QueryBuilder + notesProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(2); + }); + } + + QueryBuilder?), QAfterProperty> + measuresProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(3); + }); + } + + QueryBuilder?), QAfterProperty> + authorityProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(4); + }); + } + + QueryBuilder?), QAfterProperty> + typeOfApprovalProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(5); + }); + } + + QueryBuilder idProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(0); + }); + } +} + +extension ApprovalRequirementQueryProperty3 + on QueryBuilder { + QueryBuilder + nameProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(1); + }); + } + + QueryBuilder + notesProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(2); + }); + } + + QueryBuilder?), QOperations> + measuresProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(3); + }); + } + + QueryBuilder?), QOperations> + authorityProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(4); + }); + } + + QueryBuilder?), QOperations> + typeOfApprovalProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(5); + }); + } + + QueryBuilder idProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(0); + }); + } +} + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +ApprovalRequirement _$ApprovalRequirementFromJson(Map json) => + ApprovalRequirement() + ..id = (json['id'] as num).toInt() + ..name = json['Name der Genehmigung'] as String? + ..notes = json['Anmerkungen'] as String? + ..measures = (json['Maßnahme'] as List?) + ?.map((e) => IdValue.fromJson(e as Map)) + .toList() + ..authority = (json['Behörde'] as List?) + ?.map((e) => IdValueColor.fromJson(e as Map)) + .toList() + ..typeOfApproval = (json['Art der Genehmigung'] as List?) + ?.map((e) => IdValueColor.fromJson(e as Map)) + .toList(); + +Map _$ApprovalRequirementToJson( + ApprovalRequirement instance) => + { + 'id': instance.id, + 'Name der Genehmigung': instance.name, + 'Anmerkungen': instance.notes, + 'Maßnahme': instance.measures?.map((e) => e.toJson()).toList(), + 'Behörde': instance.authority?.map((e) => e.toJson()).toList(), + 'Art der Genehmigung': + instance.typeOfApproval?.map((e) => e.toJson()).toList(), + }; diff --git a/lib/src/entity/approval_requirement/approval_requirement_repository.dart b/lib/src/entity/approval_requirement/approval_requirement_repository.dart new file mode 100644 index 0000000..5be56ac --- /dev/null +++ b/lib/src/entity/approval_requirement/approval_requirement_repository.dart @@ -0,0 +1,10 @@ +import 'package:ambito/src/entity/entities.dart'; +import 'package:ambito/src/packages/ambito_db/base_db.dart'; +import 'package:isar/isar.dart'; + +import '../../../../main.dart'; + +class ApprovalRequirementRepository extends BaseDB { + @override + IsarCollection collection = isar.approvalRequirements; +} diff --git a/lib/src/domain/entity/base_entity.dart b/lib/src/entity/base_entity.dart similarity index 100% rename from lib/src/domain/entity/base_entity.dart rename to lib/src/entity/base_entity.dart diff --git a/lib/src/entity/business/business.dart b/lib/src/entity/business/business.dart new file mode 100644 index 0000000..c7e7e36 --- /dev/null +++ b/lib/src/entity/business/business.dart @@ -0,0 +1,73 @@ +import 'package:ambito/src/entity/entities.dart'; +import 'package:isar/isar.dart'; +import 'package:json_annotation/json_annotation.dart'; + +part 'business.g.dart'; + +@JsonSerializable(explicitToJson: true) +@collection +class Business extends BaseEntity with EntityWithId { + Business(); + + @JsonKey(name: 'Modellbetrieb') + @Index() + String? name; + + @JsonKey(name: 'Ursprungsgebiet') + IdValueColor? areaOfOrigin; + @JsonKey(name: 'Ansprechpartner') + String? businessOwner; + @JsonKey(name: 'Feld 6') + String? businessEmail; + @JsonKey(name: 'Feld 7') + String? businessPhone; + @JsonKey(name: 'Feld 8') + String? contactName; + @JsonKey(name: 'Feld 9') + String? contactPosition; + @JsonKey(name: 'Feld 10') + String? contactEmail; + @JsonKey(name: 'Feld 11') + String? contactPhone; + @JsonKey(name: 'Feld 12') + String? contact2Name; + @JsonKey(name: 'Feld 13') + String? contact2Position; + @JsonKey(name: 'Feld 14') + String? contact2Email; + @JsonKey(name: 'Feld 15') + String? contact2Phone; + @JsonKey(name: 'Feld 16') + String? contact3Name; + @JsonKey(name: 'Feld 17') + String? contact3Email; + @JsonKey(name: 'Feld 18') + String? addressComplete; + @JsonKey(name: 'Feld 19') + String? addressStreet; + @JsonKey(name: 'Feld 20') + String? addressPostalCode; + @JsonKey(name: 'Feld 21') + String? addressCity; + @JsonKey(name: 'Feld 22') + String? addressRegion; + @JsonKey(name: 'Feld 23') + String? addressFederalState; + @JsonKey(name: 'Feld 24') + String? unknown; + @JsonKey(name: 'Feld 25') + String? businessType; + @JsonKey(name: 'Region') + String? region; + @JsonKey(name: 'Umgesetze_Maßnahmen') + List? measures; + @JsonKey(name: '05 Referenzumsetzung') + List? referenceImplementation; + @JsonKey(name: '07 Erfahrungsbericht Umsetuzung') + List? experienceReport; + + factory Business.fromJson(Map json) => + _$BusinessFromJson(json); + + Map toJson() => _$BusinessToJson(this); +} diff --git a/lib/src/entity/business/business.g.dart b/lib/src/entity/business/business.g.dart new file mode 100644 index 0000000..7ee84b6 --- /dev/null +++ b/lib/src/entity/business/business.g.dart @@ -0,0 +1,7238 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'business.dart'; + +// ************************************************************************** +// _IsarCollectionGenerator +// ************************************************************************** + +// coverage:ignore-file +// ignore_for_file: duplicate_ignore, invalid_use_of_protected_member, lines_longer_than_80_chars, constant_identifier_names, avoid_js_rounded_ints, no_leading_underscores_for_local_identifiers, require_trailing_commas, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_in_if_null_operators, library_private_types_in_public_api, prefer_const_constructors +// ignore_for_file: type=lint + +extension GetBusinessCollection on Isar { + IsarCollection get business => this.collection(); +} + +const BusinessSchema = IsarGeneratedSchema( + schema: IsarSchema( + name: 'Business', + idName: 'id', + embedded: false, + properties: [ + IsarPropertySchema( + name: 'name', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'areaOfOrigin', + type: IsarType.object, + target: 'IdValueColor', + ), + IsarPropertySchema( + name: 'businessOwner', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'businessEmail', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'businessPhone', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'contactName', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'contactPosition', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'contactEmail', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'contactPhone', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'contact2Name', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'contact2Position', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'contact2Email', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'contact2Phone', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'contact3Name', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'contact3Email', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'addressComplete', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'addressStreet', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'addressPostalCode', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'addressCity', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'addressRegion', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'addressFederalState', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'unknown', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'businessType', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'region', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'measures', + type: IsarType.objectList, + target: 'IdValueColor', + ), + IsarPropertySchema( + name: 'referenceImplementation', + type: IsarType.objectList, + target: 'IdValueColor', + ), + IsarPropertySchema( + name: 'experienceReport', + type: IsarType.objectList, + target: 'IdValueColor', + ), + ], + indexes: [ + IsarIndexSchema( + name: 'name', + properties: [ + "name", + ], + unique: false, + hash: false, + ), + ], + ), + converter: IsarObjectConverter( + serialize: serializeBusiness, + deserialize: deserializeBusiness, + deserializeProperty: deserializeBusinessProp, + ), + embeddedSchemas: [IdValueColorSchema], +); + +@isarProtected +int serializeBusiness(IsarWriter writer, Business object) { + { + final value = object.name; + if (value == null) { + IsarCore.writeNull(writer, 1); + } else { + IsarCore.writeString(writer, 1, value); + } + } + { + final value = object.areaOfOrigin; + if (value == null) { + IsarCore.writeNull(writer, 2); + } else { + final objectWriter = IsarCore.beginObject(writer, 2); + serializeIdValueColor(objectWriter, value); + IsarCore.endObject(writer, objectWriter); + } + } + { + final value = object.businessOwner; + if (value == null) { + IsarCore.writeNull(writer, 3); + } else { + IsarCore.writeString(writer, 3, value); + } + } + { + final value = object.businessEmail; + if (value == null) { + IsarCore.writeNull(writer, 4); + } else { + IsarCore.writeString(writer, 4, value); + } + } + { + final value = object.businessPhone; + if (value == null) { + IsarCore.writeNull(writer, 5); + } else { + IsarCore.writeString(writer, 5, value); + } + } + { + final value = object.contactName; + if (value == null) { + IsarCore.writeNull(writer, 6); + } else { + IsarCore.writeString(writer, 6, value); + } + } + { + final value = object.contactPosition; + if (value == null) { + IsarCore.writeNull(writer, 7); + } else { + IsarCore.writeString(writer, 7, value); + } + } + { + final value = object.contactEmail; + if (value == null) { + IsarCore.writeNull(writer, 8); + } else { + IsarCore.writeString(writer, 8, value); + } + } + { + final value = object.contactPhone; + if (value == null) { + IsarCore.writeNull(writer, 9); + } else { + IsarCore.writeString(writer, 9, value); + } + } + { + final value = object.contact2Name; + if (value == null) { + IsarCore.writeNull(writer, 10); + } else { + IsarCore.writeString(writer, 10, value); + } + } + { + final value = object.contact2Position; + if (value == null) { + IsarCore.writeNull(writer, 11); + } else { + IsarCore.writeString(writer, 11, value); + } + } + { + final value = object.contact2Email; + if (value == null) { + IsarCore.writeNull(writer, 12); + } else { + IsarCore.writeString(writer, 12, value); + } + } + { + final value = object.contact2Phone; + if (value == null) { + IsarCore.writeNull(writer, 13); + } else { + IsarCore.writeString(writer, 13, value); + } + } + { + final value = object.contact3Name; + if (value == null) { + IsarCore.writeNull(writer, 14); + } else { + IsarCore.writeString(writer, 14, value); + } + } + { + final value = object.contact3Email; + if (value == null) { + IsarCore.writeNull(writer, 15); + } else { + IsarCore.writeString(writer, 15, value); + } + } + { + final value = object.addressComplete; + if (value == null) { + IsarCore.writeNull(writer, 16); + } else { + IsarCore.writeString(writer, 16, value); + } + } + { + final value = object.addressStreet; + if (value == null) { + IsarCore.writeNull(writer, 17); + } else { + IsarCore.writeString(writer, 17, value); + } + } + { + final value = object.addressPostalCode; + if (value == null) { + IsarCore.writeNull(writer, 18); + } else { + IsarCore.writeString(writer, 18, value); + } + } + { + final value = object.addressCity; + if (value == null) { + IsarCore.writeNull(writer, 19); + } else { + IsarCore.writeString(writer, 19, value); + } + } + { + final value = object.addressRegion; + if (value == null) { + IsarCore.writeNull(writer, 20); + } else { + IsarCore.writeString(writer, 20, value); + } + } + { + final value = object.addressFederalState; + if (value == null) { + IsarCore.writeNull(writer, 21); + } else { + IsarCore.writeString(writer, 21, value); + } + } + { + final value = object.unknown; + if (value == null) { + IsarCore.writeNull(writer, 22); + } else { + IsarCore.writeString(writer, 22, value); + } + } + { + final value = object.businessType; + if (value == null) { + IsarCore.writeNull(writer, 23); + } else { + IsarCore.writeString(writer, 23, value); + } + } + { + final value = object.region; + if (value == null) { + IsarCore.writeNull(writer, 24); + } else { + IsarCore.writeString(writer, 24, value); + } + } + { + final list = object.measures; + if (list == null) { + IsarCore.writeNull(writer, 25); + } else { + final listWriter = IsarCore.beginList(writer, 25, list.length); + for (var i = 0; i < list.length; i++) { + { + final value = list[i]; + final objectWriter = IsarCore.beginObject(listWriter, i); + serializeIdValueColor(objectWriter, value); + IsarCore.endObject(listWriter, objectWriter); + } + } + IsarCore.endList(writer, listWriter); + } + } + { + final list = object.referenceImplementation; + if (list == null) { + IsarCore.writeNull(writer, 26); + } else { + final listWriter = IsarCore.beginList(writer, 26, list.length); + for (var i = 0; i < list.length; i++) { + { + final value = list[i]; + final objectWriter = IsarCore.beginObject(listWriter, i); + serializeIdValueColor(objectWriter, value); + IsarCore.endObject(listWriter, objectWriter); + } + } + IsarCore.endList(writer, listWriter); + } + } + { + final list = object.experienceReport; + if (list == null) { + IsarCore.writeNull(writer, 27); + } else { + final listWriter = IsarCore.beginList(writer, 27, list.length); + for (var i = 0; i < list.length; i++) { + { + final value = list[i]; + final objectWriter = IsarCore.beginObject(listWriter, i); + serializeIdValueColor(objectWriter, value); + IsarCore.endObject(listWriter, objectWriter); + } + } + IsarCore.endList(writer, listWriter); + } + } + return object.id; +} + +@isarProtected +Business deserializeBusiness(IsarReader reader) { + final object = Business(); + object.name = IsarCore.readString(reader, 1); + { + final objectReader = IsarCore.readObject(reader, 2); + if (objectReader.isNull) { + object.areaOfOrigin = null; + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + object.areaOfOrigin = embedded; + } + } + object.businessOwner = IsarCore.readString(reader, 3); + object.businessEmail = IsarCore.readString(reader, 4); + object.businessPhone = IsarCore.readString(reader, 5); + object.contactName = IsarCore.readString(reader, 6); + object.contactPosition = IsarCore.readString(reader, 7); + object.contactEmail = IsarCore.readString(reader, 8); + object.contactPhone = IsarCore.readString(reader, 9); + object.contact2Name = IsarCore.readString(reader, 10); + object.contact2Position = IsarCore.readString(reader, 11); + object.contact2Email = IsarCore.readString(reader, 12); + object.contact2Phone = IsarCore.readString(reader, 13); + object.contact3Name = IsarCore.readString(reader, 14); + object.contact3Email = IsarCore.readString(reader, 15); + object.addressComplete = IsarCore.readString(reader, 16); + object.addressStreet = IsarCore.readString(reader, 17); + object.addressPostalCode = IsarCore.readString(reader, 18); + object.addressCity = IsarCore.readString(reader, 19); + object.addressRegion = IsarCore.readString(reader, 20); + object.addressFederalState = IsarCore.readString(reader, 21); + object.unknown = IsarCore.readString(reader, 22); + object.businessType = IsarCore.readString(reader, 23); + object.region = IsarCore.readString(reader, 24); + { + final length = IsarCore.readList(reader, 25, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.measures = null; + } else { + final list = + List.filled(length, IdValueColor(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValueColor(); + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + object.measures = list; + } + } + } + { + final length = IsarCore.readList(reader, 26, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.referenceImplementation = null; + } else { + final list = + List.filled(length, IdValueColor(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValueColor(); + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + object.referenceImplementation = list; + } + } + } + { + final length = IsarCore.readList(reader, 27, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.experienceReport = null; + } else { + final list = + List.filled(length, IdValueColor(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValueColor(); + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + object.experienceReport = list; + } + } + } + object.id = IsarCore.readId(reader); + return object; +} + +@isarProtected +dynamic deserializeBusinessProp(IsarReader reader, int property) { + switch (property) { + case 1: + return IsarCore.readString(reader, 1); + case 2: + { + final objectReader = IsarCore.readObject(reader, 2); + if (objectReader.isNull) { + return null; + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + return embedded; + } + } + case 3: + return IsarCore.readString(reader, 3); + case 4: + return IsarCore.readString(reader, 4); + case 5: + return IsarCore.readString(reader, 5); + case 6: + return IsarCore.readString(reader, 6); + case 7: + return IsarCore.readString(reader, 7); + case 8: + return IsarCore.readString(reader, 8); + case 9: + return IsarCore.readString(reader, 9); + case 10: + return IsarCore.readString(reader, 10); + case 11: + return IsarCore.readString(reader, 11); + case 12: + return IsarCore.readString(reader, 12); + case 13: + return IsarCore.readString(reader, 13); + case 14: + return IsarCore.readString(reader, 14); + case 15: + return IsarCore.readString(reader, 15); + case 16: + return IsarCore.readString(reader, 16); + case 17: + return IsarCore.readString(reader, 17); + case 18: + return IsarCore.readString(reader, 18); + case 19: + return IsarCore.readString(reader, 19); + case 20: + return IsarCore.readString(reader, 20); + case 21: + return IsarCore.readString(reader, 21); + case 22: + return IsarCore.readString(reader, 22); + case 23: + return IsarCore.readString(reader, 23); + case 24: + return IsarCore.readString(reader, 24); + case 25: + { + final length = IsarCore.readList(reader, 25, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = List.filled(length, IdValueColor(), + growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValueColor(); + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 26: + { + final length = IsarCore.readList(reader, 26, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = List.filled(length, IdValueColor(), + growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValueColor(); + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 27: + { + final length = IsarCore.readList(reader, 27, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = List.filled(length, IdValueColor(), + growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValueColor(); + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 0: + return IsarCore.readId(reader); + default: + throw ArgumentError('Unknown property: $property'); + } +} + +sealed class _BusinessUpdate { + bool call({ + required int id, + String? name, + String? businessOwner, + String? businessEmail, + String? businessPhone, + String? contactName, + String? contactPosition, + String? contactEmail, + String? contactPhone, + String? contact2Name, + String? contact2Position, + String? contact2Email, + String? contact2Phone, + String? contact3Name, + String? contact3Email, + String? addressComplete, + String? addressStreet, + String? addressPostalCode, + String? addressCity, + String? addressRegion, + String? addressFederalState, + String? unknown, + String? businessType, + String? region, + }); +} + +class _BusinessUpdateImpl implements _BusinessUpdate { + const _BusinessUpdateImpl(this.collection); + + final IsarCollection collection; + + @override + bool call({ + required int id, + Object? name = ignore, + Object? businessOwner = ignore, + Object? businessEmail = ignore, + Object? businessPhone = ignore, + Object? contactName = ignore, + Object? contactPosition = ignore, + Object? contactEmail = ignore, + Object? contactPhone = ignore, + Object? contact2Name = ignore, + Object? contact2Position = ignore, + Object? contact2Email = ignore, + Object? contact2Phone = ignore, + Object? contact3Name = ignore, + Object? contact3Email = ignore, + Object? addressComplete = ignore, + Object? addressStreet = ignore, + Object? addressPostalCode = ignore, + Object? addressCity = ignore, + Object? addressRegion = ignore, + Object? addressFederalState = ignore, + Object? unknown = ignore, + Object? businessType = ignore, + Object? region = ignore, + }) { + return collection.updateProperties([ + id + ], { + if (name != ignore) 1: name as String?, + if (businessOwner != ignore) 3: businessOwner as String?, + if (businessEmail != ignore) 4: businessEmail as String?, + if (businessPhone != ignore) 5: businessPhone as String?, + if (contactName != ignore) 6: contactName as String?, + if (contactPosition != ignore) 7: contactPosition as String?, + if (contactEmail != ignore) 8: contactEmail as String?, + if (contactPhone != ignore) 9: contactPhone as String?, + if (contact2Name != ignore) 10: contact2Name as String?, + if (contact2Position != ignore) 11: contact2Position as String?, + if (contact2Email != ignore) 12: contact2Email as String?, + if (contact2Phone != ignore) 13: contact2Phone as String?, + if (contact3Name != ignore) 14: contact3Name as String?, + if (contact3Email != ignore) 15: contact3Email as String?, + if (addressComplete != ignore) 16: addressComplete as String?, + if (addressStreet != ignore) 17: addressStreet as String?, + if (addressPostalCode != ignore) 18: addressPostalCode as String?, + if (addressCity != ignore) 19: addressCity as String?, + if (addressRegion != ignore) 20: addressRegion as String?, + if (addressFederalState != ignore) 21: addressFederalState as String?, + if (unknown != ignore) 22: unknown as String?, + if (businessType != ignore) 23: businessType as String?, + if (region != ignore) 24: region as String?, + }) > + 0; + } +} + +sealed class _BusinessUpdateAll { + int call({ + required List id, + String? name, + String? businessOwner, + String? businessEmail, + String? businessPhone, + String? contactName, + String? contactPosition, + String? contactEmail, + String? contactPhone, + String? contact2Name, + String? contact2Position, + String? contact2Email, + String? contact2Phone, + String? contact3Name, + String? contact3Email, + String? addressComplete, + String? addressStreet, + String? addressPostalCode, + String? addressCity, + String? addressRegion, + String? addressFederalState, + String? unknown, + String? businessType, + String? region, + }); +} + +class _BusinessUpdateAllImpl implements _BusinessUpdateAll { + const _BusinessUpdateAllImpl(this.collection); + + final IsarCollection collection; + + @override + int call({ + required List id, + Object? name = ignore, + Object? businessOwner = ignore, + Object? businessEmail = ignore, + Object? businessPhone = ignore, + Object? contactName = ignore, + Object? contactPosition = ignore, + Object? contactEmail = ignore, + Object? contactPhone = ignore, + Object? contact2Name = ignore, + Object? contact2Position = ignore, + Object? contact2Email = ignore, + Object? contact2Phone = ignore, + Object? contact3Name = ignore, + Object? contact3Email = ignore, + Object? addressComplete = ignore, + Object? addressStreet = ignore, + Object? addressPostalCode = ignore, + Object? addressCity = ignore, + Object? addressRegion = ignore, + Object? addressFederalState = ignore, + Object? unknown = ignore, + Object? businessType = ignore, + Object? region = ignore, + }) { + return collection.updateProperties(id, { + if (name != ignore) 1: name as String?, + if (businessOwner != ignore) 3: businessOwner as String?, + if (businessEmail != ignore) 4: businessEmail as String?, + if (businessPhone != ignore) 5: businessPhone as String?, + if (contactName != ignore) 6: contactName as String?, + if (contactPosition != ignore) 7: contactPosition as String?, + if (contactEmail != ignore) 8: contactEmail as String?, + if (contactPhone != ignore) 9: contactPhone as String?, + if (contact2Name != ignore) 10: contact2Name as String?, + if (contact2Position != ignore) 11: contact2Position as String?, + if (contact2Email != ignore) 12: contact2Email as String?, + if (contact2Phone != ignore) 13: contact2Phone as String?, + if (contact3Name != ignore) 14: contact3Name as String?, + if (contact3Email != ignore) 15: contact3Email as String?, + if (addressComplete != ignore) 16: addressComplete as String?, + if (addressStreet != ignore) 17: addressStreet as String?, + if (addressPostalCode != ignore) 18: addressPostalCode as String?, + if (addressCity != ignore) 19: addressCity as String?, + if (addressRegion != ignore) 20: addressRegion as String?, + if (addressFederalState != ignore) 21: addressFederalState as String?, + if (unknown != ignore) 22: unknown as String?, + if (businessType != ignore) 23: businessType as String?, + if (region != ignore) 24: region as String?, + }); + } +} + +extension BusinessUpdate on IsarCollection { + _BusinessUpdate get update => _BusinessUpdateImpl(this); + + _BusinessUpdateAll get updateAll => _BusinessUpdateAllImpl(this); +} + +sealed class _BusinessQueryUpdate { + int call({ + String? name, + String? businessOwner, + String? businessEmail, + String? businessPhone, + String? contactName, + String? contactPosition, + String? contactEmail, + String? contactPhone, + String? contact2Name, + String? contact2Position, + String? contact2Email, + String? contact2Phone, + String? contact3Name, + String? contact3Email, + String? addressComplete, + String? addressStreet, + String? addressPostalCode, + String? addressCity, + String? addressRegion, + String? addressFederalState, + String? unknown, + String? businessType, + String? region, + }); +} + +class _BusinessQueryUpdateImpl implements _BusinessQueryUpdate { + const _BusinessQueryUpdateImpl(this.query, {this.limit}); + + final IsarQuery query; + final int? limit; + + @override + int call({ + Object? name = ignore, + Object? businessOwner = ignore, + Object? businessEmail = ignore, + Object? businessPhone = ignore, + Object? contactName = ignore, + Object? contactPosition = ignore, + Object? contactEmail = ignore, + Object? contactPhone = ignore, + Object? contact2Name = ignore, + Object? contact2Position = ignore, + Object? contact2Email = ignore, + Object? contact2Phone = ignore, + Object? contact3Name = ignore, + Object? contact3Email = ignore, + Object? addressComplete = ignore, + Object? addressStreet = ignore, + Object? addressPostalCode = ignore, + Object? addressCity = ignore, + Object? addressRegion = ignore, + Object? addressFederalState = ignore, + Object? unknown = ignore, + Object? businessType = ignore, + Object? region = ignore, + }) { + return query.updateProperties(limit: limit, { + if (name != ignore) 1: name as String?, + if (businessOwner != ignore) 3: businessOwner as String?, + if (businessEmail != ignore) 4: businessEmail as String?, + if (businessPhone != ignore) 5: businessPhone as String?, + if (contactName != ignore) 6: contactName as String?, + if (contactPosition != ignore) 7: contactPosition as String?, + if (contactEmail != ignore) 8: contactEmail as String?, + if (contactPhone != ignore) 9: contactPhone as String?, + if (contact2Name != ignore) 10: contact2Name as String?, + if (contact2Position != ignore) 11: contact2Position as String?, + if (contact2Email != ignore) 12: contact2Email as String?, + if (contact2Phone != ignore) 13: contact2Phone as String?, + if (contact3Name != ignore) 14: contact3Name as String?, + if (contact3Email != ignore) 15: contact3Email as String?, + if (addressComplete != ignore) 16: addressComplete as String?, + if (addressStreet != ignore) 17: addressStreet as String?, + if (addressPostalCode != ignore) 18: addressPostalCode as String?, + if (addressCity != ignore) 19: addressCity as String?, + if (addressRegion != ignore) 20: addressRegion as String?, + if (addressFederalState != ignore) 21: addressFederalState as String?, + if (unknown != ignore) 22: unknown as String?, + if (businessType != ignore) 23: businessType as String?, + if (region != ignore) 24: region as String?, + }); + } +} + +extension BusinessQueryUpdate on IsarQuery { + _BusinessQueryUpdate get updateFirst => + _BusinessQueryUpdateImpl(this, limit: 1); + + _BusinessQueryUpdate get updateAll => _BusinessQueryUpdateImpl(this); +} + +class _BusinessQueryBuilderUpdateImpl implements _BusinessQueryUpdate { + const _BusinessQueryBuilderUpdateImpl(this.query, {this.limit}); + + final QueryBuilder query; + final int? limit; + + @override + int call({ + Object? name = ignore, + Object? businessOwner = ignore, + Object? businessEmail = ignore, + Object? businessPhone = ignore, + Object? contactName = ignore, + Object? contactPosition = ignore, + Object? contactEmail = ignore, + Object? contactPhone = ignore, + Object? contact2Name = ignore, + Object? contact2Position = ignore, + Object? contact2Email = ignore, + Object? contact2Phone = ignore, + Object? contact3Name = ignore, + Object? contact3Email = ignore, + Object? addressComplete = ignore, + Object? addressStreet = ignore, + Object? addressPostalCode = ignore, + Object? addressCity = ignore, + Object? addressRegion = ignore, + Object? addressFederalState = ignore, + Object? unknown = ignore, + Object? businessType = ignore, + Object? region = ignore, + }) { + final q = query.build(); + try { + return q.updateProperties(limit: limit, { + if (name != ignore) 1: name as String?, + if (businessOwner != ignore) 3: businessOwner as String?, + if (businessEmail != ignore) 4: businessEmail as String?, + if (businessPhone != ignore) 5: businessPhone as String?, + if (contactName != ignore) 6: contactName as String?, + if (contactPosition != ignore) 7: contactPosition as String?, + if (contactEmail != ignore) 8: contactEmail as String?, + if (contactPhone != ignore) 9: contactPhone as String?, + if (contact2Name != ignore) 10: contact2Name as String?, + if (contact2Position != ignore) 11: contact2Position as String?, + if (contact2Email != ignore) 12: contact2Email as String?, + if (contact2Phone != ignore) 13: contact2Phone as String?, + if (contact3Name != ignore) 14: contact3Name as String?, + if (contact3Email != ignore) 15: contact3Email as String?, + if (addressComplete != ignore) 16: addressComplete as String?, + if (addressStreet != ignore) 17: addressStreet as String?, + if (addressPostalCode != ignore) 18: addressPostalCode as String?, + if (addressCity != ignore) 19: addressCity as String?, + if (addressRegion != ignore) 20: addressRegion as String?, + if (addressFederalState != ignore) 21: addressFederalState as String?, + if (unknown != ignore) 22: unknown as String?, + if (businessType != ignore) 23: businessType as String?, + if (region != ignore) 24: region as String?, + }); + } finally { + q.close(); + } + } +} + +extension BusinessQueryBuilderUpdate + on QueryBuilder { + _BusinessQueryUpdate get updateFirst => + _BusinessQueryBuilderUpdateImpl(this, limit: 1); + + _BusinessQueryUpdate get updateAll => _BusinessQueryBuilderUpdateImpl(this); +} + +extension BusinessQueryFilter + on QueryBuilder { + QueryBuilder nameIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 1)); + }); + } + + QueryBuilder nameIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 1)); + }); + } + + QueryBuilder nameEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + nameGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 1, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameContains( + String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 1, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 1, + value: '', + ), + ); + }); + } + + QueryBuilder nameIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 1, + value: '', + ), + ); + }); + } + + QueryBuilder areaOfOriginIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 2)); + }); + } + + QueryBuilder + areaOfOriginIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 2)); + }); + } + + QueryBuilder + businessOwnerIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 3)); + }); + } + + QueryBuilder + businessOwnerIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 3)); + }); + } + + QueryBuilder businessOwnerEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + businessOwnerGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + businessOwnerGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder businessOwnerLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + businessOwnerLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder businessOwnerBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 3, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + businessOwnerStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder businessOwnerEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder businessOwnerContains( + String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder businessOwnerMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 3, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + businessOwnerIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 3, + value: '', + ), + ); + }); + } + + QueryBuilder + businessOwnerIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 3, + value: '', + ), + ); + }); + } + + QueryBuilder + businessEmailIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 4)); + }); + } + + QueryBuilder + businessEmailIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 4)); + }); + } + + QueryBuilder businessEmailEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 4, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + businessEmailGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 4, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + businessEmailGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 4, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder businessEmailLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 4, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + businessEmailLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 4, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder businessEmailBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 4, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + businessEmailStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 4, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder businessEmailEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 4, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder businessEmailContains( + String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 4, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder businessEmailMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 4, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + businessEmailIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 4, + value: '', + ), + ); + }); + } + + QueryBuilder + businessEmailIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 4, + value: '', + ), + ); + }); + } + + QueryBuilder + businessPhoneIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 5)); + }); + } + + QueryBuilder + businessPhoneIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 5)); + }); + } + + QueryBuilder businessPhoneEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + businessPhoneGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + businessPhoneGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder businessPhoneLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + businessPhoneLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder businessPhoneBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 5, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + businessPhoneStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder businessPhoneEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder businessPhoneContains( + String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder businessPhoneMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 5, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + businessPhoneIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 5, + value: '', + ), + ); + }); + } + + QueryBuilder + businessPhoneIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 5, + value: '', + ), + ); + }); + } + + QueryBuilder contactNameIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 6)); + }); + } + + QueryBuilder + contactNameIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 6)); + }); + } + + QueryBuilder contactNameEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contactNameGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contactNameGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder contactNameLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contactNameLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder contactNameBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 6, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder contactNameStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder contactNameEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder contactNameContains( + String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder contactNameMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 6, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder contactNameIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 6, + value: '', + ), + ); + }); + } + + QueryBuilder + contactNameIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 6, + value: '', + ), + ); + }); + } + + QueryBuilder + contactPositionIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 7)); + }); + } + + QueryBuilder + contactPositionIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 7)); + }); + } + + QueryBuilder + contactPositionEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 7, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contactPositionGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 7, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contactPositionGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 7, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contactPositionLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 7, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contactPositionLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 7, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contactPositionBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 7, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contactPositionStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 7, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contactPositionEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 7, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contactPositionContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 7, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contactPositionMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 7, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contactPositionIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 7, + value: '', + ), + ); + }); + } + + QueryBuilder + contactPositionIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 7, + value: '', + ), + ); + }); + } + + QueryBuilder contactEmailIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 8)); + }); + } + + QueryBuilder + contactEmailIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 8)); + }); + } + + QueryBuilder contactEmailEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 8, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contactEmailGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 8, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contactEmailGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 8, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder contactEmailLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 8, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contactEmailLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 8, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder contactEmailBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 8, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contactEmailStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 8, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder contactEmailEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 8, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder contactEmailContains( + String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 8, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder contactEmailMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 8, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contactEmailIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 8, + value: '', + ), + ); + }); + } + + QueryBuilder + contactEmailIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 8, + value: '', + ), + ); + }); + } + + QueryBuilder contactPhoneIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 9)); + }); + } + + QueryBuilder + contactPhoneIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 9)); + }); + } + + QueryBuilder contactPhoneEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 9, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contactPhoneGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 9, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contactPhoneGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 9, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder contactPhoneLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 9, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contactPhoneLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 9, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder contactPhoneBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 9, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contactPhoneStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 9, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder contactPhoneEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 9, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder contactPhoneContains( + String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 9, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder contactPhoneMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 9, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contactPhoneIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 9, + value: '', + ), + ); + }); + } + + QueryBuilder + contactPhoneIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 9, + value: '', + ), + ); + }); + } + + QueryBuilder contact2NameIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 10)); + }); + } + + QueryBuilder + contact2NameIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 10)); + }); + } + + QueryBuilder contact2NameEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 10, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contact2NameGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 10, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contact2NameGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 10, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder contact2NameLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 10, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contact2NameLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 10, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder contact2NameBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 10, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contact2NameStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 10, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder contact2NameEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 10, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder contact2NameContains( + String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 10, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder contact2NameMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 10, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contact2NameIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 10, + value: '', + ), + ); + }); + } + + QueryBuilder + contact2NameIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 10, + value: '', + ), + ); + }); + } + + QueryBuilder + contact2PositionIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 11)); + }); + } + + QueryBuilder + contact2PositionIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 11)); + }); + } + + QueryBuilder + contact2PositionEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 11, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contact2PositionGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 11, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contact2PositionGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 11, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contact2PositionLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 11, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contact2PositionLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 11, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contact2PositionBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 11, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contact2PositionStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 11, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contact2PositionEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 11, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contact2PositionContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 11, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contact2PositionMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 11, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contact2PositionIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 11, + value: '', + ), + ); + }); + } + + QueryBuilder + contact2PositionIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 11, + value: '', + ), + ); + }); + } + + QueryBuilder + contact2EmailIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 12)); + }); + } + + QueryBuilder + contact2EmailIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 12)); + }); + } + + QueryBuilder contact2EmailEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 12, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contact2EmailGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 12, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contact2EmailGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 12, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder contact2EmailLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 12, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contact2EmailLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 12, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder contact2EmailBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 12, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contact2EmailStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 12, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder contact2EmailEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 12, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder contact2EmailContains( + String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 12, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder contact2EmailMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 12, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contact2EmailIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 12, + value: '', + ), + ); + }); + } + + QueryBuilder + contact2EmailIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 12, + value: '', + ), + ); + }); + } + + QueryBuilder + contact2PhoneIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 13)); + }); + } + + QueryBuilder + contact2PhoneIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 13)); + }); + } + + QueryBuilder contact2PhoneEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 13, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contact2PhoneGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 13, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contact2PhoneGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 13, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder contact2PhoneLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 13, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contact2PhoneLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 13, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder contact2PhoneBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 13, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contact2PhoneStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 13, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder contact2PhoneEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 13, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder contact2PhoneContains( + String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 13, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder contact2PhoneMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 13, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contact2PhoneIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 13, + value: '', + ), + ); + }); + } + + QueryBuilder + contact2PhoneIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 13, + value: '', + ), + ); + }); + } + + QueryBuilder contact3NameIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 14)); + }); + } + + QueryBuilder + contact3NameIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 14)); + }); + } + + QueryBuilder contact3NameEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 14, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contact3NameGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 14, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contact3NameGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 14, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder contact3NameLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 14, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contact3NameLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 14, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder contact3NameBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 14, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contact3NameStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 14, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder contact3NameEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 14, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder contact3NameContains( + String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 14, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder contact3NameMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 14, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contact3NameIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 14, + value: '', + ), + ); + }); + } + + QueryBuilder + contact3NameIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 14, + value: '', + ), + ); + }); + } + + QueryBuilder + contact3EmailIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 15)); + }); + } + + QueryBuilder + contact3EmailIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 15)); + }); + } + + QueryBuilder contact3EmailEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 15, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contact3EmailGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 15, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contact3EmailGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 15, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder contact3EmailLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 15, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contact3EmailLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 15, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder contact3EmailBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 15, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contact3EmailStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 15, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder contact3EmailEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 15, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder contact3EmailContains( + String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 15, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder contact3EmailMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 15, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contact3EmailIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 15, + value: '', + ), + ); + }); + } + + QueryBuilder + contact3EmailIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 15, + value: '', + ), + ); + }); + } + + QueryBuilder + addressCompleteIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 16)); + }); + } + + QueryBuilder + addressCompleteIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 16)); + }); + } + + QueryBuilder + addressCompleteEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 16, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + addressCompleteGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 16, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + addressCompleteGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 16, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + addressCompleteLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 16, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + addressCompleteLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 16, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + addressCompleteBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 16, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + addressCompleteStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 16, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + addressCompleteEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 16, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + addressCompleteContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 16, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + addressCompleteMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 16, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + addressCompleteIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 16, + value: '', + ), + ); + }); + } + + QueryBuilder + addressCompleteIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 16, + value: '', + ), + ); + }); + } + + QueryBuilder + addressStreetIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 17)); + }); + } + + QueryBuilder + addressStreetIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 17)); + }); + } + + QueryBuilder addressStreetEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 17, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + addressStreetGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 17, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + addressStreetGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 17, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder addressStreetLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 17, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + addressStreetLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 17, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder addressStreetBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 17, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + addressStreetStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 17, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder addressStreetEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 17, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder addressStreetContains( + String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 17, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder addressStreetMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 17, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + addressStreetIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 17, + value: '', + ), + ); + }); + } + + QueryBuilder + addressStreetIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 17, + value: '', + ), + ); + }); + } + + QueryBuilder + addressPostalCodeIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 18)); + }); + } + + QueryBuilder + addressPostalCodeIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 18)); + }); + } + + QueryBuilder + addressPostalCodeEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 18, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + addressPostalCodeGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 18, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + addressPostalCodeGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 18, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + addressPostalCodeLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 18, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + addressPostalCodeLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 18, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + addressPostalCodeBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 18, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + addressPostalCodeStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 18, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + addressPostalCodeEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 18, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + addressPostalCodeContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 18, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + addressPostalCodeMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 18, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + addressPostalCodeIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 18, + value: '', + ), + ); + }); + } + + QueryBuilder + addressPostalCodeIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 18, + value: '', + ), + ); + }); + } + + QueryBuilder addressCityIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 19)); + }); + } + + QueryBuilder + addressCityIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 19)); + }); + } + + QueryBuilder addressCityEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 19, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + addressCityGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 19, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + addressCityGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 19, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder addressCityLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 19, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + addressCityLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 19, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder addressCityBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 19, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder addressCityStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 19, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder addressCityEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 19, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder addressCityContains( + String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 19, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder addressCityMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 19, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder addressCityIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 19, + value: '', + ), + ); + }); + } + + QueryBuilder + addressCityIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 19, + value: '', + ), + ); + }); + } + + QueryBuilder + addressRegionIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 20)); + }); + } + + QueryBuilder + addressRegionIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 20)); + }); + } + + QueryBuilder addressRegionEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 20, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + addressRegionGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 20, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + addressRegionGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 20, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder addressRegionLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 20, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + addressRegionLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 20, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder addressRegionBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 20, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + addressRegionStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 20, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder addressRegionEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 20, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder addressRegionContains( + String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 20, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder addressRegionMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 20, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + addressRegionIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 20, + value: '', + ), + ); + }); + } + + QueryBuilder + addressRegionIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 20, + value: '', + ), + ); + }); + } + + QueryBuilder + addressFederalStateIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 21)); + }); + } + + QueryBuilder + addressFederalStateIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 21)); + }); + } + + QueryBuilder + addressFederalStateEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 21, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + addressFederalStateGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 21, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + addressFederalStateGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 21, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + addressFederalStateLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 21, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + addressFederalStateLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 21, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + addressFederalStateBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 21, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + addressFederalStateStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 21, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + addressFederalStateEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 21, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + addressFederalStateContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 21, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + addressFederalStateMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 21, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + addressFederalStateIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 21, + value: '', + ), + ); + }); + } + + QueryBuilder + addressFederalStateIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 21, + value: '', + ), + ); + }); + } + + QueryBuilder unknownIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 22)); + }); + } + + QueryBuilder unknownIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 22)); + }); + } + + QueryBuilder unknownEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 22, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder unknownGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 22, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + unknownGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 22, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder unknownLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 22, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + unknownLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 22, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder unknownBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 22, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder unknownStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 22, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder unknownEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 22, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder unknownContains( + String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 22, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder unknownMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 22, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder unknownIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 22, + value: '', + ), + ); + }); + } + + QueryBuilder unknownIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 22, + value: '', + ), + ); + }); + } + + QueryBuilder businessTypeIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 23)); + }); + } + + QueryBuilder + businessTypeIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 23)); + }); + } + + QueryBuilder businessTypeEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 23, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + businessTypeGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 23, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + businessTypeGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 23, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder businessTypeLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 23, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + businessTypeLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 23, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder businessTypeBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 23, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + businessTypeStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 23, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder businessTypeEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 23, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder businessTypeContains( + String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 23, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder businessTypeMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 23, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + businessTypeIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 23, + value: '', + ), + ); + }); + } + + QueryBuilder + businessTypeIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 23, + value: '', + ), + ); + }); + } + + QueryBuilder regionIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 24)); + }); + } + + QueryBuilder regionIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 24)); + }); + } + + QueryBuilder regionEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 24, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder regionGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 24, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + regionGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 24, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder regionLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 24, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + regionLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 24, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder regionBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 24, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder regionStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 24, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder regionEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 24, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder regionContains( + String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 24, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder regionMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 24, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder regionIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 24, + value: '', + ), + ); + }); + } + + QueryBuilder regionIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 24, + value: '', + ), + ); + }); + } + + QueryBuilder measuresIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 25)); + }); + } + + QueryBuilder measuresIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 25)); + }); + } + + QueryBuilder measuresIsEmpty() { + return not().group( + (q) => q.measuresIsNull().or().measuresIsNotEmpty(), + ); + } + + QueryBuilder measuresIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 25, value: null), + ); + }); + } + + QueryBuilder + referenceImplementationIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 26)); + }); + } + + QueryBuilder + referenceImplementationIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 26)); + }); + } + + QueryBuilder + referenceImplementationIsEmpty() { + return not().group( + (q) => q + .referenceImplementationIsNull() + .or() + .referenceImplementationIsNotEmpty(), + ); + } + + QueryBuilder + referenceImplementationIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 26, value: null), + ); + }); + } + + QueryBuilder + experienceReportIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 27)); + }); + } + + QueryBuilder + experienceReportIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 27)); + }); + } + + QueryBuilder + experienceReportIsEmpty() { + return not().group( + (q) => q.experienceReportIsNull().or().experienceReportIsNotEmpty(), + ); + } + + QueryBuilder + experienceReportIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 27, value: null), + ); + }); + } + + QueryBuilder idEqualTo( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder idGreaterThan( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder + idGreaterThanOrEqualTo( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder idLessThan( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder idLessThanOrEqualTo( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder idBetween( + int lower, + int upper, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 0, + lower: lower, + upper: upper, + ), + ); + }); + } +} + +extension BusinessQueryObject + on QueryBuilder { + QueryBuilder areaOfOrigin( + FilterQuery q) { + return QueryBuilder.apply(this, (query) { + return query.object(q, 2); + }); + } +} + +extension BusinessQuerySortBy on QueryBuilder { + QueryBuilder sortByName( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 1, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByNameDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 1, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByBusinessOwner( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 3, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByBusinessOwnerDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 3, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByBusinessEmail( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 4, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByBusinessEmailDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 4, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByBusinessPhone( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 5, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByBusinessPhoneDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 5, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByContactName( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 6, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByContactNameDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 6, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByContactPosition( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 7, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByContactPositionDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 7, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByContactEmail( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 8, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByContactEmailDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 8, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByContactPhone( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 9, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByContactPhoneDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 9, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByContact2Name( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 10, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByContact2NameDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 10, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByContact2Position( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 11, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByContact2PositionDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 11, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByContact2Email( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 12, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByContact2EmailDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 12, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByContact2Phone( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 13, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByContact2PhoneDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 13, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByContact3Name( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 14, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByContact3NameDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 14, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByContact3Email( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 15, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByContact3EmailDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 15, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByAddressComplete( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 16, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByAddressCompleteDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 16, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByAddressStreet( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 17, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByAddressStreetDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 17, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByAddressPostalCode( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 18, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByAddressPostalCodeDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 18, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByAddressCity( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 19, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByAddressCityDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 19, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByAddressRegion( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 20, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByAddressRegionDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 20, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByAddressFederalState( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 21, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByAddressFederalStateDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 21, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByUnknown( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 22, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByUnknownDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 22, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByBusinessType( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 23, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByBusinessTypeDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 23, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByRegion( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 24, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByRegionDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 24, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortById() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0); + }); + } + + QueryBuilder sortByIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0, sort: Sort.desc); + }); + } +} + +extension BusinessQuerySortThenBy + on QueryBuilder { + QueryBuilder thenByName( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(1, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByNameDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(1, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByBusinessOwner( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(3, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByBusinessOwnerDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(3, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByBusinessEmail( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(4, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByBusinessEmailDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(4, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByBusinessPhone( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(5, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByBusinessPhoneDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(5, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByContactName( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(6, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByContactNameDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(6, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByContactPosition( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(7, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByContactPositionDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(7, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByContactEmail( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(8, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByContactEmailDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(8, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByContactPhone( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(9, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByContactPhoneDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(9, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByContact2Name( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(10, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByContact2NameDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(10, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByContact2Position( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(11, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByContact2PositionDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(11, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByContact2Email( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(12, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByContact2EmailDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(12, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByContact2Phone( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(13, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByContact2PhoneDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(13, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByContact3Name( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(14, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByContact3NameDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(14, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByContact3Email( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(15, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByContact3EmailDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(15, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByAddressComplete( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(16, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByAddressCompleteDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(16, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByAddressStreet( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(17, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByAddressStreetDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(17, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByAddressPostalCode( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(18, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByAddressPostalCodeDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(18, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByAddressCity( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(19, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByAddressCityDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(19, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByAddressRegion( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(20, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByAddressRegionDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(20, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByAddressFederalState( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(21, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByAddressFederalStateDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(21, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByUnknown( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(22, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByUnknownDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(22, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByBusinessType( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(23, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByBusinessTypeDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(23, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByRegion( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(24, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByRegionDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(24, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenById() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0); + }); + } + + QueryBuilder thenByIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0, sort: Sort.desc); + }); + } +} + +extension BusinessQueryWhereDistinct + on QueryBuilder { + QueryBuilder distinctByName( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(1, caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctByBusinessOwner( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(3, caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctByBusinessEmail( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(4, caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctByBusinessPhone( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(5, caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctByContactName( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(6, caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctByContactPosition( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(7, caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctByContactEmail( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(8, caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctByContactPhone( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(9, caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctByContact2Name( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(10, caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctByContact2Position( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(11, caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctByContact2Email( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(12, caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctByContact2Phone( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(13, caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctByContact3Name( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(14, caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctByContact3Email( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(15, caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctByAddressComplete( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(16, caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctByAddressStreet( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(17, caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctByAddressPostalCode( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(18, caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctByAddressCity( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(19, caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctByAddressRegion( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(20, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByAddressFederalState({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(21, caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctByUnknown( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(22, caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctByBusinessType( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(23, caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctByRegion( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(24, caseSensitive: caseSensitive); + }); + } +} + +extension BusinessQueryProperty1 + on QueryBuilder { + QueryBuilder nameProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(1); + }); + } + + QueryBuilder areaOfOriginProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(2); + }); + } + + QueryBuilder businessOwnerProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(3); + }); + } + + QueryBuilder businessEmailProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(4); + }); + } + + QueryBuilder businessPhoneProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(5); + }); + } + + QueryBuilder contactNameProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(6); + }); + } + + QueryBuilder contactPositionProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(7); + }); + } + + QueryBuilder contactEmailProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(8); + }); + } + + QueryBuilder contactPhoneProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(9); + }); + } + + QueryBuilder contact2NameProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(10); + }); + } + + QueryBuilder contact2PositionProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(11); + }); + } + + QueryBuilder contact2EmailProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(12); + }); + } + + QueryBuilder contact2PhoneProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(13); + }); + } + + QueryBuilder contact3NameProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(14); + }); + } + + QueryBuilder contact3EmailProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(15); + }); + } + + QueryBuilder addressCompleteProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(16); + }); + } + + QueryBuilder addressStreetProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(17); + }); + } + + QueryBuilder addressPostalCodeProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(18); + }); + } + + QueryBuilder addressCityProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(19); + }); + } + + QueryBuilder addressRegionProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(20); + }); + } + + QueryBuilder + addressFederalStateProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(21); + }); + } + + QueryBuilder unknownProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(22); + }); + } + + QueryBuilder businessTypeProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(23); + }); + } + + QueryBuilder regionProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(24); + }); + } + + QueryBuilder?, QAfterProperty> + measuresProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(25); + }); + } + + QueryBuilder?, QAfterProperty> + referenceImplementationProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(26); + }); + } + + QueryBuilder?, QAfterProperty> + experienceReportProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(27); + }); + } + + QueryBuilder idProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(0); + }); + } +} + +extension BusinessQueryProperty2 + on QueryBuilder { + QueryBuilder nameProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(1); + }); + } + + QueryBuilder + areaOfOriginProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(2); + }); + } + + QueryBuilder businessOwnerProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(3); + }); + } + + QueryBuilder businessEmailProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(4); + }); + } + + QueryBuilder businessPhoneProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(5); + }); + } + + QueryBuilder contactNameProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(6); + }); + } + + QueryBuilder + contactPositionProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(7); + }); + } + + QueryBuilder contactEmailProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(8); + }); + } + + QueryBuilder contactPhoneProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(9); + }); + } + + QueryBuilder contact2NameProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(10); + }); + } + + QueryBuilder + contact2PositionProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(11); + }); + } + + QueryBuilder contact2EmailProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(12); + }); + } + + QueryBuilder contact2PhoneProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(13); + }); + } + + QueryBuilder contact3NameProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(14); + }); + } + + QueryBuilder contact3EmailProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(15); + }); + } + + QueryBuilder + addressCompleteProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(16); + }); + } + + QueryBuilder addressStreetProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(17); + }); + } + + QueryBuilder + addressPostalCodeProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(18); + }); + } + + QueryBuilder addressCityProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(19); + }); + } + + QueryBuilder addressRegionProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(20); + }); + } + + QueryBuilder + addressFederalStateProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(21); + }); + } + + QueryBuilder unknownProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(22); + }); + } + + QueryBuilder businessTypeProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(23); + }); + } + + QueryBuilder regionProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(24); + }); + } + + QueryBuilder?), QAfterProperty> + measuresProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(25); + }); + } + + QueryBuilder?), QAfterProperty> + referenceImplementationProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(26); + }); + } + + QueryBuilder?), QAfterProperty> + experienceReportProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(27); + }); + } + + QueryBuilder idProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(0); + }); + } +} + +extension BusinessQueryProperty3 + on QueryBuilder { + QueryBuilder nameProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(1); + }); + } + + QueryBuilder + areaOfOriginProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(2); + }); + } + + QueryBuilder + businessOwnerProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(3); + }); + } + + QueryBuilder + businessEmailProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(4); + }); + } + + QueryBuilder + businessPhoneProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(5); + }); + } + + QueryBuilder contactNameProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(6); + }); + } + + QueryBuilder + contactPositionProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(7); + }); + } + + QueryBuilder + contactEmailProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(8); + }); + } + + QueryBuilder + contactPhoneProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(9); + }); + } + + QueryBuilder + contact2NameProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(10); + }); + } + + QueryBuilder + contact2PositionProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(11); + }); + } + + QueryBuilder + contact2EmailProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(12); + }); + } + + QueryBuilder + contact2PhoneProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(13); + }); + } + + QueryBuilder + contact3NameProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(14); + }); + } + + QueryBuilder + contact3EmailProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(15); + }); + } + + QueryBuilder + addressCompleteProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(16); + }); + } + + QueryBuilder + addressStreetProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(17); + }); + } + + QueryBuilder + addressPostalCodeProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(18); + }); + } + + QueryBuilder addressCityProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(19); + }); + } + + QueryBuilder + addressRegionProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(20); + }); + } + + QueryBuilder + addressFederalStateProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(21); + }); + } + + QueryBuilder unknownProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(22); + }); + } + + QueryBuilder + businessTypeProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(23); + }); + } + + QueryBuilder regionProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(24); + }); + } + + QueryBuilder?), QOperations> + measuresProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(25); + }); + } + + QueryBuilder?), QOperations> + referenceImplementationProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(26); + }); + } + + QueryBuilder?), QOperations> + experienceReportProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(27); + }); + } + + QueryBuilder idProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(0); + }); + } +} + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +Business _$BusinessFromJson(Map json) => Business() + ..id = (json['id'] as num).toInt() + ..name = json['Modellbetrieb'] as String? + ..areaOfOrigin = json['Ursprungsgebiet'] == null + ? null + : IdValueColor.fromJson(json['Ursprungsgebiet'] as Map) + ..businessOwner = json['Ansprechpartner'] as String? + ..businessEmail = json['Feld 6'] as String? + ..businessPhone = json['Feld 7'] as String? + ..contactName = json['Feld 8'] as String? + ..contactPosition = json['Feld 9'] as String? + ..contactEmail = json['Feld 10'] as String? + ..contactPhone = json['Feld 11'] as String? + ..contact2Name = json['Feld 12'] as String? + ..contact2Position = json['Feld 13'] as String? + ..contact2Email = json['Feld 14'] as String? + ..contact2Phone = json['Feld 15'] as String? + ..contact3Name = json['Feld 16'] as String? + ..contact3Email = json['Feld 17'] as String? + ..addressComplete = json['Feld 18'] as String? + ..addressStreet = json['Feld 19'] as String? + ..addressPostalCode = json['Feld 20'] as String? + ..addressCity = json['Feld 21'] as String? + ..addressRegion = json['Feld 22'] as String? + ..addressFederalState = json['Feld 23'] as String? + ..unknown = json['Feld 24'] as String? + ..businessType = json['Feld 25'] as String? + ..region = json['Region'] as String? + ..measures = (json['Umgesetze_Maßnahmen'] as List?) + ?.map((e) => IdValueColor.fromJson(e as Map)) + .toList() + ..referenceImplementation = (json['05 Referenzumsetzung'] as List?) + ?.map((e) => IdValueColor.fromJson(e as Map)) + .toList() + ..experienceReport = + (json['07 Erfahrungsbericht Umsetuzung'] as List?) + ?.map((e) => IdValueColor.fromJson(e as Map)) + .toList(); + +Map _$BusinessToJson(Business instance) => { + 'id': instance.id, + 'Modellbetrieb': instance.name, + 'Ursprungsgebiet': instance.areaOfOrigin?.toJson(), + 'Ansprechpartner': instance.businessOwner, + 'Feld 6': instance.businessEmail, + 'Feld 7': instance.businessPhone, + 'Feld 8': instance.contactName, + 'Feld 9': instance.contactPosition, + 'Feld 10': instance.contactEmail, + 'Feld 11': instance.contactPhone, + 'Feld 12': instance.contact2Name, + 'Feld 13': instance.contact2Position, + 'Feld 14': instance.contact2Email, + 'Feld 15': instance.contact2Phone, + 'Feld 16': instance.contact3Name, + 'Feld 17': instance.contact3Email, + 'Feld 18': instance.addressComplete, + 'Feld 19': instance.addressStreet, + 'Feld 20': instance.addressPostalCode, + 'Feld 21': instance.addressCity, + 'Feld 22': instance.addressRegion, + 'Feld 23': instance.addressFederalState, + 'Feld 24': instance.unknown, + 'Feld 25': instance.businessType, + 'Region': instance.region, + 'Umgesetze_Maßnahmen': instance.measures?.map((e) => e.toJson()).toList(), + '05 Referenzumsetzung': + instance.referenceImplementation?.map((e) => e.toJson()).toList(), + '07 Erfahrungsbericht Umsetuzung': + instance.experienceReport?.map((e) => e.toJson()).toList(), + }; diff --git a/lib/src/entity/business/business_repository.dart b/lib/src/entity/business/business_repository.dart new file mode 100644 index 0000000..f24ba29 --- /dev/null +++ b/lib/src/entity/business/business_repository.dart @@ -0,0 +1,10 @@ +import 'package:ambito/src/entity/entities.dart'; +import 'package:ambito/src/packages/ambito_db/base_db.dart'; +import 'package:isar/isar.dart'; + +import '../../../../main.dart'; + +class BusinessRepository extends BaseDB { + @override + IsarCollection collection = isar.business; +} diff --git a/lib/src/entity/entities.dart b/lib/src/entity/entities.dart new file mode 100644 index 0000000..94c97fe --- /dev/null +++ b/lib/src/entity/entities.dart @@ -0,0 +1,25 @@ +library ambito_entities; + +export '_general/file/file_part.dart'; +export '_general/file/thumbnail.dart'; +export '_general/file/thumbnails.dart'; +export '_general/id_value/id_value.dart'; +export '_general/id_value_color/id_value_color.dart'; +export '_general/id_value_mix/id_value_mix.dart'; +export '_general/month/month.dart'; +export 'approval_requirement/approval_requirement.dart'; +export 'base_entity.dart'; +export 'business/business.dart'; +export 'experience_report/experience_report.dart'; +export 'funding_program/funding_program.dart'; +export 'location_requirements/location_requirements.dart'; +export 'material/material.dart'; +export 'measure/measure.dart'; +export 'measure_combination/measure_combination.dart'; +export 'number_factsheet/number_factsheet.dart'; +export 'organism/organism.dart'; +export 'reference_implementation/reference_implementation.dart'; +export 'service_provider/service_provider.dart'; +export 'service_provider/service_provider_contact_person.dart'; +export 'source/source.dart'; +export 'tree_type/tree_type.dart'; diff --git a/lib/src/entity/experience_report/experience_report.dart b/lib/src/entity/experience_report/experience_report.dart new file mode 100644 index 0000000..8277433 --- /dev/null +++ b/lib/src/entity/experience_report/experience_report.dart @@ -0,0 +1,25 @@ +import 'package:ambito/src/entity/entities.dart'; +import 'package:isar/isar.dart'; +import 'package:json_annotation/json_annotation.dart'; + +part 'experience_report.g.dart'; + +@JsonSerializable(explicitToJson: true) +@collection +class ExperienceReport extends BaseEntity with EntityWithId { + ExperienceReport(); + + @JsonKey(name: 'Kurztitel') + String? title; + @JsonKey(name: 'Ausführlicher Refahrungsbericht') + String? content; + @JsonKey(name: 'Maßnahme') + List? measures; + @JsonKey(name: 'Betrieb') + List? business; + + factory ExperienceReport.fromJson(Map json) => + _$ExperienceReportFromJson(json); + + Map toJson() => _$ExperienceReportToJson(this); +} diff --git a/lib/src/entity/experience_report/experience_report.g.dart b/lib/src/entity/experience_report/experience_report.g.dart new file mode 100644 index 0000000..c84c4fc --- /dev/null +++ b/lib/src/entity/experience_report/experience_report.g.dart @@ -0,0 +1,1153 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'experience_report.dart'; + +// ************************************************************************** +// _IsarCollectionGenerator +// ************************************************************************** + +// coverage:ignore-file +// ignore_for_file: duplicate_ignore, invalid_use_of_protected_member, lines_longer_than_80_chars, constant_identifier_names, avoid_js_rounded_ints, no_leading_underscores_for_local_identifiers, require_trailing_commas, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_in_if_null_operators, library_private_types_in_public_api, prefer_const_constructors +// ignore_for_file: type=lint + +extension GetExperienceReportCollection on Isar { + IsarCollection get experienceReports => + this.collection(); +} + +const ExperienceReportSchema = IsarGeneratedSchema( + schema: IsarSchema( + name: 'ExperienceReport', + idName: 'id', + embedded: false, + properties: [ + IsarPropertySchema( + name: 'title', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'content', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'measures', + type: IsarType.objectList, + target: 'IdValue', + ), + IsarPropertySchema( + name: 'business', + type: IsarType.objectList, + target: 'IdValue', + ), + ], + indexes: [], + ), + converter: IsarObjectConverter( + serialize: serializeExperienceReport, + deserialize: deserializeExperienceReport, + deserializeProperty: deserializeExperienceReportProp, + ), + embeddedSchemas: [IdValueSchema], +); + +@isarProtected +int serializeExperienceReport(IsarWriter writer, ExperienceReport object) { + { + final value = object.title; + if (value == null) { + IsarCore.writeNull(writer, 1); + } else { + IsarCore.writeString(writer, 1, value); + } + } + { + final value = object.content; + if (value == null) { + IsarCore.writeNull(writer, 2); + } else { + IsarCore.writeString(writer, 2, value); + } + } + { + final list = object.measures; + if (list == null) { + IsarCore.writeNull(writer, 3); + } else { + final listWriter = IsarCore.beginList(writer, 3, list.length); + for (var i = 0; i < list.length; i++) { + { + final value = list[i]; + final objectWriter = IsarCore.beginObject(listWriter, i); + serializeIdValue(objectWriter, value); + IsarCore.endObject(listWriter, objectWriter); + } + } + IsarCore.endList(writer, listWriter); + } + } + { + final list = object.business; + if (list == null) { + IsarCore.writeNull(writer, 4); + } else { + final listWriter = IsarCore.beginList(writer, 4, list.length); + for (var i = 0; i < list.length; i++) { + { + final value = list[i]; + final objectWriter = IsarCore.beginObject(listWriter, i); + serializeIdValue(objectWriter, value); + IsarCore.endObject(listWriter, objectWriter); + } + } + IsarCore.endList(writer, listWriter); + } + } + return object.id; +} + +@isarProtected +ExperienceReport deserializeExperienceReport(IsarReader reader) { + final object = ExperienceReport(); + object.title = IsarCore.readString(reader, 1); + object.content = IsarCore.readString(reader, 2); + { + final length = IsarCore.readList(reader, 3, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.measures = null; + } else { + final list = List.filled(length, IdValue(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValue(); + } else { + final embedded = deserializeIdValue(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + object.measures = list; + } + } + } + { + final length = IsarCore.readList(reader, 4, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.business = null; + } else { + final list = List.filled(length, IdValue(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValue(); + } else { + final embedded = deserializeIdValue(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + object.business = list; + } + } + } + object.id = IsarCore.readId(reader); + return object; +} + +@isarProtected +dynamic deserializeExperienceReportProp(IsarReader reader, int property) { + switch (property) { + case 1: + return IsarCore.readString(reader, 1); + case 2: + return IsarCore.readString(reader, 2); + case 3: + { + final length = IsarCore.readList(reader, 3, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = + List.filled(length, IdValue(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValue(); + } else { + final embedded = deserializeIdValue(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 4: + { + final length = IsarCore.readList(reader, 4, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = + List.filled(length, IdValue(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValue(); + } else { + final embedded = deserializeIdValue(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 0: + return IsarCore.readId(reader); + default: + throw ArgumentError('Unknown property: $property'); + } +} + +sealed class _ExperienceReportUpdate { + bool call({ + required int id, + String? title, + String? content, + }); +} + +class _ExperienceReportUpdateImpl implements _ExperienceReportUpdate { + const _ExperienceReportUpdateImpl(this.collection); + + final IsarCollection collection; + + @override + bool call({ + required int id, + Object? title = ignore, + Object? content = ignore, + }) { + return collection.updateProperties([ + id + ], { + if (title != ignore) 1: title as String?, + if (content != ignore) 2: content as String?, + }) > + 0; + } +} + +sealed class _ExperienceReportUpdateAll { + int call({ + required List id, + String? title, + String? content, + }); +} + +class _ExperienceReportUpdateAllImpl implements _ExperienceReportUpdateAll { + const _ExperienceReportUpdateAllImpl(this.collection); + + final IsarCollection collection; + + @override + int call({ + required List id, + Object? title = ignore, + Object? content = ignore, + }) { + return collection.updateProperties(id, { + if (title != ignore) 1: title as String?, + if (content != ignore) 2: content as String?, + }); + } +} + +extension ExperienceReportUpdate on IsarCollection { + _ExperienceReportUpdate get update => _ExperienceReportUpdateImpl(this); + + _ExperienceReportUpdateAll get updateAll => + _ExperienceReportUpdateAllImpl(this); +} + +sealed class _ExperienceReportQueryUpdate { + int call({ + String? title, + String? content, + }); +} + +class _ExperienceReportQueryUpdateImpl implements _ExperienceReportQueryUpdate { + const _ExperienceReportQueryUpdateImpl(this.query, {this.limit}); + + final IsarQuery query; + final int? limit; + + @override + int call({ + Object? title = ignore, + Object? content = ignore, + }) { + return query.updateProperties(limit: limit, { + if (title != ignore) 1: title as String?, + if (content != ignore) 2: content as String?, + }); + } +} + +extension ExperienceReportQueryUpdate on IsarQuery { + _ExperienceReportQueryUpdate get updateFirst => + _ExperienceReportQueryUpdateImpl(this, limit: 1); + + _ExperienceReportQueryUpdate get updateAll => + _ExperienceReportQueryUpdateImpl(this); +} + +class _ExperienceReportQueryBuilderUpdateImpl + implements _ExperienceReportQueryUpdate { + const _ExperienceReportQueryBuilderUpdateImpl(this.query, {this.limit}); + + final QueryBuilder query; + final int? limit; + + @override + int call({ + Object? title = ignore, + Object? content = ignore, + }) { + final q = query.build(); + try { + return q.updateProperties(limit: limit, { + if (title != ignore) 1: title as String?, + if (content != ignore) 2: content as String?, + }); + } finally { + q.close(); + } + } +} + +extension ExperienceReportQueryBuilderUpdate + on QueryBuilder { + _ExperienceReportQueryUpdate get updateFirst => + _ExperienceReportQueryBuilderUpdateImpl(this, limit: 1); + + _ExperienceReportQueryUpdate get updateAll => + _ExperienceReportQueryBuilderUpdateImpl(this); +} + +extension ExperienceReportQueryFilter + on QueryBuilder { + QueryBuilder + titleIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 1)); + }); + } + + QueryBuilder + titleIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 1)); + }); + } + + QueryBuilder + titleEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + titleGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + titleGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + titleLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + titleLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + titleBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 1, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + titleStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + titleEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + titleContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + titleMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 1, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + titleIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 1, + value: '', + ), + ); + }); + } + + QueryBuilder + titleIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 1, + value: '', + ), + ); + }); + } + + QueryBuilder + contentIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 2)); + }); + } + + QueryBuilder + contentIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 2)); + }); + } + + QueryBuilder + contentEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contentGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contentGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contentLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contentLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contentBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 2, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contentStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contentEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contentContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contentMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 2, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + contentIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 2, + value: '', + ), + ); + }); + } + + QueryBuilder + contentIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 2, + value: '', + ), + ); + }); + } + + QueryBuilder + measuresIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 3)); + }); + } + + QueryBuilder + measuresIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 3)); + }); + } + + QueryBuilder + measuresIsEmpty() { + return not().group( + (q) => q.measuresIsNull().or().measuresIsNotEmpty(), + ); + } + + QueryBuilder + measuresIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 3, value: null), + ); + }); + } + + QueryBuilder + businessIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 4)); + }); + } + + QueryBuilder + businessIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 4)); + }); + } + + QueryBuilder + businessIsEmpty() { + return not().group( + (q) => q.businessIsNull().or().businessIsNotEmpty(), + ); + } + + QueryBuilder + businessIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 4, value: null), + ); + }); + } + + QueryBuilder + idEqualTo( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder + idGreaterThan( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder + idGreaterThanOrEqualTo( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder + idLessThan( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder + idLessThanOrEqualTo( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder + idBetween( + int lower, + int upper, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 0, + lower: lower, + upper: upper, + ), + ); + }); + } +} + +extension ExperienceReportQueryObject + on QueryBuilder {} + +extension ExperienceReportQuerySortBy + on QueryBuilder { + QueryBuilder sortByTitle( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 1, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByTitleDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 1, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByContent( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 2, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByContentDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 2, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortById() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0); + }); + } + + QueryBuilder + sortByIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0, sort: Sort.desc); + }); + } +} + +extension ExperienceReportQuerySortThenBy + on QueryBuilder { + QueryBuilder thenByTitle( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(1, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByTitleDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(1, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByContent( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(2, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByContentDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(2, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenById() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0); + }); + } + + QueryBuilder + thenByIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0, sort: Sort.desc); + }); + } +} + +extension ExperienceReportQueryWhereDistinct + on QueryBuilder { + QueryBuilder + distinctByTitle({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(1, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByContent({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(2, caseSensitive: caseSensitive); + }); + } +} + +extension ExperienceReportQueryProperty1 + on QueryBuilder { + QueryBuilder titleProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(1); + }); + } + + QueryBuilder contentProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(2); + }); + } + + QueryBuilder?, QAfterProperty> + measuresProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(3); + }); + } + + QueryBuilder?, QAfterProperty> + businessProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(4); + }); + } + + QueryBuilder idProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(0); + }); + } +} + +extension ExperienceReportQueryProperty2 + on QueryBuilder { + QueryBuilder titleProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(1); + }); + } + + QueryBuilder + contentProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(2); + }); + } + + QueryBuilder?), QAfterProperty> + measuresProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(3); + }); + } + + QueryBuilder?), QAfterProperty> + businessProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(4); + }); + } + + QueryBuilder idProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(0); + }); + } +} + +extension ExperienceReportQueryProperty3 + on QueryBuilder { + QueryBuilder + titleProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(1); + }); + } + + QueryBuilder + contentProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(2); + }); + } + + QueryBuilder?), QOperations> + measuresProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(3); + }); + } + + QueryBuilder?), QOperations> + businessProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(4); + }); + } + + QueryBuilder idProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(0); + }); + } +} + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +ExperienceReport _$ExperienceReportFromJson(Map json) => + ExperienceReport() + ..id = (json['id'] as num).toInt() + ..title = json['Kurztitel'] as String? + ..content = json['Ausführlicher Refahrungsbericht'] as String? + ..measures = (json['Maßnahme'] as List?) + ?.map((e) => IdValue.fromJson(e as Map)) + .toList() + ..business = (json['Betrieb'] as List?) + ?.map((e) => IdValue.fromJson(e as Map)) + .toList(); + +Map _$ExperienceReportToJson(ExperienceReport instance) => + { + 'id': instance.id, + 'Kurztitel': instance.title, + 'Ausführlicher Refahrungsbericht': instance.content, + 'Maßnahme': instance.measures?.map((e) => e.toJson()).toList(), + 'Betrieb': instance.business?.map((e) => e.toJson()).toList(), + }; diff --git a/lib/src/entity/experience_report/experience_report_repository.dart b/lib/src/entity/experience_report/experience_report_repository.dart new file mode 100644 index 0000000..64e37bf --- /dev/null +++ b/lib/src/entity/experience_report/experience_report_repository.dart @@ -0,0 +1,10 @@ +import 'package:ambito/src/entity/entities.dart'; +import 'package:ambito/src/packages/ambito_db/base_db.dart'; +import 'package:isar/isar.dart'; + +import '../../../../main.dart'; + +class ExperienceReportRepository extends BaseDB { + @override + IsarCollection collection = isar.experienceReports; +} diff --git a/lib/src/domain/entity/funding_program/funding_program.dart b/lib/src/entity/funding_program/funding_program.dart similarity index 93% rename from lib/src/domain/entity/funding_program/funding_program.dart rename to lib/src/entity/funding_program/funding_program.dart index 51e52d5..b242359 100644 --- a/lib/src/domain/entity/funding_program/funding_program.dart +++ b/lib/src/entity/funding_program/funding_program.dart @@ -1,4 +1,4 @@ -import 'package:ambito/src/domain/entity/entities.dart'; +import 'package:ambito/src/entity/entities.dart'; import 'package:isar/isar.dart'; import 'package:json_annotation/json_annotation.dart'; diff --git a/lib/src/domain/entity/funding_program/funding_program.g.dart b/lib/src/entity/funding_program/funding_program.g.dart similarity index 100% rename from lib/src/domain/entity/funding_program/funding_program.g.dart rename to lib/src/entity/funding_program/funding_program.g.dart diff --git a/lib/src/packages/ambito_db/repositories/funding_program_repository.dart b/lib/src/entity/funding_program/funding_program_repository.dart similarity index 74% rename from lib/src/packages/ambito_db/repositories/funding_program_repository.dart rename to lib/src/entity/funding_program/funding_program_repository.dart index c7435df..1fd7f44 100644 --- a/lib/src/packages/ambito_db/repositories/funding_program_repository.dart +++ b/lib/src/entity/funding_program/funding_program_repository.dart @@ -1,9 +1,10 @@ -import 'package:ambito/src/domain/entity/funding_program/funding_program.dart'; +import 'package:ambito/src/entity/entities.dart'; import 'package:ambito/src/packages/ambito_db/base_db.dart'; import 'package:isar/isar.dart'; import '../../../../main.dart'; class FundingProgramRepository extends BaseDB { + @override IsarCollection collection = isar.fundingPrograms; } diff --git a/lib/src/entity/location_requirements/location_requirements.dart b/lib/src/entity/location_requirements/location_requirements.dart new file mode 100644 index 0000000..0f02eec --- /dev/null +++ b/lib/src/entity/location_requirements/location_requirements.dart @@ -0,0 +1,43 @@ +import 'package:ambito/src/entity/entities.dart'; +import 'package:isar/isar.dart'; +import 'package:json_annotation/json_annotation.dart'; + +part 'location_requirements.g.dart'; + +@JsonSerializable(explicitToJson: true) +@collection +class LocationRequirements extends BaseEntity with EntityWithIdAndName { + LocationRequirements(); + + @JsonKey(name: 'Maßnahmentabelle Standortansprüche') + List? measures; + @JsonKey(name: 'Flächentyp') + List? areaType; + @JsonKey(name: 'Exposition') + List? exposition; + @JsonKey(name: 'Licht') + List? light; + @JsonKey(name: 'Feuchtigkeit') + List? humidity; + @JsonKey(name: 'Topographie') + List? topography; + @JsonKey(name: 'Geometrie') + List? geometry; + @JsonKey(name: 'Wertigkeit') + IdValueColor? value; + @JsonKey(name: 'Kosten') + IdValueColor? costs; + @JsonKey(name: 'Aufwand') + IdValueColor? effort; + @JsonKey(name: 'Pflegeaufwand') + IdValueColor? careEffort; + @JsonKey(name: 'Mindesflächengröße in m²') + int? minimalAreaSize; + @JsonKey(name: 'Boden') + List? ground; + + factory LocationRequirements.fromJson(Map json) => + _$LocationRequirementsFromJson(json); + + Map toJson() => _$LocationRequirementsToJson(this); +} diff --git a/lib/src/entity/location_requirements/location_requirements.g.dart b/lib/src/entity/location_requirements/location_requirements.g.dart new file mode 100644 index 0000000..c05a51e --- /dev/null +++ b/lib/src/entity/location_requirements/location_requirements.g.dart @@ -0,0 +1,2194 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'location_requirements.dart'; + +// ************************************************************************** +// _IsarCollectionGenerator +// ************************************************************************** + +// coverage:ignore-file +// ignore_for_file: duplicate_ignore, invalid_use_of_protected_member, lines_longer_than_80_chars, constant_identifier_names, avoid_js_rounded_ints, no_leading_underscores_for_local_identifiers, require_trailing_commas, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_in_if_null_operators, library_private_types_in_public_api, prefer_const_constructors +// ignore_for_file: type=lint + +extension GetLocationRequirementsCollection on Isar { + IsarCollection get locationRequirements => + this.collection(); +} + +const LocationRequirementsSchema = IsarGeneratedSchema( + schema: IsarSchema( + name: 'LocationRequirements', + idName: 'id', + embedded: false, + properties: [ + IsarPropertySchema( + name: 'measures', + type: IsarType.objectList, + target: 'IdValue', + ), + IsarPropertySchema( + name: 'areaType', + type: IsarType.objectList, + target: 'IdValueColor', + ), + IsarPropertySchema( + name: 'exposition', + type: IsarType.objectList, + target: 'IdValueColor', + ), + IsarPropertySchema( + name: 'light', + type: IsarType.objectList, + target: 'IdValueColor', + ), + IsarPropertySchema( + name: 'humidity', + type: IsarType.objectList, + target: 'IdValueColor', + ), + IsarPropertySchema( + name: 'topography', + type: IsarType.objectList, + target: 'IdValueColor', + ), + IsarPropertySchema( + name: 'geometry', + type: IsarType.objectList, + target: 'IdValueColor', + ), + IsarPropertySchema( + name: 'value', + type: IsarType.object, + target: 'IdValueColor', + ), + IsarPropertySchema( + name: 'costs', + type: IsarType.object, + target: 'IdValueColor', + ), + IsarPropertySchema( + name: 'effort', + type: IsarType.object, + target: 'IdValueColor', + ), + IsarPropertySchema( + name: 'careEffort', + type: IsarType.object, + target: 'IdValueColor', + ), + IsarPropertySchema( + name: 'minimalAreaSize', + type: IsarType.long, + ), + IsarPropertySchema( + name: 'ground', + type: IsarType.objectList, + target: 'IdValueColor', + ), + IsarPropertySchema( + name: 'name', + type: IsarType.string, + ), + ], + indexes: [ + IsarIndexSchema( + name: 'name', + properties: [ + "name", + ], + unique: true, + hash: true, + ), + ], + ), + converter: IsarObjectConverter( + serialize: serializeLocationRequirements, + deserialize: deserializeLocationRequirements, + deserializeProperty: deserializeLocationRequirementsProp, + ), + embeddedSchemas: [IdValueSchema, IdValueColorSchema], +); + +@isarProtected +int serializeLocationRequirements( + IsarWriter writer, LocationRequirements object) { + { + final list = object.measures; + if (list == null) { + IsarCore.writeNull(writer, 1); + } else { + final listWriter = IsarCore.beginList(writer, 1, list.length); + for (var i = 0; i < list.length; i++) { + { + final value = list[i]; + final objectWriter = IsarCore.beginObject(listWriter, i); + serializeIdValue(objectWriter, value); + IsarCore.endObject(listWriter, objectWriter); + } + } + IsarCore.endList(writer, listWriter); + } + } + { + final list = object.areaType; + if (list == null) { + IsarCore.writeNull(writer, 2); + } else { + final listWriter = IsarCore.beginList(writer, 2, list.length); + for (var i = 0; i < list.length; i++) { + { + final value = list[i]; + final objectWriter = IsarCore.beginObject(listWriter, i); + serializeIdValueColor(objectWriter, value); + IsarCore.endObject(listWriter, objectWriter); + } + } + IsarCore.endList(writer, listWriter); + } + } + { + final list = object.exposition; + if (list == null) { + IsarCore.writeNull(writer, 3); + } else { + final listWriter = IsarCore.beginList(writer, 3, list.length); + for (var i = 0; i < list.length; i++) { + { + final value = list[i]; + final objectWriter = IsarCore.beginObject(listWriter, i); + serializeIdValueColor(objectWriter, value); + IsarCore.endObject(listWriter, objectWriter); + } + } + IsarCore.endList(writer, listWriter); + } + } + { + final list = object.light; + if (list == null) { + IsarCore.writeNull(writer, 4); + } else { + final listWriter = IsarCore.beginList(writer, 4, list.length); + for (var i = 0; i < list.length; i++) { + { + final value = list[i]; + final objectWriter = IsarCore.beginObject(listWriter, i); + serializeIdValueColor(objectWriter, value); + IsarCore.endObject(listWriter, objectWriter); + } + } + IsarCore.endList(writer, listWriter); + } + } + { + final list = object.humidity; + if (list == null) { + IsarCore.writeNull(writer, 5); + } else { + final listWriter = IsarCore.beginList(writer, 5, list.length); + for (var i = 0; i < list.length; i++) { + { + final value = list[i]; + final objectWriter = IsarCore.beginObject(listWriter, i); + serializeIdValueColor(objectWriter, value); + IsarCore.endObject(listWriter, objectWriter); + } + } + IsarCore.endList(writer, listWriter); + } + } + { + final list = object.topography; + if (list == null) { + IsarCore.writeNull(writer, 6); + } else { + final listWriter = IsarCore.beginList(writer, 6, list.length); + for (var i = 0; i < list.length; i++) { + { + final value = list[i]; + final objectWriter = IsarCore.beginObject(listWriter, i); + serializeIdValueColor(objectWriter, value); + IsarCore.endObject(listWriter, objectWriter); + } + } + IsarCore.endList(writer, listWriter); + } + } + { + final list = object.geometry; + if (list == null) { + IsarCore.writeNull(writer, 7); + } else { + final listWriter = IsarCore.beginList(writer, 7, list.length); + for (var i = 0; i < list.length; i++) { + { + final value = list[i]; + final objectWriter = IsarCore.beginObject(listWriter, i); + serializeIdValueColor(objectWriter, value); + IsarCore.endObject(listWriter, objectWriter); + } + } + IsarCore.endList(writer, listWriter); + } + } + { + final value = object.value; + if (value == null) { + IsarCore.writeNull(writer, 8); + } else { + final objectWriter = IsarCore.beginObject(writer, 8); + serializeIdValueColor(objectWriter, value); + IsarCore.endObject(writer, objectWriter); + } + } + { + final value = object.costs; + if (value == null) { + IsarCore.writeNull(writer, 9); + } else { + final objectWriter = IsarCore.beginObject(writer, 9); + serializeIdValueColor(objectWriter, value); + IsarCore.endObject(writer, objectWriter); + } + } + { + final value = object.effort; + if (value == null) { + IsarCore.writeNull(writer, 10); + } else { + final objectWriter = IsarCore.beginObject(writer, 10); + serializeIdValueColor(objectWriter, value); + IsarCore.endObject(writer, objectWriter); + } + } + { + final value = object.careEffort; + if (value == null) { + IsarCore.writeNull(writer, 11); + } else { + final objectWriter = IsarCore.beginObject(writer, 11); + serializeIdValueColor(objectWriter, value); + IsarCore.endObject(writer, objectWriter); + } + } + IsarCore.writeLong( + writer, 12, object.minimalAreaSize ?? -9223372036854775808); + { + final list = object.ground; + if (list == null) { + IsarCore.writeNull(writer, 13); + } else { + final listWriter = IsarCore.beginList(writer, 13, list.length); + for (var i = 0; i < list.length; i++) { + { + final value = list[i]; + final objectWriter = IsarCore.beginObject(listWriter, i); + serializeIdValueColor(objectWriter, value); + IsarCore.endObject(listWriter, objectWriter); + } + } + IsarCore.endList(writer, listWriter); + } + } + { + final value = object.name; + if (value == null) { + IsarCore.writeNull(writer, 14); + } else { + IsarCore.writeString(writer, 14, value); + } + } + return object.id; +} + +@isarProtected +LocationRequirements deserializeLocationRequirements(IsarReader reader) { + final object = LocationRequirements(); + { + final length = IsarCore.readList(reader, 1, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.measures = null; + } else { + final list = List.filled(length, IdValue(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValue(); + } else { + final embedded = deserializeIdValue(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + object.measures = list; + } + } + } + { + final length = IsarCore.readList(reader, 2, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.areaType = null; + } else { + final list = + List.filled(length, IdValueColor(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValueColor(); + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + object.areaType = list; + } + } + } + { + final length = IsarCore.readList(reader, 3, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.exposition = null; + } else { + final list = + List.filled(length, IdValueColor(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValueColor(); + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + object.exposition = list; + } + } + } + { + final length = IsarCore.readList(reader, 4, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.light = null; + } else { + final list = + List.filled(length, IdValueColor(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValueColor(); + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + object.light = list; + } + } + } + { + final length = IsarCore.readList(reader, 5, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.humidity = null; + } else { + final list = + List.filled(length, IdValueColor(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValueColor(); + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + object.humidity = list; + } + } + } + { + final length = IsarCore.readList(reader, 6, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.topography = null; + } else { + final list = + List.filled(length, IdValueColor(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValueColor(); + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + object.topography = list; + } + } + } + { + final length = IsarCore.readList(reader, 7, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.geometry = null; + } else { + final list = + List.filled(length, IdValueColor(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValueColor(); + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + object.geometry = list; + } + } + } + { + final objectReader = IsarCore.readObject(reader, 8); + if (objectReader.isNull) { + object.value = null; + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + object.value = embedded; + } + } + { + final objectReader = IsarCore.readObject(reader, 9); + if (objectReader.isNull) { + object.costs = null; + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + object.costs = embedded; + } + } + { + final objectReader = IsarCore.readObject(reader, 10); + if (objectReader.isNull) { + object.effort = null; + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + object.effort = embedded; + } + } + { + final objectReader = IsarCore.readObject(reader, 11); + if (objectReader.isNull) { + object.careEffort = null; + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + object.careEffort = embedded; + } + } + { + final value = IsarCore.readLong(reader, 12); + if (value == -9223372036854775808) { + object.minimalAreaSize = null; + } else { + object.minimalAreaSize = value; + } + } + { + final length = IsarCore.readList(reader, 13, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.ground = null; + } else { + final list = + List.filled(length, IdValueColor(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValueColor(); + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + object.ground = list; + } + } + } + object.id = IsarCore.readId(reader); + object.name = IsarCore.readString(reader, 14); + return object; +} + +@isarProtected +dynamic deserializeLocationRequirementsProp(IsarReader reader, int property) { + switch (property) { + case 1: + { + final length = IsarCore.readList(reader, 1, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = + List.filled(length, IdValue(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValue(); + } else { + final embedded = deserializeIdValue(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 2: + { + final length = IsarCore.readList(reader, 2, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = List.filled(length, IdValueColor(), + growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValueColor(); + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 3: + { + final length = IsarCore.readList(reader, 3, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = List.filled(length, IdValueColor(), + growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValueColor(); + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 4: + { + final length = IsarCore.readList(reader, 4, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = List.filled(length, IdValueColor(), + growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValueColor(); + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 5: + { + final length = IsarCore.readList(reader, 5, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = List.filled(length, IdValueColor(), + growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValueColor(); + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 6: + { + final length = IsarCore.readList(reader, 6, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = List.filled(length, IdValueColor(), + growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValueColor(); + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 7: + { + final length = IsarCore.readList(reader, 7, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = List.filled(length, IdValueColor(), + growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValueColor(); + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 8: + { + final objectReader = IsarCore.readObject(reader, 8); + if (objectReader.isNull) { + return null; + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + return embedded; + } + } + case 9: + { + final objectReader = IsarCore.readObject(reader, 9); + if (objectReader.isNull) { + return null; + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + return embedded; + } + } + case 10: + { + final objectReader = IsarCore.readObject(reader, 10); + if (objectReader.isNull) { + return null; + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + return embedded; + } + } + case 11: + { + final objectReader = IsarCore.readObject(reader, 11); + if (objectReader.isNull) { + return null; + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + return embedded; + } + } + case 12: + { + final value = IsarCore.readLong(reader, 12); + if (value == -9223372036854775808) { + return null; + } else { + return value; + } + } + case 13: + { + final length = IsarCore.readList(reader, 13, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = List.filled(length, IdValueColor(), + growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValueColor(); + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 0: + return IsarCore.readId(reader); + case 14: + return IsarCore.readString(reader, 14); + default: + throw ArgumentError('Unknown property: $property'); + } +} + +sealed class _LocationRequirementsUpdate { + bool call({ + required int id, + int? minimalAreaSize, + String? name, + }); +} + +class _LocationRequirementsUpdateImpl implements _LocationRequirementsUpdate { + const _LocationRequirementsUpdateImpl(this.collection); + + final IsarCollection collection; + + @override + bool call({ + required int id, + Object? minimalAreaSize = ignore, + Object? name = ignore, + }) { + return collection.updateProperties([ + id + ], { + if (minimalAreaSize != ignore) 12: minimalAreaSize as int?, + if (name != ignore) 14: name as String?, + }) > + 0; + } +} + +sealed class _LocationRequirementsUpdateAll { + int call({ + required List id, + int? minimalAreaSize, + String? name, + }); +} + +class _LocationRequirementsUpdateAllImpl + implements _LocationRequirementsUpdateAll { + const _LocationRequirementsUpdateAllImpl(this.collection); + + final IsarCollection collection; + + @override + int call({ + required List id, + Object? minimalAreaSize = ignore, + Object? name = ignore, + }) { + return collection.updateProperties(id, { + if (minimalAreaSize != ignore) 12: minimalAreaSize as int?, + if (name != ignore) 14: name as String?, + }); + } +} + +extension LocationRequirementsUpdate + on IsarCollection { + _LocationRequirementsUpdate get update => + _LocationRequirementsUpdateImpl(this); + + _LocationRequirementsUpdateAll get updateAll => + _LocationRequirementsUpdateAllImpl(this); +} + +sealed class _LocationRequirementsQueryUpdate { + int call({ + int? minimalAreaSize, + String? name, + }); +} + +class _LocationRequirementsQueryUpdateImpl + implements _LocationRequirementsQueryUpdate { + const _LocationRequirementsQueryUpdateImpl(this.query, {this.limit}); + + final IsarQuery query; + final int? limit; + + @override + int call({ + Object? minimalAreaSize = ignore, + Object? name = ignore, + }) { + return query.updateProperties(limit: limit, { + if (minimalAreaSize != ignore) 12: minimalAreaSize as int?, + if (name != ignore) 14: name as String?, + }); + } +} + +extension LocationRequirementsQueryUpdate on IsarQuery { + _LocationRequirementsQueryUpdate get updateFirst => + _LocationRequirementsQueryUpdateImpl(this, limit: 1); + + _LocationRequirementsQueryUpdate get updateAll => + _LocationRequirementsQueryUpdateImpl(this); +} + +class _LocationRequirementsQueryBuilderUpdateImpl + implements _LocationRequirementsQueryUpdate { + const _LocationRequirementsQueryBuilderUpdateImpl(this.query, {this.limit}); + + final QueryBuilder + query; + final int? limit; + + @override + int call({ + Object? minimalAreaSize = ignore, + Object? name = ignore, + }) { + final q = query.build(); + try { + return q.updateProperties(limit: limit, { + if (minimalAreaSize != ignore) 12: minimalAreaSize as int?, + if (name != ignore) 14: name as String?, + }); + } finally { + q.close(); + } + } +} + +extension LocationRequirementsQueryBuilderUpdate + on QueryBuilder { + _LocationRequirementsQueryUpdate get updateFirst => + _LocationRequirementsQueryBuilderUpdateImpl(this, limit: 1); + + _LocationRequirementsQueryUpdate get updateAll => + _LocationRequirementsQueryBuilderUpdateImpl(this); +} + +extension LocationRequirementsQueryFilter on QueryBuilder { + QueryBuilder measuresIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 1)); + }); + } + + QueryBuilder measuresIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 1)); + }); + } + + QueryBuilder measuresIsEmpty() { + return not().group( + (q) => q.measuresIsNull().or().measuresIsNotEmpty(), + ); + } + + QueryBuilder measuresIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 1, value: null), + ); + }); + } + + QueryBuilder areaTypeIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 2)); + }); + } + + QueryBuilder areaTypeIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 2)); + }); + } + + QueryBuilder areaTypeIsEmpty() { + return not().group( + (q) => q.areaTypeIsNull().or().areaTypeIsNotEmpty(), + ); + } + + QueryBuilder areaTypeIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 2, value: null), + ); + }); + } + + QueryBuilder expositionIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 3)); + }); + } + + QueryBuilder expositionIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 3)); + }); + } + + QueryBuilder expositionIsEmpty() { + return not().group( + (q) => q.expositionIsNull().or().expositionIsNotEmpty(), + ); + } + + QueryBuilder expositionIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 3, value: null), + ); + }); + } + + QueryBuilder lightIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 4)); + }); + } + + QueryBuilder lightIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 4)); + }); + } + + QueryBuilder lightIsEmpty() { + return not().group( + (q) => q.lightIsNull().or().lightIsNotEmpty(), + ); + } + + QueryBuilder lightIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 4, value: null), + ); + }); + } + + QueryBuilder humidityIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 5)); + }); + } + + QueryBuilder humidityIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 5)); + }); + } + + QueryBuilder humidityIsEmpty() { + return not().group( + (q) => q.humidityIsNull().or().humidityIsNotEmpty(), + ); + } + + QueryBuilder humidityIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 5, value: null), + ); + }); + } + + QueryBuilder topographyIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 6)); + }); + } + + QueryBuilder topographyIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 6)); + }); + } + + QueryBuilder topographyIsEmpty() { + return not().group( + (q) => q.topographyIsNull().or().topographyIsNotEmpty(), + ); + } + + QueryBuilder topographyIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 6, value: null), + ); + }); + } + + QueryBuilder geometryIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 7)); + }); + } + + QueryBuilder geometryIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 7)); + }); + } + + QueryBuilder geometryIsEmpty() { + return not().group( + (q) => q.geometryIsNull().or().geometryIsNotEmpty(), + ); + } + + QueryBuilder geometryIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 7, value: null), + ); + }); + } + + QueryBuilder valueIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 8)); + }); + } + + QueryBuilder valueIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 8)); + }); + } + + QueryBuilder costsIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 9)); + }); + } + + QueryBuilder costsIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 9)); + }); + } + + QueryBuilder effortIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 10)); + }); + } + + QueryBuilder effortIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 10)); + }); + } + + QueryBuilder careEffortIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 11)); + }); + } + + QueryBuilder careEffortIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 11)); + }); + } + + QueryBuilder minimalAreaSizeIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 12)); + }); + } + + QueryBuilder minimalAreaSizeIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 12)); + }); + } + + QueryBuilder minimalAreaSizeEqualTo( + int? value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 12, + value: value, + ), + ); + }); + } + + QueryBuilder minimalAreaSizeGreaterThan( + int? value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 12, + value: value, + ), + ); + }); + } + + QueryBuilder minimalAreaSizeGreaterThanOrEqualTo( + int? value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 12, + value: value, + ), + ); + }); + } + + QueryBuilder minimalAreaSizeLessThan( + int? value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 12, + value: value, + ), + ); + }); + } + + QueryBuilder minimalAreaSizeLessThanOrEqualTo( + int? value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 12, + value: value, + ), + ); + }); + } + + QueryBuilder minimalAreaSizeBetween( + int? lower, + int? upper, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 12, + lower: lower, + upper: upper, + ), + ); + }); + } + + QueryBuilder groundIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 13)); + }); + } + + QueryBuilder groundIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 13)); + }); + } + + QueryBuilder groundIsEmpty() { + return not().group( + (q) => q.groundIsNull().or().groundIsNotEmpty(), + ); + } + + QueryBuilder groundIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 13, value: null), + ); + }); + } + + QueryBuilder idEqualTo( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder idGreaterThan( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder idGreaterThanOrEqualTo( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder idLessThan( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder idLessThanOrEqualTo( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder idBetween( + int lower, + int upper, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 0, + lower: lower, + upper: upper, + ), + ); + }); + } + + QueryBuilder nameIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 14)); + }); + } + + QueryBuilder nameIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 14)); + }); + } + + QueryBuilder nameEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 14, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 14, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 14, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 14, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 14, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 14, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 14, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 14, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + nameContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 14, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + nameMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 14, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 14, + value: '', + ), + ); + }); + } + + QueryBuilder nameIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 14, + value: '', + ), + ); + }); + } +} + +extension LocationRequirementsQueryObject on QueryBuilder { + QueryBuilder value(FilterQuery q) { + return QueryBuilder.apply(this, (query) { + return query.object(q, 8); + }); + } + + QueryBuilder costs(FilterQuery q) { + return QueryBuilder.apply(this, (query) { + return query.object(q, 9); + }); + } + + QueryBuilder effort(FilterQuery q) { + return QueryBuilder.apply(this, (query) { + return query.object(q, 10); + }); + } + + QueryBuilder careEffort(FilterQuery q) { + return QueryBuilder.apply(this, (query) { + return query.object(q, 11); + }); + } +} + +extension LocationRequirementsQuerySortBy + on QueryBuilder { + QueryBuilder + sortByMinimalAreaSize() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(12); + }); + } + + QueryBuilder + sortByMinimalAreaSizeDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(12, sort: Sort.desc); + }); + } + + QueryBuilder + sortById() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0); + }); + } + + QueryBuilder + sortByIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0, sort: Sort.desc); + }); + } + + QueryBuilder + sortByName({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 14, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByNameDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 14, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } +} + +extension LocationRequirementsQuerySortThenBy + on QueryBuilder { + QueryBuilder + thenByMinimalAreaSize() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(12); + }); + } + + QueryBuilder + thenByMinimalAreaSizeDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(12, sort: Sort.desc); + }); + } + + QueryBuilder + thenById() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0); + }); + } + + QueryBuilder + thenByIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0, sort: Sort.desc); + }); + } + + QueryBuilder + thenByName({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(14, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByNameDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(14, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } +} + +extension LocationRequirementsQueryWhereDistinct + on QueryBuilder { + QueryBuilder + distinctByMinimalAreaSize() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(12); + }); + } + + QueryBuilder + distinctByName({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(14, caseSensitive: caseSensitive); + }); + } +} + +extension LocationRequirementsQueryProperty1 + on QueryBuilder { + QueryBuilder?, QAfterProperty> + measuresProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(1); + }); + } + + QueryBuilder?, QAfterProperty> + areaTypeProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(2); + }); + } + + QueryBuilder?, QAfterProperty> + expositionProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(3); + }); + } + + QueryBuilder?, QAfterProperty> + lightProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(4); + }); + } + + QueryBuilder?, QAfterProperty> + humidityProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(5); + }); + } + + QueryBuilder?, QAfterProperty> + topographyProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(6); + }); + } + + QueryBuilder?, QAfterProperty> + geometryProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(7); + }); + } + + QueryBuilder + valueProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(8); + }); + } + + QueryBuilder + costsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(9); + }); + } + + QueryBuilder + effortProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(10); + }); + } + + QueryBuilder + careEffortProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(11); + }); + } + + QueryBuilder + minimalAreaSizeProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(12); + }); + } + + QueryBuilder?, QAfterProperty> + groundProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(13); + }); + } + + QueryBuilder idProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(0); + }); + } + + QueryBuilder nameProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(14); + }); + } +} + +extension LocationRequirementsQueryProperty2 + on QueryBuilder { + QueryBuilder?), QAfterProperty> + measuresProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(1); + }); + } + + QueryBuilder?), QAfterProperty> + areaTypeProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(2); + }); + } + + QueryBuilder?), QAfterProperty> + expositionProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(3); + }); + } + + QueryBuilder?), QAfterProperty> + lightProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(4); + }); + } + + QueryBuilder?), QAfterProperty> + humidityProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(5); + }); + } + + QueryBuilder?), QAfterProperty> + topographyProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(6); + }); + } + + QueryBuilder?), QAfterProperty> + geometryProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(7); + }); + } + + QueryBuilder + valueProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(8); + }); + } + + QueryBuilder + costsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(9); + }); + } + + QueryBuilder + effortProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(10); + }); + } + + QueryBuilder + careEffortProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(11); + }); + } + + QueryBuilder + minimalAreaSizeProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(12); + }); + } + + QueryBuilder?), QAfterProperty> + groundProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(13); + }); + } + + QueryBuilder idProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(0); + }); + } + + QueryBuilder + nameProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(14); + }); + } +} + +extension LocationRequirementsQueryProperty3 + on QueryBuilder { + QueryBuilder?), QOperations> + measuresProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(1); + }); + } + + QueryBuilder?), QOperations> + areaTypeProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(2); + }); + } + + QueryBuilder?), QOperations> + expositionProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(3); + }); + } + + QueryBuilder?), QOperations> + lightProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(4); + }); + } + + QueryBuilder?), QOperations> + humidityProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(5); + }); + } + + QueryBuilder?), QOperations> + topographyProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(6); + }); + } + + QueryBuilder?), QOperations> + geometryProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(7); + }); + } + + QueryBuilder + valueProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(8); + }); + } + + QueryBuilder + costsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(9); + }); + } + + QueryBuilder + effortProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(10); + }); + } + + QueryBuilder + careEffortProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(11); + }); + } + + QueryBuilder + minimalAreaSizeProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(12); + }); + } + + QueryBuilder?), QOperations> + groundProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(13); + }); + } + + QueryBuilder idProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(0); + }); + } + + QueryBuilder + nameProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(14); + }); + } +} + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +LocationRequirements _$LocationRequirementsFromJson( + Map json) => + LocationRequirements() + ..id = (json['id'] as num).toInt() + ..name = json['Name'] as String? + ..measures = + (json['Maßnahmentabelle Standortansprüche'] as List?) + ?.map((e) => IdValue.fromJson(e as Map)) + .toList() + ..areaType = (json['Flächentyp'] as List?) + ?.map((e) => IdValueColor.fromJson(e as Map)) + .toList() + ..exposition = (json['Exposition'] as List?) + ?.map((e) => IdValueColor.fromJson(e as Map)) + .toList() + ..light = (json['Licht'] as List?) + ?.map((e) => IdValueColor.fromJson(e as Map)) + .toList() + ..humidity = (json['Feuchtigkeit'] as List?) + ?.map((e) => IdValueColor.fromJson(e as Map)) + .toList() + ..topography = (json['Topographie'] as List?) + ?.map((e) => IdValueColor.fromJson(e as Map)) + .toList() + ..geometry = (json['Geometrie'] as List?) + ?.map((e) => IdValueColor.fromJson(e as Map)) + .toList() + ..value = json['Wertigkeit'] == null + ? null + : IdValueColor.fromJson(json['Wertigkeit'] as Map) + ..costs = json['Kosten'] == null + ? null + : IdValueColor.fromJson(json['Kosten'] as Map) + ..effort = json['Aufwand'] == null + ? null + : IdValueColor.fromJson(json['Aufwand'] as Map) + ..careEffort = json['Pflegeaufwand'] == null + ? null + : IdValueColor.fromJson(json['Pflegeaufwand'] as Map) + ..minimalAreaSize = (json['Mindesflächengröße in m²'] as num?)?.toInt() + ..ground = (json['Boden'] as List?) + ?.map((e) => IdValueColor.fromJson(e as Map)) + .toList(); + +Map _$LocationRequirementsToJson( + LocationRequirements instance) => + { + 'id': instance.id, + 'Name': instance.name, + 'Maßnahmentabelle Standortansprüche': + instance.measures?.map((e) => e.toJson()).toList(), + 'Flächentyp': instance.areaType?.map((e) => e.toJson()).toList(), + 'Exposition': instance.exposition?.map((e) => e.toJson()).toList(), + 'Licht': instance.light?.map((e) => e.toJson()).toList(), + 'Feuchtigkeit': instance.humidity?.map((e) => e.toJson()).toList(), + 'Topographie': instance.topography?.map((e) => e.toJson()).toList(), + 'Geometrie': instance.geometry?.map((e) => e.toJson()).toList(), + 'Wertigkeit': instance.value?.toJson(), + 'Kosten': instance.costs?.toJson(), + 'Aufwand': instance.effort?.toJson(), + 'Pflegeaufwand': instance.careEffort?.toJson(), + 'Mindesflächengröße in m²': instance.minimalAreaSize, + 'Boden': instance.ground?.map((e) => e.toJson()).toList(), + }; diff --git a/lib/src/entity/location_requirements/location_requirements_repository.dart b/lib/src/entity/location_requirements/location_requirements_repository.dart new file mode 100644 index 0000000..01229f9 --- /dev/null +++ b/lib/src/entity/location_requirements/location_requirements_repository.dart @@ -0,0 +1,10 @@ +import 'package:ambito/src/entity/entities.dart'; +import 'package:ambito/src/packages/ambito_db/base_db.dart'; +import 'package:isar/isar.dart'; + +import '../../../../main.dart'; + +class LocationRequirementsRepository extends BaseDB { + @override + IsarCollection collection = isar.locationRequirements; +} diff --git a/lib/src/entity/material/material.dart b/lib/src/entity/material/material.dart new file mode 100644 index 0000000..ab696ae --- /dev/null +++ b/lib/src/entity/material/material.dart @@ -0,0 +1,24 @@ +import 'package:ambito/src/entity/entities.dart'; +import 'package:isar/isar.dart'; +import 'package:json_annotation/json_annotation.dart'; + +part 'material.g.dart'; + +@JsonSerializable(explicitToJson: true) +@collection +class Material extends BaseEntity with EntityWithId { + Material(); + + @JsonKey(name: 'Name Material') + @Index(unique: true, hash: true) + String? name; + @JsonKey(name: 'Bezugsquelle') + List? sourceOfSupply; + @JsonKey(name: 'Durchschnittlicher Preis') + double? averagePrice; + + factory Material.fromJson(Map json) => + _$MaterialFromJson(json); + + Map toJson() => _$MaterialToJson(this); +} diff --git a/lib/src/entity/material/material.g.dart b/lib/src/entity/material/material.g.dart new file mode 100644 index 0000000..aaccdd1 --- /dev/null +++ b/lib/src/entity/material/material.g.dart @@ -0,0 +1,917 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'material.dart'; + +// ************************************************************************** +// _IsarCollectionGenerator +// ************************************************************************** + +// coverage:ignore-file +// ignore_for_file: duplicate_ignore, invalid_use_of_protected_member, lines_longer_than_80_chars, constant_identifier_names, avoid_js_rounded_ints, no_leading_underscores_for_local_identifiers, require_trailing_commas, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_in_if_null_operators, library_private_types_in_public_api, prefer_const_constructors +// ignore_for_file: type=lint + +extension GetMaterialCollection on Isar { + IsarCollection get materials => this.collection(); +} + +const MaterialSchema = IsarGeneratedSchema( + schema: IsarSchema( + name: 'Material', + idName: 'id', + embedded: false, + properties: [ + IsarPropertySchema( + name: 'name', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'sourceOfSupply', + type: IsarType.objectList, + target: 'IdValueColor', + ), + IsarPropertySchema( + name: 'averagePrice', + type: IsarType.double, + ), + ], + indexes: [ + IsarIndexSchema( + name: 'name', + properties: [ + "name", + ], + unique: true, + hash: true, + ), + ], + ), + converter: IsarObjectConverter( + serialize: serializeMaterial, + deserialize: deserializeMaterial, + deserializeProperty: deserializeMaterialProp, + ), + embeddedSchemas: [IdValueColorSchema], +); + +@isarProtected +int serializeMaterial(IsarWriter writer, Material object) { + { + final value = object.name; + if (value == null) { + IsarCore.writeNull(writer, 1); + } else { + IsarCore.writeString(writer, 1, value); + } + } + { + final list = object.sourceOfSupply; + if (list == null) { + IsarCore.writeNull(writer, 2); + } else { + final listWriter = IsarCore.beginList(writer, 2, list.length); + for (var i = 0; i < list.length; i++) { + { + final value = list[i]; + final objectWriter = IsarCore.beginObject(listWriter, i); + serializeIdValueColor(objectWriter, value); + IsarCore.endObject(listWriter, objectWriter); + } + } + IsarCore.endList(writer, listWriter); + } + } + IsarCore.writeDouble(writer, 3, object.averagePrice ?? double.nan); + return object.id; +} + +@isarProtected +Material deserializeMaterial(IsarReader reader) { + final object = Material(); + object.name = IsarCore.readString(reader, 1); + { + final length = IsarCore.readList(reader, 2, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.sourceOfSupply = null; + } else { + final list = + List.filled(length, IdValueColor(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValueColor(); + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + object.sourceOfSupply = list; + } + } + } + { + final value = IsarCore.readDouble(reader, 3); + if (value.isNaN) { + object.averagePrice = null; + } else { + object.averagePrice = value; + } + } + object.id = IsarCore.readId(reader); + return object; +} + +@isarProtected +dynamic deserializeMaterialProp(IsarReader reader, int property) { + switch (property) { + case 1: + return IsarCore.readString(reader, 1); + case 2: + { + final length = IsarCore.readList(reader, 2, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = List.filled(length, IdValueColor(), + growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValueColor(); + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 3: + { + final value = IsarCore.readDouble(reader, 3); + if (value.isNaN) { + return null; + } else { + return value; + } + } + case 0: + return IsarCore.readId(reader); + default: + throw ArgumentError('Unknown property: $property'); + } +} + +sealed class _MaterialUpdate { + bool call({ + required int id, + String? name, + double? averagePrice, + }); +} + +class _MaterialUpdateImpl implements _MaterialUpdate { + const _MaterialUpdateImpl(this.collection); + + final IsarCollection collection; + + @override + bool call({ + required int id, + Object? name = ignore, + Object? averagePrice = ignore, + }) { + return collection.updateProperties([ + id + ], { + if (name != ignore) 1: name as String?, + if (averagePrice != ignore) 3: averagePrice as double?, + }) > + 0; + } +} + +sealed class _MaterialUpdateAll { + int call({ + required List id, + String? name, + double? averagePrice, + }); +} + +class _MaterialUpdateAllImpl implements _MaterialUpdateAll { + const _MaterialUpdateAllImpl(this.collection); + + final IsarCollection collection; + + @override + int call({ + required List id, + Object? name = ignore, + Object? averagePrice = ignore, + }) { + return collection.updateProperties(id, { + if (name != ignore) 1: name as String?, + if (averagePrice != ignore) 3: averagePrice as double?, + }); + } +} + +extension MaterialUpdate on IsarCollection { + _MaterialUpdate get update => _MaterialUpdateImpl(this); + + _MaterialUpdateAll get updateAll => _MaterialUpdateAllImpl(this); +} + +sealed class _MaterialQueryUpdate { + int call({ + String? name, + double? averagePrice, + }); +} + +class _MaterialQueryUpdateImpl implements _MaterialQueryUpdate { + const _MaterialQueryUpdateImpl(this.query, {this.limit}); + + final IsarQuery query; + final int? limit; + + @override + int call({ + Object? name = ignore, + Object? averagePrice = ignore, + }) { + return query.updateProperties(limit: limit, { + if (name != ignore) 1: name as String?, + if (averagePrice != ignore) 3: averagePrice as double?, + }); + } +} + +extension MaterialQueryUpdate on IsarQuery { + _MaterialQueryUpdate get updateFirst => + _MaterialQueryUpdateImpl(this, limit: 1); + + _MaterialQueryUpdate get updateAll => _MaterialQueryUpdateImpl(this); +} + +class _MaterialQueryBuilderUpdateImpl implements _MaterialQueryUpdate { + const _MaterialQueryBuilderUpdateImpl(this.query, {this.limit}); + + final QueryBuilder query; + final int? limit; + + @override + int call({ + Object? name = ignore, + Object? averagePrice = ignore, + }) { + final q = query.build(); + try { + return q.updateProperties(limit: limit, { + if (name != ignore) 1: name as String?, + if (averagePrice != ignore) 3: averagePrice as double?, + }); + } finally { + q.close(); + } + } +} + +extension MaterialQueryBuilderUpdate + on QueryBuilder { + _MaterialQueryUpdate get updateFirst => + _MaterialQueryBuilderUpdateImpl(this, limit: 1); + + _MaterialQueryUpdate get updateAll => _MaterialQueryBuilderUpdateImpl(this); +} + +extension MaterialQueryFilter + on QueryBuilder { + QueryBuilder nameIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 1)); + }); + } + + QueryBuilder nameIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 1)); + }); + } + + QueryBuilder nameEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + nameGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 1, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameContains( + String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 1, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 1, + value: '', + ), + ); + }); + } + + QueryBuilder nameIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 1, + value: '', + ), + ); + }); + } + + QueryBuilder + sourceOfSupplyIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 2)); + }); + } + + QueryBuilder + sourceOfSupplyIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 2)); + }); + } + + QueryBuilder + sourceOfSupplyIsEmpty() { + return not().group( + (q) => q.sourceOfSupplyIsNull().or().sourceOfSupplyIsNotEmpty(), + ); + } + + QueryBuilder + sourceOfSupplyIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 2, value: null), + ); + }); + } + + QueryBuilder averagePriceIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 3)); + }); + } + + QueryBuilder + averagePriceIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 3)); + }); + } + + QueryBuilder averagePriceEqualTo( + double? value, { + double epsilon = Filter.epsilon, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 3, + value: value, + epsilon: epsilon, + ), + ); + }); + } + + QueryBuilder + averagePriceGreaterThan( + double? value, { + double epsilon = Filter.epsilon, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 3, + value: value, + epsilon: epsilon, + ), + ); + }); + } + + QueryBuilder + averagePriceGreaterThanOrEqualTo( + double? value, { + double epsilon = Filter.epsilon, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 3, + value: value, + epsilon: epsilon, + ), + ); + }); + } + + QueryBuilder averagePriceLessThan( + double? value, { + double epsilon = Filter.epsilon, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 3, + value: value, + epsilon: epsilon, + ), + ); + }); + } + + QueryBuilder + averagePriceLessThanOrEqualTo( + double? value, { + double epsilon = Filter.epsilon, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 3, + value: value, + epsilon: epsilon, + ), + ); + }); + } + + QueryBuilder averagePriceBetween( + double? lower, + double? upper, { + double epsilon = Filter.epsilon, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 3, + lower: lower, + upper: upper, + epsilon: epsilon, + ), + ); + }); + } + + QueryBuilder idEqualTo( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder idGreaterThan( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder + idGreaterThanOrEqualTo( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder idLessThan( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder idLessThanOrEqualTo( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder idBetween( + int lower, + int upper, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 0, + lower: lower, + upper: upper, + ), + ); + }); + } +} + +extension MaterialQueryObject + on QueryBuilder {} + +extension MaterialQuerySortBy on QueryBuilder { + QueryBuilder sortByName( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 1, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByNameDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 1, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByAveragePrice() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(3); + }); + } + + QueryBuilder sortByAveragePriceDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(3, sort: Sort.desc); + }); + } + + QueryBuilder sortById() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0); + }); + } + + QueryBuilder sortByIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0, sort: Sort.desc); + }); + } +} + +extension MaterialQuerySortThenBy + on QueryBuilder { + QueryBuilder thenByName( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(1, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByNameDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(1, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByAveragePrice() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(3); + }); + } + + QueryBuilder thenByAveragePriceDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(3, sort: Sort.desc); + }); + } + + QueryBuilder thenById() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0); + }); + } + + QueryBuilder thenByIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0, sort: Sort.desc); + }); + } +} + +extension MaterialQueryWhereDistinct + on QueryBuilder { + QueryBuilder distinctByName( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(1, caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctByAveragePrice() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(3); + }); + } +} + +extension MaterialQueryProperty1 + on QueryBuilder { + QueryBuilder nameProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(1); + }); + } + + QueryBuilder?, QAfterProperty> + sourceOfSupplyProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(2); + }); + } + + QueryBuilder averagePriceProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(3); + }); + } + + QueryBuilder idProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(0); + }); + } +} + +extension MaterialQueryProperty2 + on QueryBuilder { + QueryBuilder nameProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(1); + }); + } + + QueryBuilder?), QAfterProperty> + sourceOfSupplyProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(2); + }); + } + + QueryBuilder averagePriceProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(3); + }); + } + + QueryBuilder idProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(0); + }); + } +} + +extension MaterialQueryProperty3 + on QueryBuilder { + QueryBuilder nameProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(1); + }); + } + + QueryBuilder?), QOperations> + sourceOfSupplyProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(2); + }); + } + + QueryBuilder + averagePriceProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(3); + }); + } + + QueryBuilder idProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(0); + }); + } +} + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +Material _$MaterialFromJson(Map json) => Material() + ..id = (json['id'] as num).toInt() + ..name = json['Name Material'] as String? + ..sourceOfSupply = (json['Bezugsquelle'] as List?) + ?.map((e) => IdValueColor.fromJson(e as Map)) + .toList() + ..averagePrice = (json['Durchschnittlicher Preis'] as num?)?.toDouble(); + +Map _$MaterialToJson(Material instance) => { + 'id': instance.id, + 'Name Material': instance.name, + 'Bezugsquelle': instance.sourceOfSupply?.map((e) => e.toJson()).toList(), + 'Durchschnittlicher Preis': instance.averagePrice, + }; diff --git a/lib/src/entity/material/material_repository.dart b/lib/src/entity/material/material_repository.dart new file mode 100644 index 0000000..bdb08d8 --- /dev/null +++ b/lib/src/entity/material/material_repository.dart @@ -0,0 +1,10 @@ +import 'package:ambito/src/entity/entities.dart'; +import 'package:ambito/src/packages/ambito_db/base_db.dart'; +import 'package:isar/isar.dart'; + +import '../../../../main.dart'; + +class MaterialRepository extends BaseDB { + @override + IsarCollection collection = isar.materials; +} diff --git a/lib/src/domain/entity/measure/measure.dart b/lib/src/entity/measure/measure.dart similarity index 99% rename from lib/src/domain/entity/measure/measure.dart rename to lib/src/entity/measure/measure.dart index e76531b..c4c8f1b 100644 --- a/lib/src/domain/entity/measure/measure.dart +++ b/lib/src/entity/measure/measure.dart @@ -1,4 +1,4 @@ -import 'package:ambito/src/domain/entity/entities.dart'; +import 'package:ambito/src/entity/entities.dart'; import 'package:cached_network_image/cached_network_image.dart'; import 'package:flutter/material.dart'; import 'package:isar/isar.dart'; diff --git a/lib/src/domain/entity/measure/measure.g.dart b/lib/src/entity/measure/measure.g.dart similarity index 100% rename from lib/src/domain/entity/measure/measure.g.dart rename to lib/src/entity/measure/measure.g.dart diff --git a/lib/src/packages/ambito_db/repositories/measure_repository.dart b/lib/src/entity/measure/measure_repository.dart similarity index 77% rename from lib/src/packages/ambito_db/repositories/measure_repository.dart rename to lib/src/entity/measure/measure_repository.dart index 26a278b..a69a08e 100644 --- a/lib/src/packages/ambito_db/repositories/measure_repository.dart +++ b/lib/src/entity/measure/measure_repository.dart @@ -1,9 +1,10 @@ -import 'package:ambito/src/domain/entity/entities.dart'; +import 'package:ambito/src/entity/entities.dart'; import 'package:ambito/src/packages/ambito_db/base_db.dart'; import 'package:isar/isar.dart'; import '../../../../main.dart'; class MeasureRepository extends BaseDB { + @override IsarCollection collection = isar.measures; } diff --git a/lib/src/domain/entity/measure_combination/measure_combination.dart b/lib/src/entity/measure_combination/measure_combination.dart similarity index 91% rename from lib/src/domain/entity/measure_combination/measure_combination.dart rename to lib/src/entity/measure_combination/measure_combination.dart index 4d3c6b6..250879d 100644 --- a/lib/src/domain/entity/measure_combination/measure_combination.dart +++ b/lib/src/entity/measure_combination/measure_combination.dart @@ -1,4 +1,4 @@ -import 'package:ambito/src/domain/entity/entities.dart'; +import 'package:ambito/src/entity/entities.dart'; import 'package:isar/isar.dart'; import 'package:json_annotation/json_annotation.dart'; diff --git a/lib/src/domain/entity/measure_combination/measure_combination.g.dart b/lib/src/entity/measure_combination/measure_combination.g.dart similarity index 100% rename from lib/src/domain/entity/measure_combination/measure_combination.g.dart rename to lib/src/entity/measure_combination/measure_combination.g.dart diff --git a/lib/src/packages/ambito_db/repositories/measure_combination_repository.dart b/lib/src/entity/measure_combination/measure_combination_repository.dart similarity index 79% rename from lib/src/packages/ambito_db/repositories/measure_combination_repository.dart rename to lib/src/entity/measure_combination/measure_combination_repository.dart index e8e423e..f2f837b 100644 --- a/lib/src/packages/ambito_db/repositories/measure_combination_repository.dart +++ b/lib/src/entity/measure_combination/measure_combination_repository.dart @@ -1,9 +1,10 @@ -import 'package:ambito/src/domain/entity/entities.dart'; +import 'package:ambito/src/entity/entities.dart'; import 'package:ambito/src/packages/ambito_db/base_db.dart'; import 'package:isar/isar.dart'; import '../../../../main.dart'; class MeasureCombinationRepository extends BaseDB { + @override IsarCollection collection = isar.measureCombinations; } diff --git a/lib/src/entity/number_factsheet/number_factsheet.dart b/lib/src/entity/number_factsheet/number_factsheet.dart new file mode 100644 index 0000000..bd5af86 --- /dev/null +++ b/lib/src/entity/number_factsheet/number_factsheet.dart @@ -0,0 +1,30 @@ +import 'package:ambito/src/entity/base_entity.dart'; +import 'package:isar/isar.dart'; +import 'package:json_annotation/json_annotation.dart'; + +part 'number_factsheet.g.dart'; + +@JsonSerializable(explicitToJson: true) +@collection +class NumberFactsheet extends BaseEntity with EntityWithId { + NumberFactsheet(); + + @JsonKey(name: 'Einzelmaßnahme(3. Ebene)') + @Index(unique: true, hash: true) + String? singleMeasure; + @JsonKey(name: '00 Maßnahmen_Main') + @Index() + String? measure; + @JsonKey(name: 'Formel') + String? formula; + @JsonKey(name: 'versandfertig als PDF abgelegt') + String? readyPDF; + @JsonKey(name: 'Nr.') + String? number; + @JsonKey(name: 'Priorität') + String? priority; + @JsonKey( + name: + 'Maßnahmendatenblatt Qualitätskontrolle vollständig und ok (KM) (2402610)') + String? qmPassed; +} diff --git a/lib/src/entity/number_factsheet/number_factsheet.g.dart b/lib/src/entity/number_factsheet/number_factsheet.g.dart new file mode 100644 index 0000000..f15c59e --- /dev/null +++ b/lib/src/entity/number_factsheet/number_factsheet.g.dart @@ -0,0 +1,2334 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'number_factsheet.dart'; + +// ************************************************************************** +// _IsarCollectionGenerator +// ************************************************************************** + +// coverage:ignore-file +// ignore_for_file: duplicate_ignore, invalid_use_of_protected_member, lines_longer_than_80_chars, constant_identifier_names, avoid_js_rounded_ints, no_leading_underscores_for_local_identifiers, require_trailing_commas, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_in_if_null_operators, library_private_types_in_public_api, prefer_const_constructors +// ignore_for_file: type=lint + +extension GetNumberFactsheetCollection on Isar { + IsarCollection get numberFactsheets => + this.collection(); +} + +const NumberFactsheetSchema = IsarGeneratedSchema( + schema: IsarSchema( + name: 'NumberFactsheet', + idName: 'id', + embedded: false, + properties: [ + IsarPropertySchema( + name: 'singleMeasure', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'measure', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'formula', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'readyPDF', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'number', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'priority', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'qmPassed', + type: IsarType.string, + ), + ], + indexes: [ + IsarIndexSchema( + name: 'singleMeasure', + properties: [ + "singleMeasure", + ], + unique: true, + hash: true, + ), + IsarIndexSchema( + name: 'measure', + properties: [ + "measure", + ], + unique: false, + hash: false, + ), + ], + ), + converter: IsarObjectConverter( + serialize: serializeNumberFactsheet, + deserialize: deserializeNumberFactsheet, + deserializeProperty: deserializeNumberFactsheetProp, + ), + embeddedSchemas: [], +); + +@isarProtected +int serializeNumberFactsheet(IsarWriter writer, NumberFactsheet object) { + { + final value = object.singleMeasure; + if (value == null) { + IsarCore.writeNull(writer, 1); + } else { + IsarCore.writeString(writer, 1, value); + } + } + { + final value = object.measure; + if (value == null) { + IsarCore.writeNull(writer, 2); + } else { + IsarCore.writeString(writer, 2, value); + } + } + { + final value = object.formula; + if (value == null) { + IsarCore.writeNull(writer, 3); + } else { + IsarCore.writeString(writer, 3, value); + } + } + { + final value = object.readyPDF; + if (value == null) { + IsarCore.writeNull(writer, 4); + } else { + IsarCore.writeString(writer, 4, value); + } + } + { + final value = object.number; + if (value == null) { + IsarCore.writeNull(writer, 5); + } else { + IsarCore.writeString(writer, 5, value); + } + } + { + final value = object.priority; + if (value == null) { + IsarCore.writeNull(writer, 6); + } else { + IsarCore.writeString(writer, 6, value); + } + } + { + final value = object.qmPassed; + if (value == null) { + IsarCore.writeNull(writer, 7); + } else { + IsarCore.writeString(writer, 7, value); + } + } + return object.id; +} + +@isarProtected +NumberFactsheet deserializeNumberFactsheet(IsarReader reader) { + final object = NumberFactsheet(); + object.singleMeasure = IsarCore.readString(reader, 1); + object.measure = IsarCore.readString(reader, 2); + object.formula = IsarCore.readString(reader, 3); + object.readyPDF = IsarCore.readString(reader, 4); + object.number = IsarCore.readString(reader, 5); + object.priority = IsarCore.readString(reader, 6); + object.qmPassed = IsarCore.readString(reader, 7); + object.id = IsarCore.readId(reader); + return object; +} + +@isarProtected +dynamic deserializeNumberFactsheetProp(IsarReader reader, int property) { + switch (property) { + case 1: + return IsarCore.readString(reader, 1); + case 2: + return IsarCore.readString(reader, 2); + case 3: + return IsarCore.readString(reader, 3); + case 4: + return IsarCore.readString(reader, 4); + case 5: + return IsarCore.readString(reader, 5); + case 6: + return IsarCore.readString(reader, 6); + case 7: + return IsarCore.readString(reader, 7); + case 0: + return IsarCore.readId(reader); + default: + throw ArgumentError('Unknown property: $property'); + } +} + +sealed class _NumberFactsheetUpdate { + bool call({ + required int id, + String? singleMeasure, + String? measure, + String? formula, + String? readyPDF, + String? number, + String? priority, + String? qmPassed, + }); +} + +class _NumberFactsheetUpdateImpl implements _NumberFactsheetUpdate { + const _NumberFactsheetUpdateImpl(this.collection); + + final IsarCollection collection; + + @override + bool call({ + required int id, + Object? singleMeasure = ignore, + Object? measure = ignore, + Object? formula = ignore, + Object? readyPDF = ignore, + Object? number = ignore, + Object? priority = ignore, + Object? qmPassed = ignore, + }) { + return collection.updateProperties([ + id + ], { + if (singleMeasure != ignore) 1: singleMeasure as String?, + if (measure != ignore) 2: measure as String?, + if (formula != ignore) 3: formula as String?, + if (readyPDF != ignore) 4: readyPDF as String?, + if (number != ignore) 5: number as String?, + if (priority != ignore) 6: priority as String?, + if (qmPassed != ignore) 7: qmPassed as String?, + }) > + 0; + } +} + +sealed class _NumberFactsheetUpdateAll { + int call({ + required List id, + String? singleMeasure, + String? measure, + String? formula, + String? readyPDF, + String? number, + String? priority, + String? qmPassed, + }); +} + +class _NumberFactsheetUpdateAllImpl implements _NumberFactsheetUpdateAll { + const _NumberFactsheetUpdateAllImpl(this.collection); + + final IsarCollection collection; + + @override + int call({ + required List id, + Object? singleMeasure = ignore, + Object? measure = ignore, + Object? formula = ignore, + Object? readyPDF = ignore, + Object? number = ignore, + Object? priority = ignore, + Object? qmPassed = ignore, + }) { + return collection.updateProperties(id, { + if (singleMeasure != ignore) 1: singleMeasure as String?, + if (measure != ignore) 2: measure as String?, + if (formula != ignore) 3: formula as String?, + if (readyPDF != ignore) 4: readyPDF as String?, + if (number != ignore) 5: number as String?, + if (priority != ignore) 6: priority as String?, + if (qmPassed != ignore) 7: qmPassed as String?, + }); + } +} + +extension NumberFactsheetUpdate on IsarCollection { + _NumberFactsheetUpdate get update => _NumberFactsheetUpdateImpl(this); + + _NumberFactsheetUpdateAll get updateAll => + _NumberFactsheetUpdateAllImpl(this); +} + +sealed class _NumberFactsheetQueryUpdate { + int call({ + String? singleMeasure, + String? measure, + String? formula, + String? readyPDF, + String? number, + String? priority, + String? qmPassed, + }); +} + +class _NumberFactsheetQueryUpdateImpl implements _NumberFactsheetQueryUpdate { + const _NumberFactsheetQueryUpdateImpl(this.query, {this.limit}); + + final IsarQuery query; + final int? limit; + + @override + int call({ + Object? singleMeasure = ignore, + Object? measure = ignore, + Object? formula = ignore, + Object? readyPDF = ignore, + Object? number = ignore, + Object? priority = ignore, + Object? qmPassed = ignore, + }) { + return query.updateProperties(limit: limit, { + if (singleMeasure != ignore) 1: singleMeasure as String?, + if (measure != ignore) 2: measure as String?, + if (formula != ignore) 3: formula as String?, + if (readyPDF != ignore) 4: readyPDF as String?, + if (number != ignore) 5: number as String?, + if (priority != ignore) 6: priority as String?, + if (qmPassed != ignore) 7: qmPassed as String?, + }); + } +} + +extension NumberFactsheetQueryUpdate on IsarQuery { + _NumberFactsheetQueryUpdate get updateFirst => + _NumberFactsheetQueryUpdateImpl(this, limit: 1); + + _NumberFactsheetQueryUpdate get updateAll => + _NumberFactsheetQueryUpdateImpl(this); +} + +class _NumberFactsheetQueryBuilderUpdateImpl + implements _NumberFactsheetQueryUpdate { + const _NumberFactsheetQueryBuilderUpdateImpl(this.query, {this.limit}); + + final QueryBuilder query; + final int? limit; + + @override + int call({ + Object? singleMeasure = ignore, + Object? measure = ignore, + Object? formula = ignore, + Object? readyPDF = ignore, + Object? number = ignore, + Object? priority = ignore, + Object? qmPassed = ignore, + }) { + final q = query.build(); + try { + return q.updateProperties(limit: limit, { + if (singleMeasure != ignore) 1: singleMeasure as String?, + if (measure != ignore) 2: measure as String?, + if (formula != ignore) 3: formula as String?, + if (readyPDF != ignore) 4: readyPDF as String?, + if (number != ignore) 5: number as String?, + if (priority != ignore) 6: priority as String?, + if (qmPassed != ignore) 7: qmPassed as String?, + }); + } finally { + q.close(); + } + } +} + +extension NumberFactsheetQueryBuilderUpdate + on QueryBuilder { + _NumberFactsheetQueryUpdate get updateFirst => + _NumberFactsheetQueryBuilderUpdateImpl(this, limit: 1); + + _NumberFactsheetQueryUpdate get updateAll => + _NumberFactsheetQueryBuilderUpdateImpl(this); +} + +extension NumberFactsheetQueryFilter + on QueryBuilder { + QueryBuilder + singleMeasureIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 1)); + }); + } + + QueryBuilder + singleMeasureIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 1)); + }); + } + + QueryBuilder + singleMeasureEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + singleMeasureGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + singleMeasureGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + singleMeasureLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + singleMeasureLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + singleMeasureBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 1, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + singleMeasureStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + singleMeasureEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + singleMeasureContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + singleMeasureMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 1, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + singleMeasureIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 1, + value: '', + ), + ); + }); + } + + QueryBuilder + singleMeasureIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 1, + value: '', + ), + ); + }); + } + + QueryBuilder + measureIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 2)); + }); + } + + QueryBuilder + measureIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 2)); + }); + } + + QueryBuilder + measureEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + measureGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + measureGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + measureLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + measureLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + measureBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 2, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + measureStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + measureEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + measureContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + measureMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 2, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + measureIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 2, + value: '', + ), + ); + }); + } + + QueryBuilder + measureIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 2, + value: '', + ), + ); + }); + } + + QueryBuilder + formulaIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 3)); + }); + } + + QueryBuilder + formulaIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 3)); + }); + } + + QueryBuilder + formulaEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + formulaGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + formulaGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + formulaLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + formulaLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + formulaBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 3, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + formulaStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + formulaEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + formulaContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + formulaMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 3, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + formulaIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 3, + value: '', + ), + ); + }); + } + + QueryBuilder + formulaIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 3, + value: '', + ), + ); + }); + } + + QueryBuilder + readyPDFIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 4)); + }); + } + + QueryBuilder + readyPDFIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 4)); + }); + } + + QueryBuilder + readyPDFEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 4, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + readyPDFGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 4, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + readyPDFGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 4, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + readyPDFLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 4, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + readyPDFLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 4, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + readyPDFBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 4, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + readyPDFStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 4, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + readyPDFEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 4, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + readyPDFContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 4, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + readyPDFMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 4, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + readyPDFIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 4, + value: '', + ), + ); + }); + } + + QueryBuilder + readyPDFIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 4, + value: '', + ), + ); + }); + } + + QueryBuilder + numberIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 5)); + }); + } + + QueryBuilder + numberIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 5)); + }); + } + + QueryBuilder + numberEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 5, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 5, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + numberIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 5, + value: '', + ), + ); + }); + } + + QueryBuilder + numberIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 5, + value: '', + ), + ); + }); + } + + QueryBuilder + priorityIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 6)); + }); + } + + QueryBuilder + priorityIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 6)); + }); + } + + QueryBuilder + priorityEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + priorityGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + priorityGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + priorityLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + priorityLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + priorityBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 6, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + priorityStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + priorityEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + priorityContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + priorityMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 6, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + priorityIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 6, + value: '', + ), + ); + }); + } + + QueryBuilder + priorityIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 6, + value: '', + ), + ); + }); + } + + QueryBuilder + qmPassedIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 7)); + }); + } + + QueryBuilder + qmPassedIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 7)); + }); + } + + QueryBuilder + qmPassedEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 7, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + qmPassedGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 7, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + qmPassedGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 7, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + qmPassedLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 7, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + qmPassedLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 7, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + qmPassedBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 7, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + qmPassedStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 7, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + qmPassedEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 7, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + qmPassedContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 7, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + qmPassedMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 7, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + qmPassedIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 7, + value: '', + ), + ); + }); + } + + QueryBuilder + qmPassedIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 7, + value: '', + ), + ); + }); + } + + QueryBuilder + idEqualTo( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder + idGreaterThan( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder + idGreaterThanOrEqualTo( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder + idLessThan( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder + idLessThanOrEqualTo( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder + idBetween( + int lower, + int upper, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 0, + lower: lower, + upper: upper, + ), + ); + }); + } +} + +extension NumberFactsheetQueryObject + on QueryBuilder {} + +extension NumberFactsheetQuerySortBy + on QueryBuilder { + QueryBuilder + sortBySingleMeasure({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 1, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortBySingleMeasureDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 1, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByMeasure( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 2, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByMeasureDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 2, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByFormula( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 3, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByFormulaDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 3, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByReadyPDF( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 4, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByReadyPDFDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 4, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByNumber( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 5, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByNumberDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 5, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByPriority( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 6, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByPriorityDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 6, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByQmPassed( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 7, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByQmPassedDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 7, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortById() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0); + }); + } + + QueryBuilder sortByIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0, sort: Sort.desc); + }); + } +} + +extension NumberFactsheetQuerySortThenBy + on QueryBuilder { + QueryBuilder + thenBySingleMeasure({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(1, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenBySingleMeasureDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(1, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByMeasure( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(2, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByMeasureDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(2, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByFormula( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(3, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByFormulaDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(3, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByReadyPDF( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(4, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByReadyPDFDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(4, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByNumber( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(5, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByNumberDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(5, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByPriority( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(6, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByPriorityDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(6, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByQmPassed( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(7, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByQmPassedDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(7, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenById() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0); + }); + } + + QueryBuilder thenByIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0, sort: Sort.desc); + }); + } +} + +extension NumberFactsheetQueryWhereDistinct + on QueryBuilder { + QueryBuilder + distinctBySingleMeasure({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(1, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByMeasure({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(2, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByFormula({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(3, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByReadyPDF({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(4, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByNumber({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(5, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByPriority({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(6, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByQmPassed({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(7, caseSensitive: caseSensitive); + }); + } +} + +extension NumberFactsheetQueryProperty1 + on QueryBuilder { + QueryBuilder + singleMeasureProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(1); + }); + } + + QueryBuilder measureProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(2); + }); + } + + QueryBuilder formulaProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(3); + }); + } + + QueryBuilder readyPDFProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(4); + }); + } + + QueryBuilder numberProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(5); + }); + } + + QueryBuilder priorityProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(6); + }); + } + + QueryBuilder qmPassedProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(7); + }); + } + + QueryBuilder idProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(0); + }); + } +} + +extension NumberFactsheetQueryProperty2 + on QueryBuilder { + QueryBuilder + singleMeasureProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(1); + }); + } + + QueryBuilder + measureProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(2); + }); + } + + QueryBuilder + formulaProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(3); + }); + } + + QueryBuilder + readyPDFProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(4); + }); + } + + QueryBuilder numberProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(5); + }); + } + + QueryBuilder + priorityProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(6); + }); + } + + QueryBuilder + qmPassedProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(7); + }); + } + + QueryBuilder idProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(0); + }); + } +} + +extension NumberFactsheetQueryProperty3 + on QueryBuilder { + QueryBuilder + singleMeasureProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(1); + }); + } + + QueryBuilder + measureProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(2); + }); + } + + QueryBuilder + formulaProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(3); + }); + } + + QueryBuilder + readyPDFProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(4); + }); + } + + QueryBuilder + numberProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(5); + }); + } + + QueryBuilder + priorityProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(6); + }); + } + + QueryBuilder + qmPassedProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(7); + }); + } + + QueryBuilder idProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(0); + }); + } +} + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +NumberFactsheet _$NumberFactsheetFromJson(Map json) => + NumberFactsheet() + ..id = (json['id'] as num).toInt() + ..singleMeasure = json['Einzelmaßnahme(3. Ebene)'] as String? + ..measure = json['00 Maßnahmen_Main'] as String? + ..formula = json['Formel'] as String? + ..readyPDF = json['versandfertig als PDF abgelegt'] as String? + ..number = json['Nr.'] as String? + ..priority = json['Priorität'] as String? + ..qmPassed = json[ + 'Maßnahmendatenblatt Qualitätskontrolle vollständig und ok (KM) (2402610)'] + as String?; + +Map _$NumberFactsheetToJson(NumberFactsheet instance) => + { + 'id': instance.id, + 'Einzelmaßnahme(3. Ebene)': instance.singleMeasure, + '00 Maßnahmen_Main': instance.measure, + 'Formel': instance.formula, + 'versandfertig als PDF abgelegt': instance.readyPDF, + 'Nr.': instance.number, + 'Priorität': instance.priority, + 'Maßnahmendatenblatt Qualitätskontrolle vollständig und ok (KM) (2402610)': + instance.qmPassed, + }; diff --git a/lib/src/entity/number_factsheet/number_factsheet_repository.dart b/lib/src/entity/number_factsheet/number_factsheet_repository.dart new file mode 100644 index 0000000..20fe134 --- /dev/null +++ b/lib/src/entity/number_factsheet/number_factsheet_repository.dart @@ -0,0 +1,10 @@ +import 'package:ambito/src/entity/entities.dart'; +import 'package:ambito/src/packages/ambito_db/base_db.dart'; +import 'package:isar/isar.dart'; + +import '../../../../main.dart'; + +class NumberFactsheetRepository extends BaseDB { + @override + IsarCollection collection = isar.numberFactsheets; +} diff --git a/lib/src/domain/entity/organism/organism.dart b/lib/src/entity/organism/organism.dart similarity index 88% rename from lib/src/domain/entity/organism/organism.dart rename to lib/src/entity/organism/organism.dart index a3e172a..3b21ae2 100644 --- a/lib/src/domain/entity/organism/organism.dart +++ b/lib/src/entity/organism/organism.dart @@ -1,4 +1,4 @@ -import 'package:ambito/src/domain/entity/entities.dart'; +import 'package:ambito/src/entity/entities.dart'; import 'package:isar/isar.dart'; import 'package:json_annotation/json_annotation.dart'; diff --git a/lib/src/domain/entity/organism/organism.g.dart b/lib/src/entity/organism/organism.g.dart similarity index 100% rename from lib/src/domain/entity/organism/organism.g.dart rename to lib/src/entity/organism/organism.g.dart diff --git a/lib/src/packages/ambito_db/repositories/organism_repository.dart b/lib/src/entity/organism/organism_repository.dart similarity index 77% rename from lib/src/packages/ambito_db/repositories/organism_repository.dart rename to lib/src/entity/organism/organism_repository.dart index a9a3592..c5f8b0b 100644 --- a/lib/src/packages/ambito_db/repositories/organism_repository.dart +++ b/lib/src/entity/organism/organism_repository.dart @@ -1,9 +1,10 @@ -import 'package:ambito/src/domain/entity/entities.dart'; +import 'package:ambito/src/entity/entities.dart'; import 'package:ambito/src/packages/ambito_db/base_db.dart'; import 'package:isar/isar.dart'; import '../../../../main.dart'; class OrganismRepository extends BaseDB { + @override IsarCollection collection = isar.organisms; } diff --git a/lib/src/entity/reference_implementation/reference_implementation.dart b/lib/src/entity/reference_implementation/reference_implementation.dart new file mode 100644 index 0000000..e48f280 --- /dev/null +++ b/lib/src/entity/reference_implementation/reference_implementation.dart @@ -0,0 +1,65 @@ +import 'package:ambito/src/entity/entities.dart'; +import 'package:isar/isar.dart'; +import 'package:json_annotation/json_annotation.dart'; + +part 'reference_implementation.g.dart'; + +@JsonSerializable() +@collection +class ReferenceImplementation extends BaseEntity with EntityWithId { + ReferenceImplementation(); + + @JsonKey(name: 'Liste aller Maßnahmen') + @Index() + String? listOfMeasures; + @JsonKey(name: 'Datum der Anlage') + String? dateStart; + @JsonKey(name: '06 Betriebsverzeichnis') + List? businessDirectory; + @JsonKey(name: '00 Maßnahmendatenbank') + List? measures; + @JsonKey(name: 'Größe in m²') + int? areaSize; + @JsonKey(name: 'Beschreibung') + String? description; + @JsonKey(name: 'Fotos') + List images = []; + @JsonKey(name: 'Gesamtkosten') + String? costsTotal; + @JsonKey(name: 'Link zum Geomarker') + String? linkToGeo; + @JsonKey(name: 'Status') + IdValueColor? status; + @JsonKey(name: 'Materialbezug ohne AmBiTo') + bool externalOrder = false; + @JsonKey(name: 'Anzahl Elemente') + String? elementCount; + @JsonKey(name: 'Bestellwert') + String? orderValue; + + @JsonKey(name: 'Lieferung') + String? shippingCosts; + @JsonKey(name: 'Anlage') + String? constructionCosts; + @JsonKey(name: 'Sträucher Kosten') + String? shrubsCosts; + @JsonKey(name: 'Bäume Kosten') + String? treeCosts; + @JsonKey(name: 'Sträucher Pflanzkosten') + String? shrubsPlantingCosts; + @JsonKey(name: 'Bäume Pflanzkosten') + String? treePlantingCosts; + @JsonKey(name: 'Anzahl Sträucher') + String? shrubsCount; + @JsonKey(name: 'Anzahl Bäume') + String? treeCount; + @JsonKey(name: 'Anmerkung') + String? note; + @JsonKey(name: 'Bearbeitet von') + IdValue? editedBy; + + factory ReferenceImplementation.fromJson(Map json) => + _$ReferenceImplementationFromJson(json); + + Map toJson() => _$ReferenceImplementationToJson(this); +} diff --git a/lib/src/entity/reference_implementation/reference_implementation.g.dart b/lib/src/entity/reference_implementation/reference_implementation.g.dart new file mode 100644 index 0000000..21a8397 --- /dev/null +++ b/lib/src/entity/reference_implementation/reference_implementation.g.dart @@ -0,0 +1,5763 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'reference_implementation.dart'; + +// ************************************************************************** +// _IsarCollectionGenerator +// ************************************************************************** + +// coverage:ignore-file +// ignore_for_file: duplicate_ignore, invalid_use_of_protected_member, lines_longer_than_80_chars, constant_identifier_names, avoid_js_rounded_ints, no_leading_underscores_for_local_identifiers, require_trailing_commas, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_in_if_null_operators, library_private_types_in_public_api, prefer_const_constructors +// ignore_for_file: type=lint + +extension GetReferenceImplementationCollection on Isar { + IsarCollection get referenceImplementations => + this.collection(); +} + +const ReferenceImplementationSchema = IsarGeneratedSchema( + schema: IsarSchema( + name: 'ReferenceImplementation', + idName: 'id', + embedded: false, + properties: [ + IsarPropertySchema( + name: 'listOfMeasures', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'dateStart', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'businessDirectory', + type: IsarType.objectList, + target: 'IdValue', + ), + IsarPropertySchema( + name: 'measures', + type: IsarType.objectList, + target: 'IdValue', + ), + IsarPropertySchema( + name: 'areaSize', + type: IsarType.long, + ), + IsarPropertySchema( + name: 'description', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'images', + type: IsarType.objectList, + target: 'FilePart', + ), + IsarPropertySchema( + name: 'costsTotal', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'linkToGeo', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'status', + type: IsarType.object, + target: 'IdValueColor', + ), + IsarPropertySchema( + name: 'externalOrder', + type: IsarType.bool, + ), + IsarPropertySchema( + name: 'elementCount', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'orderValue', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'shippingCosts', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'constructionCosts', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'shrubsCosts', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'treeCosts', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'shrubsPlantingCosts', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'treePlantingCosts', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'shrubsCount', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'treeCount', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'note', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'editedBy', + type: IsarType.object, + target: 'IdValue', + ), + ], + indexes: [ + IsarIndexSchema( + name: 'listOfMeasures', + properties: [ + "listOfMeasures", + ], + unique: false, + hash: false, + ), + ], + ), + converter: IsarObjectConverter( + serialize: serializeReferenceImplementation, + deserialize: deserializeReferenceImplementation, + deserializeProperty: deserializeReferenceImplementationProp, + ), + embeddedSchemas: [ + IdValueSchema, + FilePartSchema, + ThumbnailsSchema, + ThumbnailSchema, + IdValueColorSchema + ], +); + +@isarProtected +int serializeReferenceImplementation( + IsarWriter writer, ReferenceImplementation object) { + { + final value = object.listOfMeasures; + if (value == null) { + IsarCore.writeNull(writer, 1); + } else { + IsarCore.writeString(writer, 1, value); + } + } + { + final value = object.dateStart; + if (value == null) { + IsarCore.writeNull(writer, 2); + } else { + IsarCore.writeString(writer, 2, value); + } + } + { + final list = object.businessDirectory; + if (list == null) { + IsarCore.writeNull(writer, 3); + } else { + final listWriter = IsarCore.beginList(writer, 3, list.length); + for (var i = 0; i < list.length; i++) { + { + final value = list[i]; + final objectWriter = IsarCore.beginObject(listWriter, i); + serializeIdValue(objectWriter, value); + IsarCore.endObject(listWriter, objectWriter); + } + } + IsarCore.endList(writer, listWriter); + } + } + { + final list = object.measures; + if (list == null) { + IsarCore.writeNull(writer, 4); + } else { + final listWriter = IsarCore.beginList(writer, 4, list.length); + for (var i = 0; i < list.length; i++) { + { + final value = list[i]; + final objectWriter = IsarCore.beginObject(listWriter, i); + serializeIdValue(objectWriter, value); + IsarCore.endObject(listWriter, objectWriter); + } + } + IsarCore.endList(writer, listWriter); + } + } + IsarCore.writeLong(writer, 5, object.areaSize ?? -9223372036854775808); + { + final value = object.description; + if (value == null) { + IsarCore.writeNull(writer, 6); + } else { + IsarCore.writeString(writer, 6, value); + } + } + { + final list = object.images; + final listWriter = IsarCore.beginList(writer, 7, list.length); + for (var i = 0; i < list.length; i++) { + { + final value = list[i]; + final objectWriter = IsarCore.beginObject(listWriter, i); + serializeFilePart(objectWriter, value); + IsarCore.endObject(listWriter, objectWriter); + } + } + IsarCore.endList(writer, listWriter); + } + { + final value = object.costsTotal; + if (value == null) { + IsarCore.writeNull(writer, 8); + } else { + IsarCore.writeString(writer, 8, value); + } + } + { + final value = object.linkToGeo; + if (value == null) { + IsarCore.writeNull(writer, 9); + } else { + IsarCore.writeString(writer, 9, value); + } + } + { + final value = object.status; + if (value == null) { + IsarCore.writeNull(writer, 10); + } else { + final objectWriter = IsarCore.beginObject(writer, 10); + serializeIdValueColor(objectWriter, value); + IsarCore.endObject(writer, objectWriter); + } + } + IsarCore.writeBool(writer, 11, object.externalOrder); + { + final value = object.elementCount; + if (value == null) { + IsarCore.writeNull(writer, 12); + } else { + IsarCore.writeString(writer, 12, value); + } + } + { + final value = object.orderValue; + if (value == null) { + IsarCore.writeNull(writer, 13); + } else { + IsarCore.writeString(writer, 13, value); + } + } + { + final value = object.shippingCosts; + if (value == null) { + IsarCore.writeNull(writer, 14); + } else { + IsarCore.writeString(writer, 14, value); + } + } + { + final value = object.constructionCosts; + if (value == null) { + IsarCore.writeNull(writer, 15); + } else { + IsarCore.writeString(writer, 15, value); + } + } + { + final value = object.shrubsCosts; + if (value == null) { + IsarCore.writeNull(writer, 16); + } else { + IsarCore.writeString(writer, 16, value); + } + } + { + final value = object.treeCosts; + if (value == null) { + IsarCore.writeNull(writer, 17); + } else { + IsarCore.writeString(writer, 17, value); + } + } + { + final value = object.shrubsPlantingCosts; + if (value == null) { + IsarCore.writeNull(writer, 18); + } else { + IsarCore.writeString(writer, 18, value); + } + } + { + final value = object.treePlantingCosts; + if (value == null) { + IsarCore.writeNull(writer, 19); + } else { + IsarCore.writeString(writer, 19, value); + } + } + { + final value = object.shrubsCount; + if (value == null) { + IsarCore.writeNull(writer, 20); + } else { + IsarCore.writeString(writer, 20, value); + } + } + { + final value = object.treeCount; + if (value == null) { + IsarCore.writeNull(writer, 21); + } else { + IsarCore.writeString(writer, 21, value); + } + } + { + final value = object.note; + if (value == null) { + IsarCore.writeNull(writer, 22); + } else { + IsarCore.writeString(writer, 22, value); + } + } + { + final value = object.editedBy; + if (value == null) { + IsarCore.writeNull(writer, 23); + } else { + final objectWriter = IsarCore.beginObject(writer, 23); + serializeIdValue(objectWriter, value); + IsarCore.endObject(writer, objectWriter); + } + } + return object.id; +} + +@isarProtected +ReferenceImplementation deserializeReferenceImplementation(IsarReader reader) { + final object = ReferenceImplementation(); + object.listOfMeasures = IsarCore.readString(reader, 1); + object.dateStart = IsarCore.readString(reader, 2); + { + final length = IsarCore.readList(reader, 3, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.businessDirectory = null; + } else { + final list = List.filled(length, IdValue(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValue(); + } else { + final embedded = deserializeIdValue(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + object.businessDirectory = list; + } + } + } + { + final length = IsarCore.readList(reader, 4, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.measures = null; + } else { + final list = List.filled(length, IdValue(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValue(); + } else { + final embedded = deserializeIdValue(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + object.measures = list; + } + } + } + { + final value = IsarCore.readLong(reader, 5); + if (value == -9223372036854775808) { + object.areaSize = null; + } else { + object.areaSize = value; + } + } + object.description = IsarCore.readString(reader, 6); + { + final length = IsarCore.readList(reader, 7, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.images = const []; + } else { + final list = List.filled(length, FilePart(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = FilePart(); + } else { + final embedded = deserializeFilePart(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + object.images = list; + } + } + } + object.costsTotal = IsarCore.readString(reader, 8); + object.linkToGeo = IsarCore.readString(reader, 9); + { + final objectReader = IsarCore.readObject(reader, 10); + if (objectReader.isNull) { + object.status = null; + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + object.status = embedded; + } + } + object.externalOrder = IsarCore.readBool(reader, 11); + object.elementCount = IsarCore.readString(reader, 12); + object.orderValue = IsarCore.readString(reader, 13); + object.shippingCosts = IsarCore.readString(reader, 14); + object.constructionCosts = IsarCore.readString(reader, 15); + object.shrubsCosts = IsarCore.readString(reader, 16); + object.treeCosts = IsarCore.readString(reader, 17); + object.shrubsPlantingCosts = IsarCore.readString(reader, 18); + object.treePlantingCosts = IsarCore.readString(reader, 19); + object.shrubsCount = IsarCore.readString(reader, 20); + object.treeCount = IsarCore.readString(reader, 21); + object.note = IsarCore.readString(reader, 22); + { + final objectReader = IsarCore.readObject(reader, 23); + if (objectReader.isNull) { + object.editedBy = null; + } else { + final embedded = deserializeIdValue(objectReader); + IsarCore.freeReader(objectReader); + object.editedBy = embedded; + } + } + object.id = IsarCore.readId(reader); + return object; +} + +@isarProtected +dynamic deserializeReferenceImplementationProp( + IsarReader reader, int property) { + switch (property) { + case 1: + return IsarCore.readString(reader, 1); + case 2: + return IsarCore.readString(reader, 2); + case 3: + { + final length = IsarCore.readList(reader, 3, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = + List.filled(length, IdValue(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValue(); + } else { + final embedded = deserializeIdValue(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 4: + { + final length = IsarCore.readList(reader, 4, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = + List.filled(length, IdValue(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValue(); + } else { + final embedded = deserializeIdValue(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 5: + { + final value = IsarCore.readLong(reader, 5); + if (value == -9223372036854775808) { + return null; + } else { + return value; + } + } + case 6: + return IsarCore.readString(reader, 6); + case 7: + { + final length = IsarCore.readList(reader, 7, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return const []; + } else { + final list = + List.filled(length, FilePart(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = FilePart(); + } else { + final embedded = deserializeFilePart(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 8: + return IsarCore.readString(reader, 8); + case 9: + return IsarCore.readString(reader, 9); + case 10: + { + final objectReader = IsarCore.readObject(reader, 10); + if (objectReader.isNull) { + return null; + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + return embedded; + } + } + case 11: + return IsarCore.readBool(reader, 11); + case 12: + return IsarCore.readString(reader, 12); + case 13: + return IsarCore.readString(reader, 13); + case 14: + return IsarCore.readString(reader, 14); + case 15: + return IsarCore.readString(reader, 15); + case 16: + return IsarCore.readString(reader, 16); + case 17: + return IsarCore.readString(reader, 17); + case 18: + return IsarCore.readString(reader, 18); + case 19: + return IsarCore.readString(reader, 19); + case 20: + return IsarCore.readString(reader, 20); + case 21: + return IsarCore.readString(reader, 21); + case 22: + return IsarCore.readString(reader, 22); + case 23: + { + final objectReader = IsarCore.readObject(reader, 23); + if (objectReader.isNull) { + return null; + } else { + final embedded = deserializeIdValue(objectReader); + IsarCore.freeReader(objectReader); + return embedded; + } + } + case 0: + return IsarCore.readId(reader); + default: + throw ArgumentError('Unknown property: $property'); + } +} + +sealed class _ReferenceImplementationUpdate { + bool call({ + required int id, + String? listOfMeasures, + String? dateStart, + int? areaSize, + String? description, + String? costsTotal, + String? linkToGeo, + bool? externalOrder, + String? elementCount, + String? orderValue, + String? shippingCosts, + String? constructionCosts, + String? shrubsCosts, + String? treeCosts, + String? shrubsPlantingCosts, + String? treePlantingCosts, + String? shrubsCount, + String? treeCount, + String? note, + }); +} + +class _ReferenceImplementationUpdateImpl + implements _ReferenceImplementationUpdate { + const _ReferenceImplementationUpdateImpl(this.collection); + + final IsarCollection collection; + + @override + bool call({ + required int id, + Object? listOfMeasures = ignore, + Object? dateStart = ignore, + Object? areaSize = ignore, + Object? description = ignore, + Object? costsTotal = ignore, + Object? linkToGeo = ignore, + Object? externalOrder = ignore, + Object? elementCount = ignore, + Object? orderValue = ignore, + Object? shippingCosts = ignore, + Object? constructionCosts = ignore, + Object? shrubsCosts = ignore, + Object? treeCosts = ignore, + Object? shrubsPlantingCosts = ignore, + Object? treePlantingCosts = ignore, + Object? shrubsCount = ignore, + Object? treeCount = ignore, + Object? note = ignore, + }) { + return collection.updateProperties([ + id + ], { + if (listOfMeasures != ignore) 1: listOfMeasures as String?, + if (dateStart != ignore) 2: dateStart as String?, + if (areaSize != ignore) 5: areaSize as int?, + if (description != ignore) 6: description as String?, + if (costsTotal != ignore) 8: costsTotal as String?, + if (linkToGeo != ignore) 9: linkToGeo as String?, + if (externalOrder != ignore) 11: externalOrder as bool?, + if (elementCount != ignore) 12: elementCount as String?, + if (orderValue != ignore) 13: orderValue as String?, + if (shippingCosts != ignore) 14: shippingCosts as String?, + if (constructionCosts != ignore) 15: constructionCosts as String?, + if (shrubsCosts != ignore) 16: shrubsCosts as String?, + if (treeCosts != ignore) 17: treeCosts as String?, + if (shrubsPlantingCosts != ignore) 18: shrubsPlantingCosts as String?, + if (treePlantingCosts != ignore) 19: treePlantingCosts as String?, + if (shrubsCount != ignore) 20: shrubsCount as String?, + if (treeCount != ignore) 21: treeCount as String?, + if (note != ignore) 22: note as String?, + }) > + 0; + } +} + +sealed class _ReferenceImplementationUpdateAll { + int call({ + required List id, + String? listOfMeasures, + String? dateStart, + int? areaSize, + String? description, + String? costsTotal, + String? linkToGeo, + bool? externalOrder, + String? elementCount, + String? orderValue, + String? shippingCosts, + String? constructionCosts, + String? shrubsCosts, + String? treeCosts, + String? shrubsPlantingCosts, + String? treePlantingCosts, + String? shrubsCount, + String? treeCount, + String? note, + }); +} + +class _ReferenceImplementationUpdateAllImpl + implements _ReferenceImplementationUpdateAll { + const _ReferenceImplementationUpdateAllImpl(this.collection); + + final IsarCollection collection; + + @override + int call({ + required List id, + Object? listOfMeasures = ignore, + Object? dateStart = ignore, + Object? areaSize = ignore, + Object? description = ignore, + Object? costsTotal = ignore, + Object? linkToGeo = ignore, + Object? externalOrder = ignore, + Object? elementCount = ignore, + Object? orderValue = ignore, + Object? shippingCosts = ignore, + Object? constructionCosts = ignore, + Object? shrubsCosts = ignore, + Object? treeCosts = ignore, + Object? shrubsPlantingCosts = ignore, + Object? treePlantingCosts = ignore, + Object? shrubsCount = ignore, + Object? treeCount = ignore, + Object? note = ignore, + }) { + return collection.updateProperties(id, { + if (listOfMeasures != ignore) 1: listOfMeasures as String?, + if (dateStart != ignore) 2: dateStart as String?, + if (areaSize != ignore) 5: areaSize as int?, + if (description != ignore) 6: description as String?, + if (costsTotal != ignore) 8: costsTotal as String?, + if (linkToGeo != ignore) 9: linkToGeo as String?, + if (externalOrder != ignore) 11: externalOrder as bool?, + if (elementCount != ignore) 12: elementCount as String?, + if (orderValue != ignore) 13: orderValue as String?, + if (shippingCosts != ignore) 14: shippingCosts as String?, + if (constructionCosts != ignore) 15: constructionCosts as String?, + if (shrubsCosts != ignore) 16: shrubsCosts as String?, + if (treeCosts != ignore) 17: treeCosts as String?, + if (shrubsPlantingCosts != ignore) 18: shrubsPlantingCosts as String?, + if (treePlantingCosts != ignore) 19: treePlantingCosts as String?, + if (shrubsCount != ignore) 20: shrubsCount as String?, + if (treeCount != ignore) 21: treeCount as String?, + if (note != ignore) 22: note as String?, + }); + } +} + +extension ReferenceImplementationUpdate + on IsarCollection { + _ReferenceImplementationUpdate get update => + _ReferenceImplementationUpdateImpl(this); + + _ReferenceImplementationUpdateAll get updateAll => + _ReferenceImplementationUpdateAllImpl(this); +} + +sealed class _ReferenceImplementationQueryUpdate { + int call({ + String? listOfMeasures, + String? dateStart, + int? areaSize, + String? description, + String? costsTotal, + String? linkToGeo, + bool? externalOrder, + String? elementCount, + String? orderValue, + String? shippingCosts, + String? constructionCosts, + String? shrubsCosts, + String? treeCosts, + String? shrubsPlantingCosts, + String? treePlantingCosts, + String? shrubsCount, + String? treeCount, + String? note, + }); +} + +class _ReferenceImplementationQueryUpdateImpl + implements _ReferenceImplementationQueryUpdate { + const _ReferenceImplementationQueryUpdateImpl(this.query, {this.limit}); + + final IsarQuery query; + final int? limit; + + @override + int call({ + Object? listOfMeasures = ignore, + Object? dateStart = ignore, + Object? areaSize = ignore, + Object? description = ignore, + Object? costsTotal = ignore, + Object? linkToGeo = ignore, + Object? externalOrder = ignore, + Object? elementCount = ignore, + Object? orderValue = ignore, + Object? shippingCosts = ignore, + Object? constructionCosts = ignore, + Object? shrubsCosts = ignore, + Object? treeCosts = ignore, + Object? shrubsPlantingCosts = ignore, + Object? treePlantingCosts = ignore, + Object? shrubsCount = ignore, + Object? treeCount = ignore, + Object? note = ignore, + }) { + return query.updateProperties(limit: limit, { + if (listOfMeasures != ignore) 1: listOfMeasures as String?, + if (dateStart != ignore) 2: dateStart as String?, + if (areaSize != ignore) 5: areaSize as int?, + if (description != ignore) 6: description as String?, + if (costsTotal != ignore) 8: costsTotal as String?, + if (linkToGeo != ignore) 9: linkToGeo as String?, + if (externalOrder != ignore) 11: externalOrder as bool?, + if (elementCount != ignore) 12: elementCount as String?, + if (orderValue != ignore) 13: orderValue as String?, + if (shippingCosts != ignore) 14: shippingCosts as String?, + if (constructionCosts != ignore) 15: constructionCosts as String?, + if (shrubsCosts != ignore) 16: shrubsCosts as String?, + if (treeCosts != ignore) 17: treeCosts as String?, + if (shrubsPlantingCosts != ignore) 18: shrubsPlantingCosts as String?, + if (treePlantingCosts != ignore) 19: treePlantingCosts as String?, + if (shrubsCount != ignore) 20: shrubsCount as String?, + if (treeCount != ignore) 21: treeCount as String?, + if (note != ignore) 22: note as String?, + }); + } +} + +extension ReferenceImplementationQueryUpdate + on IsarQuery { + _ReferenceImplementationQueryUpdate get updateFirst => + _ReferenceImplementationQueryUpdateImpl(this, limit: 1); + + _ReferenceImplementationQueryUpdate get updateAll => + _ReferenceImplementationQueryUpdateImpl(this); +} + +class _ReferenceImplementationQueryBuilderUpdateImpl + implements _ReferenceImplementationQueryUpdate { + const _ReferenceImplementationQueryBuilderUpdateImpl(this.query, + {this.limit}); + + final QueryBuilder query; + final int? limit; + + @override + int call({ + Object? listOfMeasures = ignore, + Object? dateStart = ignore, + Object? areaSize = ignore, + Object? description = ignore, + Object? costsTotal = ignore, + Object? linkToGeo = ignore, + Object? externalOrder = ignore, + Object? elementCount = ignore, + Object? orderValue = ignore, + Object? shippingCosts = ignore, + Object? constructionCosts = ignore, + Object? shrubsCosts = ignore, + Object? treeCosts = ignore, + Object? shrubsPlantingCosts = ignore, + Object? treePlantingCosts = ignore, + Object? shrubsCount = ignore, + Object? treeCount = ignore, + Object? note = ignore, + }) { + final q = query.build(); + try { + return q.updateProperties(limit: limit, { + if (listOfMeasures != ignore) 1: listOfMeasures as String?, + if (dateStart != ignore) 2: dateStart as String?, + if (areaSize != ignore) 5: areaSize as int?, + if (description != ignore) 6: description as String?, + if (costsTotal != ignore) 8: costsTotal as String?, + if (linkToGeo != ignore) 9: linkToGeo as String?, + if (externalOrder != ignore) 11: externalOrder as bool?, + if (elementCount != ignore) 12: elementCount as String?, + if (orderValue != ignore) 13: orderValue as String?, + if (shippingCosts != ignore) 14: shippingCosts as String?, + if (constructionCosts != ignore) 15: constructionCosts as String?, + if (shrubsCosts != ignore) 16: shrubsCosts as String?, + if (treeCosts != ignore) 17: treeCosts as String?, + if (shrubsPlantingCosts != ignore) 18: shrubsPlantingCosts as String?, + if (treePlantingCosts != ignore) 19: treePlantingCosts as String?, + if (shrubsCount != ignore) 20: shrubsCount as String?, + if (treeCount != ignore) 21: treeCount as String?, + if (note != ignore) 22: note as String?, + }); + } finally { + q.close(); + } + } +} + +extension ReferenceImplementationQueryBuilderUpdate on QueryBuilder< + ReferenceImplementation, ReferenceImplementation, QOperations> { + _ReferenceImplementationQueryUpdate get updateFirst => + _ReferenceImplementationQueryBuilderUpdateImpl(this, limit: 1); + + _ReferenceImplementationQueryUpdate get updateAll => + _ReferenceImplementationQueryBuilderUpdateImpl(this); +} + +extension ReferenceImplementationQueryFilter on QueryBuilder< + ReferenceImplementation, ReferenceImplementation, QFilterCondition> { + QueryBuilder listOfMeasuresIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 1)); + }); + } + + QueryBuilder listOfMeasuresIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 1)); + }); + } + + QueryBuilder listOfMeasuresEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder listOfMeasuresGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder listOfMeasuresGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder listOfMeasuresLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder listOfMeasuresLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder listOfMeasuresBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 1, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder listOfMeasuresStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder listOfMeasuresEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + listOfMeasuresContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + listOfMeasuresMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 1, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder listOfMeasuresIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 1, + value: '', + ), + ); + }); + } + + QueryBuilder listOfMeasuresIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 1, + value: '', + ), + ); + }); + } + + QueryBuilder dateStartIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 2)); + }); + } + + QueryBuilder dateStartIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 2)); + }); + } + + QueryBuilder dateStartEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder dateStartGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder dateStartGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder dateStartLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder dateStartLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder dateStartBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 2, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder dateStartStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder dateStartEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + dateStartContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + dateStartMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 2, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder dateStartIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 2, + value: '', + ), + ); + }); + } + + QueryBuilder dateStartIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 2, + value: '', + ), + ); + }); + } + + QueryBuilder businessDirectoryIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 3)); + }); + } + + QueryBuilder businessDirectoryIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 3)); + }); + } + + QueryBuilder businessDirectoryIsEmpty() { + return not().group( + (q) => q.businessDirectoryIsNull().or().businessDirectoryIsNotEmpty(), + ); + } + + QueryBuilder businessDirectoryIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 3, value: null), + ); + }); + } + + QueryBuilder measuresIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 4)); + }); + } + + QueryBuilder measuresIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 4)); + }); + } + + QueryBuilder measuresIsEmpty() { + return not().group( + (q) => q.measuresIsNull().or().measuresIsNotEmpty(), + ); + } + + QueryBuilder measuresIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 4, value: null), + ); + }); + } + + QueryBuilder areaSizeIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 5)); + }); + } + + QueryBuilder areaSizeIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 5)); + }); + } + + QueryBuilder areaSizeEqualTo( + int? value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 5, + value: value, + ), + ); + }); + } + + QueryBuilder areaSizeGreaterThan( + int? value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 5, + value: value, + ), + ); + }); + } + + QueryBuilder areaSizeGreaterThanOrEqualTo( + int? value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 5, + value: value, + ), + ); + }); + } + + QueryBuilder areaSizeLessThan( + int? value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 5, + value: value, + ), + ); + }); + } + + QueryBuilder areaSizeLessThanOrEqualTo( + int? value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 5, + value: value, + ), + ); + }); + } + + QueryBuilder areaSizeBetween( + int? lower, + int? upper, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 5, + lower: lower, + upper: upper, + ), + ); + }); + } + + QueryBuilder descriptionIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 6)); + }); + } + + QueryBuilder descriptionIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 6)); + }); + } + + QueryBuilder descriptionEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder descriptionGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder descriptionGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder descriptionLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder descriptionLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder descriptionBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 6, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder descriptionStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder descriptionEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + descriptionContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + descriptionMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 6, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder descriptionIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 6, + value: '', + ), + ); + }); + } + + QueryBuilder descriptionIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 6, + value: '', + ), + ); + }); + } + + QueryBuilder imagesIsEmpty() { + return not().imagesIsNotEmpty(); + } + + QueryBuilder imagesIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 7, value: null), + ); + }); + } + + QueryBuilder costsTotalIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 8)); + }); + } + + QueryBuilder costsTotalIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 8)); + }); + } + + QueryBuilder costsTotalEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 8, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder costsTotalGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 8, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder costsTotalGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 8, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder costsTotalLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 8, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder costsTotalLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 8, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder costsTotalBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 8, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder costsTotalStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 8, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder costsTotalEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 8, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + costsTotalContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 8, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + costsTotalMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 8, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder costsTotalIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 8, + value: '', + ), + ); + }); + } + + QueryBuilder costsTotalIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 8, + value: '', + ), + ); + }); + } + + QueryBuilder linkToGeoIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 9)); + }); + } + + QueryBuilder linkToGeoIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 9)); + }); + } + + QueryBuilder linkToGeoEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 9, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder linkToGeoGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 9, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder linkToGeoGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 9, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder linkToGeoLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 9, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder linkToGeoLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 9, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder linkToGeoBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 9, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder linkToGeoStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 9, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder linkToGeoEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 9, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + linkToGeoContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 9, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + linkToGeoMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 9, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder linkToGeoIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 9, + value: '', + ), + ); + }); + } + + QueryBuilder linkToGeoIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 9, + value: '', + ), + ); + }); + } + + QueryBuilder statusIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 10)); + }); + } + + QueryBuilder statusIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 10)); + }); + } + + QueryBuilder externalOrderEqualTo( + bool value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 11, + value: value, + ), + ); + }); + } + + QueryBuilder elementCountIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 12)); + }); + } + + QueryBuilder elementCountIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 12)); + }); + } + + QueryBuilder elementCountEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 12, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder elementCountGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 12, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder elementCountGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 12, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder elementCountLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 12, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder elementCountLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 12, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder elementCountBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 12, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder elementCountStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 12, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder elementCountEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 12, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + elementCountContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 12, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + elementCountMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 12, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder elementCountIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 12, + value: '', + ), + ); + }); + } + + QueryBuilder elementCountIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 12, + value: '', + ), + ); + }); + } + + QueryBuilder orderValueIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 13)); + }); + } + + QueryBuilder orderValueIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 13)); + }); + } + + QueryBuilder orderValueEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 13, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder orderValueGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 13, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder orderValueGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 13, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder orderValueLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 13, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder orderValueLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 13, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder orderValueBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 13, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder orderValueStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 13, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder orderValueEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 13, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + orderValueContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 13, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + orderValueMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 13, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder orderValueIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 13, + value: '', + ), + ); + }); + } + + QueryBuilder orderValueIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 13, + value: '', + ), + ); + }); + } + + QueryBuilder shippingCostsIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 14)); + }); + } + + QueryBuilder shippingCostsIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 14)); + }); + } + + QueryBuilder shippingCostsEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 14, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder shippingCostsGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 14, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder shippingCostsGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 14, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder shippingCostsLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 14, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder shippingCostsLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 14, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder shippingCostsBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 14, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder shippingCostsStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 14, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder shippingCostsEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 14, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + shippingCostsContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 14, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + shippingCostsMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 14, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder shippingCostsIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 14, + value: '', + ), + ); + }); + } + + QueryBuilder shippingCostsIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 14, + value: '', + ), + ); + }); + } + + QueryBuilder constructionCostsIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 15)); + }); + } + + QueryBuilder constructionCostsIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 15)); + }); + } + + QueryBuilder constructionCostsEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 15, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder constructionCostsGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 15, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder constructionCostsGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 15, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder constructionCostsLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 15, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder constructionCostsLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 15, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder constructionCostsBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 15, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder constructionCostsStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 15, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder constructionCostsEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 15, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + constructionCostsContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 15, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + constructionCostsMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 15, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder constructionCostsIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 15, + value: '', + ), + ); + }); + } + + QueryBuilder constructionCostsIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 15, + value: '', + ), + ); + }); + } + + QueryBuilder shrubsCostsIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 16)); + }); + } + + QueryBuilder shrubsCostsIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 16)); + }); + } + + QueryBuilder shrubsCostsEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 16, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder shrubsCostsGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 16, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder shrubsCostsGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 16, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder shrubsCostsLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 16, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder shrubsCostsLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 16, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder shrubsCostsBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 16, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder shrubsCostsStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 16, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder shrubsCostsEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 16, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + shrubsCostsContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 16, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + shrubsCostsMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 16, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder shrubsCostsIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 16, + value: '', + ), + ); + }); + } + + QueryBuilder shrubsCostsIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 16, + value: '', + ), + ); + }); + } + + QueryBuilder treeCostsIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 17)); + }); + } + + QueryBuilder treeCostsIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 17)); + }); + } + + QueryBuilder treeCostsEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 17, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder treeCostsGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 17, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder treeCostsGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 17, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder treeCostsLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 17, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder treeCostsLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 17, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder treeCostsBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 17, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder treeCostsStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 17, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder treeCostsEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 17, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + treeCostsContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 17, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + treeCostsMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 17, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder treeCostsIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 17, + value: '', + ), + ); + }); + } + + QueryBuilder treeCostsIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 17, + value: '', + ), + ); + }); + } + + QueryBuilder shrubsPlantingCostsIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 18)); + }); + } + + QueryBuilder shrubsPlantingCostsIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 18)); + }); + } + + QueryBuilder shrubsPlantingCostsEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 18, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder shrubsPlantingCostsGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 18, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder shrubsPlantingCostsGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 18, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder shrubsPlantingCostsLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 18, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder shrubsPlantingCostsLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 18, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder shrubsPlantingCostsBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 18, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder shrubsPlantingCostsStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 18, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder shrubsPlantingCostsEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 18, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + shrubsPlantingCostsContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 18, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + shrubsPlantingCostsMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 18, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder shrubsPlantingCostsIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 18, + value: '', + ), + ); + }); + } + + QueryBuilder shrubsPlantingCostsIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 18, + value: '', + ), + ); + }); + } + + QueryBuilder treePlantingCostsIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 19)); + }); + } + + QueryBuilder treePlantingCostsIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 19)); + }); + } + + QueryBuilder treePlantingCostsEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 19, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder treePlantingCostsGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 19, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder treePlantingCostsGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 19, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder treePlantingCostsLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 19, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder treePlantingCostsLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 19, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder treePlantingCostsBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 19, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder treePlantingCostsStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 19, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder treePlantingCostsEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 19, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + treePlantingCostsContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 19, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + treePlantingCostsMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 19, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder treePlantingCostsIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 19, + value: '', + ), + ); + }); + } + + QueryBuilder treePlantingCostsIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 19, + value: '', + ), + ); + }); + } + + QueryBuilder shrubsCountIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 20)); + }); + } + + QueryBuilder shrubsCountIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 20)); + }); + } + + QueryBuilder shrubsCountEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 20, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder shrubsCountGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 20, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder shrubsCountGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 20, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder shrubsCountLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 20, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder shrubsCountLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 20, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder shrubsCountBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 20, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder shrubsCountStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 20, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder shrubsCountEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 20, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + shrubsCountContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 20, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + shrubsCountMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 20, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder shrubsCountIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 20, + value: '', + ), + ); + }); + } + + QueryBuilder shrubsCountIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 20, + value: '', + ), + ); + }); + } + + QueryBuilder treeCountIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 21)); + }); + } + + QueryBuilder treeCountIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 21)); + }); + } + + QueryBuilder treeCountEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 21, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder treeCountGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 21, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder treeCountGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 21, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder treeCountLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 21, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder treeCountLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 21, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder treeCountBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 21, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder treeCountStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 21, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder treeCountEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 21, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + treeCountContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 21, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + treeCountMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 21, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder treeCountIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 21, + value: '', + ), + ); + }); + } + + QueryBuilder treeCountIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 21, + value: '', + ), + ); + }); + } + + QueryBuilder noteIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 22)); + }); + } + + QueryBuilder noteIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 22)); + }); + } + + QueryBuilder noteEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 22, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder noteGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 22, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder noteGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 22, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder noteLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 22, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder noteLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 22, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder noteBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 22, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder noteStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 22, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder noteEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 22, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + noteContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 22, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + noteMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 22, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder noteIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 22, + value: '', + ), + ); + }); + } + + QueryBuilder noteIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 22, + value: '', + ), + ); + }); + } + + QueryBuilder editedByIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 23)); + }); + } + + QueryBuilder editedByIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 23)); + }); + } + + QueryBuilder idEqualTo( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder idGreaterThan( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder idGreaterThanOrEqualTo( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder idLessThan( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder idLessThanOrEqualTo( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder idBetween( + int lower, + int upper, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 0, + lower: lower, + upper: upper, + ), + ); + }); + } +} + +extension ReferenceImplementationQueryObject on QueryBuilder< + ReferenceImplementation, ReferenceImplementation, QFilterCondition> { + QueryBuilder status(FilterQuery q) { + return QueryBuilder.apply(this, (query) { + return query.object(q, 10); + }); + } + + QueryBuilder editedBy(FilterQuery q) { + return QueryBuilder.apply(this, (query) { + return query.object(q, 23); + }); + } +} + +extension ReferenceImplementationQuerySortBy + on QueryBuilder { + QueryBuilder + sortByListOfMeasures({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 1, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByListOfMeasuresDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 1, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByDateStart({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 2, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByDateStartDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 2, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByAreaSize() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(5); + }); + } + + QueryBuilder + sortByAreaSizeDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(5, sort: Sort.desc); + }); + } + + QueryBuilder + sortByDescription({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 6, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByDescriptionDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 6, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByCostsTotal({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 8, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByCostsTotalDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 8, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByLinkToGeo({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 9, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByLinkToGeoDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 9, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByExternalOrder() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(11); + }); + } + + QueryBuilder + sortByExternalOrderDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(11, sort: Sort.desc); + }); + } + + QueryBuilder + sortByElementCount({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 12, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByElementCountDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 12, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByOrderValue({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 13, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByOrderValueDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 13, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByShippingCosts({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 14, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByShippingCostsDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 14, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByConstructionCosts({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 15, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByConstructionCostsDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 15, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByShrubsCosts({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 16, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByShrubsCostsDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 16, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByTreeCosts({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 17, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByTreeCostsDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 17, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByShrubsPlantingCosts({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 18, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByShrubsPlantingCostsDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 18, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByTreePlantingCosts({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 19, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByTreePlantingCostsDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 19, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByShrubsCount({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 20, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByShrubsCountDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 20, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByTreeCount({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 21, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByTreeCountDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 21, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByNote({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 22, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByNoteDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 22, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortById() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0); + }); + } + + QueryBuilder + sortByIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0, sort: Sort.desc); + }); + } +} + +extension ReferenceImplementationQuerySortThenBy on QueryBuilder< + ReferenceImplementation, ReferenceImplementation, QSortThenBy> { + QueryBuilder + thenByListOfMeasures({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(1, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByListOfMeasuresDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(1, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByDateStart({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(2, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByDateStartDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(2, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByAreaSize() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(5); + }); + } + + QueryBuilder + thenByAreaSizeDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(5, sort: Sort.desc); + }); + } + + QueryBuilder + thenByDescription({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(6, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByDescriptionDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(6, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByCostsTotal({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(8, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByCostsTotalDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(8, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByLinkToGeo({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(9, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByLinkToGeoDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(9, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByExternalOrder() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(11); + }); + } + + QueryBuilder + thenByExternalOrderDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(11, sort: Sort.desc); + }); + } + + QueryBuilder + thenByElementCount({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(12, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByElementCountDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(12, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByOrderValue({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(13, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByOrderValueDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(13, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByShippingCosts({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(14, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByShippingCostsDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(14, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByConstructionCosts({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(15, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByConstructionCostsDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(15, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByShrubsCosts({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(16, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByShrubsCostsDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(16, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByTreeCosts({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(17, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByTreeCostsDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(17, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByShrubsPlantingCosts({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(18, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByShrubsPlantingCostsDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(18, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByTreePlantingCosts({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(19, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByTreePlantingCostsDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(19, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByShrubsCount({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(20, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByShrubsCountDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(20, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByTreeCount({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(21, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByTreeCountDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(21, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByNote({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(22, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByNoteDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(22, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenById() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0); + }); + } + + QueryBuilder + thenByIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0, sort: Sort.desc); + }); + } +} + +extension ReferenceImplementationQueryWhereDistinct on QueryBuilder< + ReferenceImplementation, ReferenceImplementation, QDistinct> { + QueryBuilder + distinctByListOfMeasures({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(1, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByDateStart({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(2, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByAreaSize() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(5); + }); + } + + QueryBuilder + distinctByDescription({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(6, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByCostsTotal({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(8, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByLinkToGeo({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(9, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByExternalOrder() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(11); + }); + } + + QueryBuilder + distinctByElementCount({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(12, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByOrderValue({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(13, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByShippingCosts({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(14, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByConstructionCosts({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(15, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByShrubsCosts({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(16, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByTreeCosts({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(17, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByShrubsPlantingCosts({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(18, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByTreePlantingCosts({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(19, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByShrubsCount({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(20, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByTreeCount({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(21, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByNote({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(22, caseSensitive: caseSensitive); + }); + } +} + +extension ReferenceImplementationQueryProperty1 on QueryBuilder< + ReferenceImplementation, ReferenceImplementation, QProperty> { + QueryBuilder + listOfMeasuresProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(1); + }); + } + + QueryBuilder + dateStartProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(2); + }); + } + + QueryBuilder?, QAfterProperty> + businessDirectoryProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(3); + }); + } + + QueryBuilder?, QAfterProperty> + measuresProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(4); + }); + } + + QueryBuilder + areaSizeProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(5); + }); + } + + QueryBuilder + descriptionProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(6); + }); + } + + QueryBuilder, QAfterProperty> + imagesProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(7); + }); + } + + QueryBuilder + costsTotalProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(8); + }); + } + + QueryBuilder + linkToGeoProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(9); + }); + } + + QueryBuilder + statusProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(10); + }); + } + + QueryBuilder + externalOrderProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(11); + }); + } + + QueryBuilder + elementCountProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(12); + }); + } + + QueryBuilder + orderValueProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(13); + }); + } + + QueryBuilder + shippingCostsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(14); + }); + } + + QueryBuilder + constructionCostsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(15); + }); + } + + QueryBuilder + shrubsCostsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(16); + }); + } + + QueryBuilder + treeCostsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(17); + }); + } + + QueryBuilder + shrubsPlantingCostsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(18); + }); + } + + QueryBuilder + treePlantingCostsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(19); + }); + } + + QueryBuilder + shrubsCountProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(20); + }); + } + + QueryBuilder + treeCountProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(21); + }); + } + + QueryBuilder + noteProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(22); + }); + } + + QueryBuilder + editedByProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(23); + }); + } + + QueryBuilder idProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(0); + }); + } +} + +extension ReferenceImplementationQueryProperty2 + on QueryBuilder { + QueryBuilder + listOfMeasuresProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(1); + }); + } + + QueryBuilder + dateStartProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(2); + }); + } + + QueryBuilder?), QAfterProperty> + businessDirectoryProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(3); + }); + } + + QueryBuilder?), QAfterProperty> + measuresProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(4); + }); + } + + QueryBuilder + areaSizeProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(5); + }); + } + + QueryBuilder + descriptionProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(6); + }); + } + + QueryBuilder), QAfterProperty> + imagesProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(7); + }); + } + + QueryBuilder + costsTotalProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(8); + }); + } + + QueryBuilder + linkToGeoProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(9); + }); + } + + QueryBuilder + statusProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(10); + }); + } + + QueryBuilder + externalOrderProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(11); + }); + } + + QueryBuilder + elementCountProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(12); + }); + } + + QueryBuilder + orderValueProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(13); + }); + } + + QueryBuilder + shippingCostsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(14); + }); + } + + QueryBuilder + constructionCostsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(15); + }); + } + + QueryBuilder + shrubsCostsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(16); + }); + } + + QueryBuilder + treeCostsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(17); + }); + } + + QueryBuilder + shrubsPlantingCostsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(18); + }); + } + + QueryBuilder + treePlantingCostsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(19); + }); + } + + QueryBuilder + shrubsCountProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(20); + }); + } + + QueryBuilder + treeCountProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(21); + }); + } + + QueryBuilder + noteProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(22); + }); + } + + QueryBuilder + editedByProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(23); + }); + } + + QueryBuilder idProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(0); + }); + } +} + +extension ReferenceImplementationQueryProperty3 + on QueryBuilder { + QueryBuilder + listOfMeasuresProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(1); + }); + } + + QueryBuilder + dateStartProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(2); + }); + } + + QueryBuilder?), QOperations> + businessDirectoryProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(3); + }); + } + + QueryBuilder?), QOperations> + measuresProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(4); + }); + } + + QueryBuilder + areaSizeProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(5); + }); + } + + QueryBuilder + descriptionProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(6); + }); + } + + QueryBuilder), QOperations> + imagesProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(7); + }); + } + + QueryBuilder + costsTotalProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(8); + }); + } + + QueryBuilder + linkToGeoProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(9); + }); + } + + QueryBuilder + statusProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(10); + }); + } + + QueryBuilder + externalOrderProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(11); + }); + } + + QueryBuilder + elementCountProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(12); + }); + } + + QueryBuilder + orderValueProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(13); + }); + } + + QueryBuilder + shippingCostsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(14); + }); + } + + QueryBuilder + constructionCostsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(15); + }); + } + + QueryBuilder + shrubsCostsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(16); + }); + } + + QueryBuilder + treeCostsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(17); + }); + } + + QueryBuilder + shrubsPlantingCostsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(18); + }); + } + + QueryBuilder + treePlantingCostsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(19); + }); + } + + QueryBuilder + shrubsCountProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(20); + }); + } + + QueryBuilder + treeCountProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(21); + }); + } + + QueryBuilder + noteProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(22); + }); + } + + QueryBuilder + editedByProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(23); + }); + } + + QueryBuilder + idProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(0); + }); + } +} + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +ReferenceImplementation _$ReferenceImplementationFromJson( + Map json) => + ReferenceImplementation() + ..id = (json['id'] as num).toInt() + ..listOfMeasures = json['Liste aller Maßnahmen'] as String? + ..dateStart = json['Datum der Anlage'] as String? + ..businessDirectory = (json['06 Betriebsverzeichnis'] as List?) + ?.map((e) => IdValue.fromJson(e as Map)) + .toList() + ..measures = (json['00 Maßnahmendatenbank'] as List?) + ?.map((e) => IdValue.fromJson(e as Map)) + .toList() + ..areaSize = (json['Größe in m²'] as num?)?.toInt() + ..description = json['Beschreibung'] as String? + ..images = (json['Fotos'] as List) + .map((e) => FilePart.fromJson(e as Map)) + .toList() + ..costsTotal = json['Gesamtkosten'] as String? + ..linkToGeo = json['Link zum Geomarker'] as String? + ..status = json['Status'] == null + ? null + : IdValueColor.fromJson(json['Status'] as Map) + ..externalOrder = json['Materialbezug ohne AmBiTo'] as bool + ..elementCount = json['Anzahl Elemente'] as String? + ..orderValue = json['Bestellwert'] as String? + ..shippingCosts = json['Lieferung'] as String? + ..constructionCosts = json['Anlage'] as String? + ..shrubsCosts = json['Sträucher Kosten'] as String? + ..treeCosts = json['Bäume Kosten'] as String? + ..shrubsPlantingCosts = json['Sträucher Pflanzkosten'] as String? + ..treePlantingCosts = json['Bäume Pflanzkosten'] as String? + ..shrubsCount = json['Anzahl Sträucher'] as String? + ..treeCount = json['Anzahl Bäume'] as String? + ..note = json['Anmerkung'] as String? + ..editedBy = json['Bearbeitet von'] == null + ? null + : IdValue.fromJson(json['Bearbeitet von'] as Map); + +Map _$ReferenceImplementationToJson( + ReferenceImplementation instance) => + { + 'id': instance.id, + 'Liste aller Maßnahmen': instance.listOfMeasures, + 'Datum der Anlage': instance.dateStart, + '06 Betriebsverzeichnis': instance.businessDirectory, + '00 Maßnahmendatenbank': instance.measures, + 'Größe in m²': instance.areaSize, + 'Beschreibung': instance.description, + 'Fotos': instance.images, + 'Gesamtkosten': instance.costsTotal, + 'Link zum Geomarker': instance.linkToGeo, + 'Status': instance.status, + 'Materialbezug ohne AmBiTo': instance.externalOrder, + 'Anzahl Elemente': instance.elementCount, + 'Bestellwert': instance.orderValue, + 'Lieferung': instance.shippingCosts, + 'Anlage': instance.constructionCosts, + 'Sträucher Kosten': instance.shrubsCosts, + 'Bäume Kosten': instance.treeCosts, + 'Sträucher Pflanzkosten': instance.shrubsPlantingCosts, + 'Bäume Pflanzkosten': instance.treePlantingCosts, + 'Anzahl Sträucher': instance.shrubsCount, + 'Anzahl Bäume': instance.treeCount, + 'Anmerkung': instance.note, + 'Bearbeitet von': instance.editedBy, + }; diff --git a/lib/src/entity/reference_implementation/reference_implementation_repository.dart b/lib/src/entity/reference_implementation/reference_implementation_repository.dart new file mode 100644 index 0000000..48918d8 --- /dev/null +++ b/lib/src/entity/reference_implementation/reference_implementation_repository.dart @@ -0,0 +1,10 @@ +import 'package:ambito/src/entity/entities.dart'; +import 'package:ambito/src/packages/ambito_db/base_db.dart'; +import 'package:isar/isar.dart'; + +import '../../../../main.dart'; + +class ReferenceImplementationRepository extends BaseDB { + @override + IsarCollection collection = isar.referenceImplementations; +} diff --git a/lib/src/entity/service_provider/service_provider.dart b/lib/src/entity/service_provider/service_provider.dart new file mode 100644 index 0000000..6d9dd40 --- /dev/null +++ b/lib/src/entity/service_provider/service_provider.dart @@ -0,0 +1,40 @@ +import 'package:ambito/src/entity/entities.dart'; +import 'package:isar/isar.dart'; +import 'package:json_annotation/json_annotation.dart'; + +part 'service_provider.g.dart'; + +@JsonSerializable(explicitToJson: true) +@collection +class ServiceProvider extends BaseEntity with EntityWithId { + ServiceProvider(); + + @JsonKey(name: 'Name des Dienstleisters') + @Index() + String? name; + @JsonKey(name: 'Link Webseite') + String? website; + @JsonKey(name: 'Postleitzahl und Ort') + String? postalCodeAndCity; + @JsonKey(name: 'Telefonnummer') + String? phoneNumber; + @JsonKey(name: 'E-Mail') + String? email; + @JsonKey(name: 'Ansprechpersonen') + List? contactPerson; + @JsonKey(name: '00 Maßnahmen_Main') + List? measures; + @JsonKey(name: 'Straße und Hausnummer') + String? streetAddress; + @JsonKey(name: 'Region') + List? region; + @JsonKey(name: 'Art des Unternehmens') + List? businessType; + @JsonKey(name: 'Bio-zertifiziert?') + bool certifiedBio = false; + + factory ServiceProvider.fromJson(Map json) => + _$ServiceProviderFromJson(json); + + Map toJson() => _$ServiceProviderToJson(this); +} diff --git a/lib/src/entity/service_provider/service_provider.g.dart b/lib/src/entity/service_provider/service_provider.g.dart new file mode 100644 index 0000000..08615cd --- /dev/null +++ b/lib/src/entity/service_provider/service_provider.g.dart @@ -0,0 +1,2648 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'service_provider.dart'; + +// ************************************************************************** +// _IsarCollectionGenerator +// ************************************************************************** + +// coverage:ignore-file +// ignore_for_file: duplicate_ignore, invalid_use_of_protected_member, lines_longer_than_80_chars, constant_identifier_names, avoid_js_rounded_ints, no_leading_underscores_for_local_identifiers, require_trailing_commas, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_in_if_null_operators, library_private_types_in_public_api, prefer_const_constructors +// ignore_for_file: type=lint + +extension GetServiceProviderCollection on Isar { + IsarCollection get serviceProviders => + this.collection(); +} + +const ServiceProviderSchema = IsarGeneratedSchema( + schema: IsarSchema( + name: 'ServiceProvider', + idName: 'id', + embedded: false, + properties: [ + IsarPropertySchema( + name: 'name', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'website', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'postalCodeAndCity', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'phoneNumber', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'email', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'contactPerson', + type: IsarType.objectList, + target: 'IdValue', + ), + IsarPropertySchema( + name: 'measures', + type: IsarType.objectList, + target: 'IdValue', + ), + IsarPropertySchema( + name: 'streetAddress', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'region', + type: IsarType.objectList, + target: 'IdValueColor', + ), + IsarPropertySchema( + name: 'businessType', + type: IsarType.objectList, + target: 'IdValueColor', + ), + IsarPropertySchema( + name: 'certifiedBio', + type: IsarType.bool, + ), + ], + indexes: [ + IsarIndexSchema( + name: 'name', + properties: [ + "name", + ], + unique: false, + hash: false, + ), + ], + ), + converter: IsarObjectConverter( + serialize: serializeServiceProvider, + deserialize: deserializeServiceProvider, + deserializeProperty: deserializeServiceProviderProp, + ), + embeddedSchemas: [IdValueSchema, IdValueColorSchema], +); + +@isarProtected +int serializeServiceProvider(IsarWriter writer, ServiceProvider object) { + { + final value = object.name; + if (value == null) { + IsarCore.writeNull(writer, 1); + } else { + IsarCore.writeString(writer, 1, value); + } + } + { + final value = object.website; + if (value == null) { + IsarCore.writeNull(writer, 2); + } else { + IsarCore.writeString(writer, 2, value); + } + } + { + final value = object.postalCodeAndCity; + if (value == null) { + IsarCore.writeNull(writer, 3); + } else { + IsarCore.writeString(writer, 3, value); + } + } + { + final value = object.phoneNumber; + if (value == null) { + IsarCore.writeNull(writer, 4); + } else { + IsarCore.writeString(writer, 4, value); + } + } + { + final value = object.email; + if (value == null) { + IsarCore.writeNull(writer, 5); + } else { + IsarCore.writeString(writer, 5, value); + } + } + { + final list = object.contactPerson; + if (list == null) { + IsarCore.writeNull(writer, 6); + } else { + final listWriter = IsarCore.beginList(writer, 6, list.length); + for (var i = 0; i < list.length; i++) { + { + final value = list[i]; + final objectWriter = IsarCore.beginObject(listWriter, i); + serializeIdValue(objectWriter, value); + IsarCore.endObject(listWriter, objectWriter); + } + } + IsarCore.endList(writer, listWriter); + } + } + { + final list = object.measures; + if (list == null) { + IsarCore.writeNull(writer, 7); + } else { + final listWriter = IsarCore.beginList(writer, 7, list.length); + for (var i = 0; i < list.length; i++) { + { + final value = list[i]; + final objectWriter = IsarCore.beginObject(listWriter, i); + serializeIdValue(objectWriter, value); + IsarCore.endObject(listWriter, objectWriter); + } + } + IsarCore.endList(writer, listWriter); + } + } + { + final value = object.streetAddress; + if (value == null) { + IsarCore.writeNull(writer, 8); + } else { + IsarCore.writeString(writer, 8, value); + } + } + { + final list = object.region; + if (list == null) { + IsarCore.writeNull(writer, 9); + } else { + final listWriter = IsarCore.beginList(writer, 9, list.length); + for (var i = 0; i < list.length; i++) { + { + final value = list[i]; + final objectWriter = IsarCore.beginObject(listWriter, i); + serializeIdValueColor(objectWriter, value); + IsarCore.endObject(listWriter, objectWriter); + } + } + IsarCore.endList(writer, listWriter); + } + } + { + final list = object.businessType; + if (list == null) { + IsarCore.writeNull(writer, 10); + } else { + final listWriter = IsarCore.beginList(writer, 10, list.length); + for (var i = 0; i < list.length; i++) { + { + final value = list[i]; + final objectWriter = IsarCore.beginObject(listWriter, i); + serializeIdValueColor(objectWriter, value); + IsarCore.endObject(listWriter, objectWriter); + } + } + IsarCore.endList(writer, listWriter); + } + } + IsarCore.writeBool(writer, 11, object.certifiedBio); + return object.id; +} + +@isarProtected +ServiceProvider deserializeServiceProvider(IsarReader reader) { + final object = ServiceProvider(); + object.name = IsarCore.readString(reader, 1); + object.website = IsarCore.readString(reader, 2); + object.postalCodeAndCity = IsarCore.readString(reader, 3); + object.phoneNumber = IsarCore.readString(reader, 4); + object.email = IsarCore.readString(reader, 5); + { + final length = IsarCore.readList(reader, 6, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.contactPerson = null; + } else { + final list = List.filled(length, IdValue(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValue(); + } else { + final embedded = deserializeIdValue(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + object.contactPerson = list; + } + } + } + { + final length = IsarCore.readList(reader, 7, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.measures = null; + } else { + final list = List.filled(length, IdValue(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValue(); + } else { + final embedded = deserializeIdValue(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + object.measures = list; + } + } + } + object.streetAddress = IsarCore.readString(reader, 8); + { + final length = IsarCore.readList(reader, 9, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.region = null; + } else { + final list = + List.filled(length, IdValueColor(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValueColor(); + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + object.region = list; + } + } + } + { + final length = IsarCore.readList(reader, 10, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.businessType = null; + } else { + final list = + List.filled(length, IdValueColor(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValueColor(); + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + object.businessType = list; + } + } + } + object.certifiedBio = IsarCore.readBool(reader, 11); + object.id = IsarCore.readId(reader); + return object; +} + +@isarProtected +dynamic deserializeServiceProviderProp(IsarReader reader, int property) { + switch (property) { + case 1: + return IsarCore.readString(reader, 1); + case 2: + return IsarCore.readString(reader, 2); + case 3: + return IsarCore.readString(reader, 3); + case 4: + return IsarCore.readString(reader, 4); + case 5: + return IsarCore.readString(reader, 5); + case 6: + { + final length = IsarCore.readList(reader, 6, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = + List.filled(length, IdValue(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValue(); + } else { + final embedded = deserializeIdValue(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 7: + { + final length = IsarCore.readList(reader, 7, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = + List.filled(length, IdValue(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValue(); + } else { + final embedded = deserializeIdValue(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 8: + return IsarCore.readString(reader, 8); + case 9: + { + final length = IsarCore.readList(reader, 9, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = List.filled(length, IdValueColor(), + growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValueColor(); + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 10: + { + final length = IsarCore.readList(reader, 10, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = List.filled(length, IdValueColor(), + growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValueColor(); + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 11: + return IsarCore.readBool(reader, 11); + case 0: + return IsarCore.readId(reader); + default: + throw ArgumentError('Unknown property: $property'); + } +} + +sealed class _ServiceProviderUpdate { + bool call({ + required int id, + String? name, + String? website, + String? postalCodeAndCity, + String? phoneNumber, + String? email, + String? streetAddress, + bool? certifiedBio, + }); +} + +class _ServiceProviderUpdateImpl implements _ServiceProviderUpdate { + const _ServiceProviderUpdateImpl(this.collection); + + final IsarCollection collection; + + @override + bool call({ + required int id, + Object? name = ignore, + Object? website = ignore, + Object? postalCodeAndCity = ignore, + Object? phoneNumber = ignore, + Object? email = ignore, + Object? streetAddress = ignore, + Object? certifiedBio = ignore, + }) { + return collection.updateProperties([ + id + ], { + if (name != ignore) 1: name as String?, + if (website != ignore) 2: website as String?, + if (postalCodeAndCity != ignore) 3: postalCodeAndCity as String?, + if (phoneNumber != ignore) 4: phoneNumber as String?, + if (email != ignore) 5: email as String?, + if (streetAddress != ignore) 8: streetAddress as String?, + if (certifiedBio != ignore) 11: certifiedBio as bool?, + }) > + 0; + } +} + +sealed class _ServiceProviderUpdateAll { + int call({ + required List id, + String? name, + String? website, + String? postalCodeAndCity, + String? phoneNumber, + String? email, + String? streetAddress, + bool? certifiedBio, + }); +} + +class _ServiceProviderUpdateAllImpl implements _ServiceProviderUpdateAll { + const _ServiceProviderUpdateAllImpl(this.collection); + + final IsarCollection collection; + + @override + int call({ + required List id, + Object? name = ignore, + Object? website = ignore, + Object? postalCodeAndCity = ignore, + Object? phoneNumber = ignore, + Object? email = ignore, + Object? streetAddress = ignore, + Object? certifiedBio = ignore, + }) { + return collection.updateProperties(id, { + if (name != ignore) 1: name as String?, + if (website != ignore) 2: website as String?, + if (postalCodeAndCity != ignore) 3: postalCodeAndCity as String?, + if (phoneNumber != ignore) 4: phoneNumber as String?, + if (email != ignore) 5: email as String?, + if (streetAddress != ignore) 8: streetAddress as String?, + if (certifiedBio != ignore) 11: certifiedBio as bool?, + }); + } +} + +extension ServiceProviderUpdate on IsarCollection { + _ServiceProviderUpdate get update => _ServiceProviderUpdateImpl(this); + + _ServiceProviderUpdateAll get updateAll => + _ServiceProviderUpdateAllImpl(this); +} + +sealed class _ServiceProviderQueryUpdate { + int call({ + String? name, + String? website, + String? postalCodeAndCity, + String? phoneNumber, + String? email, + String? streetAddress, + bool? certifiedBio, + }); +} + +class _ServiceProviderQueryUpdateImpl implements _ServiceProviderQueryUpdate { + const _ServiceProviderQueryUpdateImpl(this.query, {this.limit}); + + final IsarQuery query; + final int? limit; + + @override + int call({ + Object? name = ignore, + Object? website = ignore, + Object? postalCodeAndCity = ignore, + Object? phoneNumber = ignore, + Object? email = ignore, + Object? streetAddress = ignore, + Object? certifiedBio = ignore, + }) { + return query.updateProperties(limit: limit, { + if (name != ignore) 1: name as String?, + if (website != ignore) 2: website as String?, + if (postalCodeAndCity != ignore) 3: postalCodeAndCity as String?, + if (phoneNumber != ignore) 4: phoneNumber as String?, + if (email != ignore) 5: email as String?, + if (streetAddress != ignore) 8: streetAddress as String?, + if (certifiedBio != ignore) 11: certifiedBio as bool?, + }); + } +} + +extension ServiceProviderQueryUpdate on IsarQuery { + _ServiceProviderQueryUpdate get updateFirst => + _ServiceProviderQueryUpdateImpl(this, limit: 1); + + _ServiceProviderQueryUpdate get updateAll => + _ServiceProviderQueryUpdateImpl(this); +} + +class _ServiceProviderQueryBuilderUpdateImpl + implements _ServiceProviderQueryUpdate { + const _ServiceProviderQueryBuilderUpdateImpl(this.query, {this.limit}); + + final QueryBuilder query; + final int? limit; + + @override + int call({ + Object? name = ignore, + Object? website = ignore, + Object? postalCodeAndCity = ignore, + Object? phoneNumber = ignore, + Object? email = ignore, + Object? streetAddress = ignore, + Object? certifiedBio = ignore, + }) { + final q = query.build(); + try { + return q.updateProperties(limit: limit, { + if (name != ignore) 1: name as String?, + if (website != ignore) 2: website as String?, + if (postalCodeAndCity != ignore) 3: postalCodeAndCity as String?, + if (phoneNumber != ignore) 4: phoneNumber as String?, + if (email != ignore) 5: email as String?, + if (streetAddress != ignore) 8: streetAddress as String?, + if (certifiedBio != ignore) 11: certifiedBio as bool?, + }); + } finally { + q.close(); + } + } +} + +extension ServiceProviderQueryBuilderUpdate + on QueryBuilder { + _ServiceProviderQueryUpdate get updateFirst => + _ServiceProviderQueryBuilderUpdateImpl(this, limit: 1); + + _ServiceProviderQueryUpdate get updateAll => + _ServiceProviderQueryBuilderUpdateImpl(this); +} + +extension ServiceProviderQueryFilter + on QueryBuilder { + QueryBuilder + nameIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 1)); + }); + } + + QueryBuilder + nameIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 1)); + }); + } + + QueryBuilder + nameEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + nameGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + nameGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + nameLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + nameLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + nameBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 1, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + nameStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + nameEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + nameContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + nameMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 1, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + nameIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 1, + value: '', + ), + ); + }); + } + + QueryBuilder + nameIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 1, + value: '', + ), + ); + }); + } + + QueryBuilder + websiteIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 2)); + }); + } + + QueryBuilder + websiteIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 2)); + }); + } + + QueryBuilder + websiteEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + websiteGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + websiteGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + websiteLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + websiteLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + websiteBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 2, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + websiteStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + websiteEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + websiteContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + websiteMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 2, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + websiteIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 2, + value: '', + ), + ); + }); + } + + QueryBuilder + websiteIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 2, + value: '', + ), + ); + }); + } + + QueryBuilder + postalCodeAndCityIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 3)); + }); + } + + QueryBuilder + postalCodeAndCityIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 3)); + }); + } + + QueryBuilder + postalCodeAndCityEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + postalCodeAndCityGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + postalCodeAndCityGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + postalCodeAndCityLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + postalCodeAndCityLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + postalCodeAndCityBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 3, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + postalCodeAndCityStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + postalCodeAndCityEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + postalCodeAndCityContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + postalCodeAndCityMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 3, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + postalCodeAndCityIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 3, + value: '', + ), + ); + }); + } + + QueryBuilder + postalCodeAndCityIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 3, + value: '', + ), + ); + }); + } + + QueryBuilder + phoneNumberIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 4)); + }); + } + + QueryBuilder + phoneNumberIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 4)); + }); + } + + QueryBuilder + phoneNumberEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 4, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + phoneNumberGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 4, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + phoneNumberGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 4, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + phoneNumberLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 4, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + phoneNumberLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 4, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + phoneNumberBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 4, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + phoneNumberStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 4, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + phoneNumberEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 4, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + phoneNumberContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 4, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + phoneNumberMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 4, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + phoneNumberIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 4, + value: '', + ), + ); + }); + } + + QueryBuilder + phoneNumberIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 4, + value: '', + ), + ); + }); + } + + QueryBuilder + emailIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 5)); + }); + } + + QueryBuilder + emailIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 5)); + }); + } + + QueryBuilder + emailEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + emailGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + emailGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + emailLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + emailLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + emailBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 5, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + emailStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + emailEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + emailContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + emailMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 5, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + emailIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 5, + value: '', + ), + ); + }); + } + + QueryBuilder + emailIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 5, + value: '', + ), + ); + }); + } + + QueryBuilder + contactPersonIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 6)); + }); + } + + QueryBuilder + contactPersonIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 6)); + }); + } + + QueryBuilder + contactPersonIsEmpty() { + return not().group( + (q) => q.contactPersonIsNull().or().contactPersonIsNotEmpty(), + ); + } + + QueryBuilder + contactPersonIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 6, value: null), + ); + }); + } + + QueryBuilder + measuresIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 7)); + }); + } + + QueryBuilder + measuresIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 7)); + }); + } + + QueryBuilder + measuresIsEmpty() { + return not().group( + (q) => q.measuresIsNull().or().measuresIsNotEmpty(), + ); + } + + QueryBuilder + measuresIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 7, value: null), + ); + }); + } + + QueryBuilder + streetAddressIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 8)); + }); + } + + QueryBuilder + streetAddressIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 8)); + }); + } + + QueryBuilder + streetAddressEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 8, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + streetAddressGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 8, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + streetAddressGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 8, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + streetAddressLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 8, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + streetAddressLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 8, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + streetAddressBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 8, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + streetAddressStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 8, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + streetAddressEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 8, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + streetAddressContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 8, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + streetAddressMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 8, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + streetAddressIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 8, + value: '', + ), + ); + }); + } + + QueryBuilder + streetAddressIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 8, + value: '', + ), + ); + }); + } + + QueryBuilder + regionIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 9)); + }); + } + + QueryBuilder + regionIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 9)); + }); + } + + QueryBuilder + regionIsEmpty() { + return not().group( + (q) => q.regionIsNull().or().regionIsNotEmpty(), + ); + } + + QueryBuilder + regionIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 9, value: null), + ); + }); + } + + QueryBuilder + businessTypeIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 10)); + }); + } + + QueryBuilder + businessTypeIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 10)); + }); + } + + QueryBuilder + businessTypeIsEmpty() { + return not().group( + (q) => q.businessTypeIsNull().or().businessTypeIsNotEmpty(), + ); + } + + QueryBuilder + businessTypeIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 10, value: null), + ); + }); + } + + QueryBuilder + certifiedBioEqualTo( + bool value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 11, + value: value, + ), + ); + }); + } + + QueryBuilder + idEqualTo( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder + idGreaterThan( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder + idGreaterThanOrEqualTo( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder + idLessThan( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder + idLessThanOrEqualTo( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder + idBetween( + int lower, + int upper, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 0, + lower: lower, + upper: upper, + ), + ); + }); + } +} + +extension ServiceProviderQueryObject + on QueryBuilder {} + +extension ServiceProviderQuerySortBy + on QueryBuilder { + QueryBuilder sortByName( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 1, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByNameDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 1, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByWebsite( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 2, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByWebsiteDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 2, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByPostalCodeAndCity({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 3, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByPostalCodeAndCityDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 3, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByPhoneNumber({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 4, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByPhoneNumberDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 4, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByEmail( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 5, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByEmailDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 5, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByStreetAddress({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 8, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByStreetAddressDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 8, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder + sortByCertifiedBio() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(11); + }); + } + + QueryBuilder + sortByCertifiedBioDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(11, sort: Sort.desc); + }); + } + + QueryBuilder sortById() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0); + }); + } + + QueryBuilder sortByIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0, sort: Sort.desc); + }); + } +} + +extension ServiceProviderQuerySortThenBy + on QueryBuilder { + QueryBuilder thenByName( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(1, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByNameDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(1, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByWebsite( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(2, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByWebsiteDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(2, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByPostalCodeAndCity({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(3, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByPostalCodeAndCityDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(3, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByPhoneNumber({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(4, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByPhoneNumberDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(4, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByEmail( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(5, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByEmailDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(5, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByStreetAddress({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(8, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByStreetAddressDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(8, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + thenByCertifiedBio() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(11); + }); + } + + QueryBuilder + thenByCertifiedBioDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(11, sort: Sort.desc); + }); + } + + QueryBuilder thenById() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0); + }); + } + + QueryBuilder thenByIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0, sort: Sort.desc); + }); + } +} + +extension ServiceProviderQueryWhereDistinct + on QueryBuilder { + QueryBuilder distinctByName( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(1, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByWebsite({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(2, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByPostalCodeAndCity({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(3, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByPhoneNumber({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(4, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByEmail({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(5, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByStreetAddress({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(8, caseSensitive: caseSensitive); + }); + } + + QueryBuilder + distinctByCertifiedBio() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(11); + }); + } +} + +extension ServiceProviderQueryProperty1 + on QueryBuilder { + QueryBuilder nameProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(1); + }); + } + + QueryBuilder websiteProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(2); + }); + } + + QueryBuilder + postalCodeAndCityProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(3); + }); + } + + QueryBuilder phoneNumberProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(4); + }); + } + + QueryBuilder emailProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(5); + }); + } + + QueryBuilder?, QAfterProperty> + contactPersonProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(6); + }); + } + + QueryBuilder?, QAfterProperty> + measuresProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(7); + }); + } + + QueryBuilder + streetAddressProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(8); + }); + } + + QueryBuilder?, QAfterProperty> + regionProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(9); + }); + } + + QueryBuilder?, QAfterProperty> + businessTypeProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(10); + }); + } + + QueryBuilder certifiedBioProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(11); + }); + } + + QueryBuilder idProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(0); + }); + } +} + +extension ServiceProviderQueryProperty2 + on QueryBuilder { + QueryBuilder nameProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(1); + }); + } + + QueryBuilder + websiteProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(2); + }); + } + + QueryBuilder + postalCodeAndCityProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(3); + }); + } + + QueryBuilder + phoneNumberProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(4); + }); + } + + QueryBuilder emailProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(5); + }); + } + + QueryBuilder?), QAfterProperty> + contactPersonProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(6); + }); + } + + QueryBuilder?), QAfterProperty> + measuresProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(7); + }); + } + + QueryBuilder + streetAddressProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(8); + }); + } + + QueryBuilder?), QAfterProperty> + regionProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(9); + }); + } + + QueryBuilder?), QAfterProperty> + businessTypeProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(10); + }); + } + + QueryBuilder + certifiedBioProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(11); + }); + } + + QueryBuilder idProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(0); + }); + } +} + +extension ServiceProviderQueryProperty3 + on QueryBuilder { + QueryBuilder nameProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(1); + }); + } + + QueryBuilder + websiteProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(2); + }); + } + + QueryBuilder + postalCodeAndCityProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(3); + }); + } + + QueryBuilder + phoneNumberProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(4); + }); + } + + QueryBuilder + emailProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(5); + }); + } + + QueryBuilder?), QOperations> + contactPersonProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(6); + }); + } + + QueryBuilder?), QOperations> + measuresProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(7); + }); + } + + QueryBuilder + streetAddressProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(8); + }); + } + + QueryBuilder?), QOperations> + regionProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(9); + }); + } + + QueryBuilder?), QOperations> + businessTypeProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(10); + }); + } + + QueryBuilder + certifiedBioProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(11); + }); + } + + QueryBuilder idProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(0); + }); + } +} + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +ServiceProvider _$ServiceProviderFromJson(Map json) => + ServiceProvider() + ..id = (json['id'] as num).toInt() + ..name = json['Name des Dienstleisters'] as String? + ..website = json['Link Webseite'] as String? + ..postalCodeAndCity = json['Postleitzahl und Ort'] as String? + ..phoneNumber = json['Telefonnummer'] as String? + ..email = json['E-Mail'] as String? + ..contactPerson = (json['Ansprechpersonen'] as List?) + ?.map((e) => IdValue.fromJson(e as Map)) + .toList() + ..measures = (json['00 Maßnahmen_Main'] as List?) + ?.map((e) => IdValue.fromJson(e as Map)) + .toList() + ..streetAddress = json['Straße und Hausnummer'] as String? + ..region = (json['Region'] as List?) + ?.map((e) => IdValueColor.fromJson(e as Map)) + .toList() + ..businessType = (json['Art des Unternehmens'] as List?) + ?.map((e) => IdValueColor.fromJson(e as Map)) + .toList() + ..certifiedBio = json['Bio-zertifiziert?'] as bool; + +Map _$ServiceProviderToJson(ServiceProvider instance) => + { + 'id': instance.id, + 'Name des Dienstleisters': instance.name, + 'Link Webseite': instance.website, + 'Postleitzahl und Ort': instance.postalCodeAndCity, + 'Telefonnummer': instance.phoneNumber, + 'E-Mail': instance.email, + 'Ansprechpersonen': + instance.contactPerson?.map((e) => e.toJson()).toList(), + '00 Maßnahmen_Main': instance.measures?.map((e) => e.toJson()).toList(), + 'Straße und Hausnummer': instance.streetAddress, + 'Region': instance.region?.map((e) => e.toJson()).toList(), + 'Art des Unternehmens': + instance.businessType?.map((e) => e.toJson()).toList(), + 'Bio-zertifiziert?': instance.certifiedBio, + }; diff --git a/lib/src/entity/service_provider/service_provider_contact_person.dart b/lib/src/entity/service_provider/service_provider_contact_person.dart new file mode 100644 index 0000000..8e0b292 --- /dev/null +++ b/lib/src/entity/service_provider/service_provider_contact_person.dart @@ -0,0 +1,27 @@ +import 'package:ambito/src/entity/entities.dart'; +import 'package:isar/isar.dart'; +import 'package:json_annotation/json_annotation.dart'; + +part 'service_provider_contact_person.g.dart'; + +@JsonSerializable(explicitToJson: true) +@collection +class ServiceProviderContactPerson extends BaseEntity with EntityWithIdAndName { + ServiceProviderContactPerson(); + + @JsonKey(name: 'E-Mail') + String? email; + @JsonKey(name: 'Telefonnummer') + String? phoneNumber; + @JsonKey(name: 'Kurzbeschreibung') + String? description; + @JsonKey(name: '09 Dienstleister') + List? serviceProvider; + @JsonKey(name: '00 Maßnahmen_Main') + List? measures; + + factory ServiceProviderContactPerson.fromJson(Map json) => + _$ServiceProviderContactPersonFromJson(json); + + Map toJson() => _$ServiceProviderContactPersonToJson(this); +} diff --git a/lib/src/entity/service_provider/service_provider_contact_person.g.dart b/lib/src/entity/service_provider/service_provider_contact_person.g.dart new file mode 100644 index 0000000..502f221 --- /dev/null +++ b/lib/src/entity/service_provider/service_provider_contact_person.g.dart @@ -0,0 +1,1765 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'service_provider_contact_person.dart'; + +// ************************************************************************** +// _IsarCollectionGenerator +// ************************************************************************** + +// coverage:ignore-file +// ignore_for_file: duplicate_ignore, invalid_use_of_protected_member, lines_longer_than_80_chars, constant_identifier_names, avoid_js_rounded_ints, no_leading_underscores_for_local_identifiers, require_trailing_commas, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_in_if_null_operators, library_private_types_in_public_api, prefer_const_constructors +// ignore_for_file: type=lint + +extension GetServiceProviderContactPersonCollection on Isar { + IsarCollection + get serviceProviderContactPersons => this.collection(); +} + +const ServiceProviderContactPersonSchema = IsarGeneratedSchema( + schema: IsarSchema( + name: 'ServiceProviderContactPerson', + idName: 'id', + embedded: false, + properties: [ + IsarPropertySchema( + name: 'email', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'phoneNumber', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'description', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'serviceProvider', + type: IsarType.objectList, + target: 'IdValue', + ), + IsarPropertySchema( + name: 'measures', + type: IsarType.objectList, + target: 'IdValue', + ), + IsarPropertySchema( + name: 'name', + type: IsarType.string, + ), + ], + indexes: [ + IsarIndexSchema( + name: 'name', + properties: [ + "name", + ], + unique: true, + hash: true, + ), + ], + ), + converter: IsarObjectConverter( + serialize: serializeServiceProviderContactPerson, + deserialize: deserializeServiceProviderContactPerson, + deserializeProperty: deserializeServiceProviderContactPersonProp, + ), + embeddedSchemas: [IdValueSchema], +); + +@isarProtected +int serializeServiceProviderContactPerson( + IsarWriter writer, ServiceProviderContactPerson object) { + { + final value = object.email; + if (value == null) { + IsarCore.writeNull(writer, 1); + } else { + IsarCore.writeString(writer, 1, value); + } + } + { + final value = object.phoneNumber; + if (value == null) { + IsarCore.writeNull(writer, 2); + } else { + IsarCore.writeString(writer, 2, value); + } + } + { + final value = object.description; + if (value == null) { + IsarCore.writeNull(writer, 3); + } else { + IsarCore.writeString(writer, 3, value); + } + } + { + final list = object.serviceProvider; + if (list == null) { + IsarCore.writeNull(writer, 4); + } else { + final listWriter = IsarCore.beginList(writer, 4, list.length); + for (var i = 0; i < list.length; i++) { + { + final value = list[i]; + final objectWriter = IsarCore.beginObject(listWriter, i); + serializeIdValue(objectWriter, value); + IsarCore.endObject(listWriter, objectWriter); + } + } + IsarCore.endList(writer, listWriter); + } + } + { + final list = object.measures; + if (list == null) { + IsarCore.writeNull(writer, 5); + } else { + final listWriter = IsarCore.beginList(writer, 5, list.length); + for (var i = 0; i < list.length; i++) { + { + final value = list[i]; + final objectWriter = IsarCore.beginObject(listWriter, i); + serializeIdValue(objectWriter, value); + IsarCore.endObject(listWriter, objectWriter); + } + } + IsarCore.endList(writer, listWriter); + } + } + { + final value = object.name; + if (value == null) { + IsarCore.writeNull(writer, 6); + } else { + IsarCore.writeString(writer, 6, value); + } + } + return object.id; +} + +@isarProtected +ServiceProviderContactPerson deserializeServiceProviderContactPerson( + IsarReader reader) { + final object = ServiceProviderContactPerson(); + object.email = IsarCore.readString(reader, 1); + object.phoneNumber = IsarCore.readString(reader, 2); + object.description = IsarCore.readString(reader, 3); + { + final length = IsarCore.readList(reader, 4, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.serviceProvider = null; + } else { + final list = List.filled(length, IdValue(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValue(); + } else { + final embedded = deserializeIdValue(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + object.serviceProvider = list; + } + } + } + { + final length = IsarCore.readList(reader, 5, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.measures = null; + } else { + final list = List.filled(length, IdValue(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValue(); + } else { + final embedded = deserializeIdValue(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + object.measures = list; + } + } + } + object.id = IsarCore.readId(reader); + object.name = IsarCore.readString(reader, 6); + return object; +} + +@isarProtected +dynamic deserializeServiceProviderContactPersonProp( + IsarReader reader, int property) { + switch (property) { + case 1: + return IsarCore.readString(reader, 1); + case 2: + return IsarCore.readString(reader, 2); + case 3: + return IsarCore.readString(reader, 3); + case 4: + { + final length = IsarCore.readList(reader, 4, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = + List.filled(length, IdValue(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValue(); + } else { + final embedded = deserializeIdValue(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 5: + { + final length = IsarCore.readList(reader, 5, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = + List.filled(length, IdValue(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValue(); + } else { + final embedded = deserializeIdValue(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 0: + return IsarCore.readId(reader); + case 6: + return IsarCore.readString(reader, 6); + default: + throw ArgumentError('Unknown property: $property'); + } +} + +sealed class _ServiceProviderContactPersonUpdate { + bool call({ + required int id, + String? email, + String? phoneNumber, + String? description, + String? name, + }); +} + +class _ServiceProviderContactPersonUpdateImpl + implements _ServiceProviderContactPersonUpdate { + const _ServiceProviderContactPersonUpdateImpl(this.collection); + + final IsarCollection collection; + + @override + bool call({ + required int id, + Object? email = ignore, + Object? phoneNumber = ignore, + Object? description = ignore, + Object? name = ignore, + }) { + return collection.updateProperties([ + id + ], { + if (email != ignore) 1: email as String?, + if (phoneNumber != ignore) 2: phoneNumber as String?, + if (description != ignore) 3: description as String?, + if (name != ignore) 6: name as String?, + }) > + 0; + } +} + +sealed class _ServiceProviderContactPersonUpdateAll { + int call({ + required List id, + String? email, + String? phoneNumber, + String? description, + String? name, + }); +} + +class _ServiceProviderContactPersonUpdateAllImpl + implements _ServiceProviderContactPersonUpdateAll { + const _ServiceProviderContactPersonUpdateAllImpl(this.collection); + + final IsarCollection collection; + + @override + int call({ + required List id, + Object? email = ignore, + Object? phoneNumber = ignore, + Object? description = ignore, + Object? name = ignore, + }) { + return collection.updateProperties(id, { + if (email != ignore) 1: email as String?, + if (phoneNumber != ignore) 2: phoneNumber as String?, + if (description != ignore) 3: description as String?, + if (name != ignore) 6: name as String?, + }); + } +} + +extension ServiceProviderContactPersonUpdate + on IsarCollection { + _ServiceProviderContactPersonUpdate get update => + _ServiceProviderContactPersonUpdateImpl(this); + + _ServiceProviderContactPersonUpdateAll get updateAll => + _ServiceProviderContactPersonUpdateAllImpl(this); +} + +sealed class _ServiceProviderContactPersonQueryUpdate { + int call({ + String? email, + String? phoneNumber, + String? description, + String? name, + }); +} + +class _ServiceProviderContactPersonQueryUpdateImpl + implements _ServiceProviderContactPersonQueryUpdate { + const _ServiceProviderContactPersonQueryUpdateImpl(this.query, {this.limit}); + + final IsarQuery query; + final int? limit; + + @override + int call({ + Object? email = ignore, + Object? phoneNumber = ignore, + Object? description = ignore, + Object? name = ignore, + }) { + return query.updateProperties(limit: limit, { + if (email != ignore) 1: email as String?, + if (phoneNumber != ignore) 2: phoneNumber as String?, + if (description != ignore) 3: description as String?, + if (name != ignore) 6: name as String?, + }); + } +} + +extension ServiceProviderContactPersonQueryUpdate + on IsarQuery { + _ServiceProviderContactPersonQueryUpdate get updateFirst => + _ServiceProviderContactPersonQueryUpdateImpl(this, limit: 1); + + _ServiceProviderContactPersonQueryUpdate get updateAll => + _ServiceProviderContactPersonQueryUpdateImpl(this); +} + +class _ServiceProviderContactPersonQueryBuilderUpdateImpl + implements _ServiceProviderContactPersonQueryUpdate { + const _ServiceProviderContactPersonQueryBuilderUpdateImpl(this.query, + {this.limit}); + + final QueryBuilder query; + final int? limit; + + @override + int call({ + Object? email = ignore, + Object? phoneNumber = ignore, + Object? description = ignore, + Object? name = ignore, + }) { + final q = query.build(); + try { + return q.updateProperties(limit: limit, { + if (email != ignore) 1: email as String?, + if (phoneNumber != ignore) 2: phoneNumber as String?, + if (description != ignore) 3: description as String?, + if (name != ignore) 6: name as String?, + }); + } finally { + q.close(); + } + } +} + +extension ServiceProviderContactPersonQueryBuilderUpdate on QueryBuilder< + ServiceProviderContactPerson, ServiceProviderContactPerson, QOperations> { + _ServiceProviderContactPersonQueryUpdate get updateFirst => + _ServiceProviderContactPersonQueryBuilderUpdateImpl(this, limit: 1); + + _ServiceProviderContactPersonQueryUpdate get updateAll => + _ServiceProviderContactPersonQueryBuilderUpdateImpl(this); +} + +extension ServiceProviderContactPersonQueryFilter on QueryBuilder< + ServiceProviderContactPerson, + ServiceProviderContactPerson, + QFilterCondition> { + QueryBuilder emailIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 1)); + }); + } + + QueryBuilder emailIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 1)); + }); + } + + QueryBuilder emailEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder emailGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder emailGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder emailLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder emailLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder emailBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 1, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder emailStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder emailEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + emailContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + emailMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 1, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder emailIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 1, + value: '', + ), + ); + }); + } + + QueryBuilder emailIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 1, + value: '', + ), + ); + }); + } + + QueryBuilder phoneNumberIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 2)); + }); + } + + QueryBuilder phoneNumberIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 2)); + }); + } + + QueryBuilder phoneNumberEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder phoneNumberGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder phoneNumberGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder phoneNumberLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder phoneNumberLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder phoneNumberBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 2, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder phoneNumberStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder phoneNumberEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + phoneNumberContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 2, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + phoneNumberMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 2, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder phoneNumberIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 2, + value: '', + ), + ); + }); + } + + QueryBuilder phoneNumberIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 2, + value: '', + ), + ); + }); + } + + QueryBuilder descriptionIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 3)); + }); + } + + QueryBuilder descriptionIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 3)); + }); + } + + QueryBuilder descriptionEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder descriptionGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder descriptionGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder descriptionLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder descriptionLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder descriptionBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 3, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder descriptionStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder descriptionEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + descriptionContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 3, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + descriptionMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 3, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder descriptionIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 3, + value: '', + ), + ); + }); + } + + QueryBuilder descriptionIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 3, + value: '', + ), + ); + }); + } + + QueryBuilder serviceProviderIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 4)); + }); + } + + QueryBuilder serviceProviderIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 4)); + }); + } + + QueryBuilder serviceProviderIsEmpty() { + return not().group( + (q) => q.serviceProviderIsNull().or().serviceProviderIsNotEmpty(), + ); + } + + QueryBuilder serviceProviderIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 4, value: null), + ); + }); + } + + QueryBuilder measuresIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 5)); + }); + } + + QueryBuilder measuresIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 5)); + }); + } + + QueryBuilder measuresIsEmpty() { + return not().group( + (q) => q.measuresIsNull().or().measuresIsNotEmpty(), + ); + } + + QueryBuilder measuresIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 5, value: null), + ); + }); + } + + QueryBuilder idEqualTo( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder idGreaterThan( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder idGreaterThanOrEqualTo( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder idLessThan( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder idLessThanOrEqualTo( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder idBetween( + int lower, + int upper, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 0, + lower: lower, + upper: upper, + ), + ); + }); + } + + QueryBuilder nameIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 6)); + }); + } + + QueryBuilder nameIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 6)); + }); + } + + QueryBuilder nameEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 6, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + nameContains(String value, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + nameMatches(String pattern, {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 6, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder nameIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 6, + value: '', + ), + ); + }); + } + + QueryBuilder nameIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 6, + value: '', + ), + ); + }); + } +} + +extension ServiceProviderContactPersonQueryObject on QueryBuilder< + ServiceProviderContactPerson, + ServiceProviderContactPerson, + QFilterCondition> {} + +extension ServiceProviderContactPersonQuerySortBy on QueryBuilder< + ServiceProviderContactPerson, ServiceProviderContactPerson, QSortBy> { + QueryBuilder sortByEmail({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 1, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByEmailDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 1, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByPhoneNumber({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 2, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByPhoneNumberDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 2, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByDescription({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 3, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByDescriptionDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 3, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortById() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0); + }); + } + + QueryBuilder sortByIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0, sort: Sort.desc); + }); + } + + QueryBuilder sortByName({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 6, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByNameDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 6, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } +} + +extension ServiceProviderContactPersonQuerySortThenBy on QueryBuilder< + ServiceProviderContactPerson, ServiceProviderContactPerson, QSortThenBy> { + QueryBuilder thenByEmail({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(1, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByEmailDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(1, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByPhoneNumber({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(2, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByPhoneNumberDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(2, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByDescription({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(3, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByDescriptionDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(3, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenById() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0); + }); + } + + QueryBuilder thenByIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0, sort: Sort.desc); + }); + } + + QueryBuilder thenByName({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(6, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByNameDesc({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(6, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } +} + +extension ServiceProviderContactPersonQueryWhereDistinct on QueryBuilder< + ServiceProviderContactPerson, ServiceProviderContactPerson, QDistinct> { + QueryBuilder distinctByEmail({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(1, caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctByPhoneNumber({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(2, caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctByDescription({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(3, caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctByName({bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(6, caseSensitive: caseSensitive); + }); + } +} + +extension ServiceProviderContactPersonQueryProperty1 on QueryBuilder< + ServiceProviderContactPerson, ServiceProviderContactPerson, QProperty> { + QueryBuilder + emailProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(1); + }); + } + + QueryBuilder + phoneNumberProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(2); + }); + } + + QueryBuilder + descriptionProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(3); + }); + } + + QueryBuilder?, QAfterProperty> + serviceProviderProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(4); + }); + } + + QueryBuilder?, QAfterProperty> + measuresProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(5); + }); + } + + QueryBuilder idProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(0); + }); + } + + QueryBuilder + nameProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(6); + }); + } +} + +extension ServiceProviderContactPersonQueryProperty2 + on QueryBuilder { + QueryBuilder + emailProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(1); + }); + } + + QueryBuilder + phoneNumberProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(2); + }); + } + + QueryBuilder + descriptionProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(3); + }); + } + + QueryBuilder?), + QAfterProperty> serviceProviderProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(4); + }); + } + + QueryBuilder?), + QAfterProperty> measuresProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(5); + }); + } + + QueryBuilder + idProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(0); + }); + } + + QueryBuilder + nameProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(6); + }); + } +} + +extension ServiceProviderContactPersonQueryProperty3 + on QueryBuilder { + QueryBuilder + emailProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(1); + }); + } + + QueryBuilder + phoneNumberProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(2); + }); + } + + QueryBuilder + descriptionProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(3); + }); + } + + QueryBuilder?), + QOperations> serviceProviderProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(4); + }); + } + + QueryBuilder?), + QOperations> measuresProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(5); + }); + } + + QueryBuilder + idProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(0); + }); + } + + QueryBuilder + nameProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(6); + }); + } +} + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +ServiceProviderContactPerson _$ServiceProviderContactPersonFromJson( + Map json) => + ServiceProviderContactPerson() + ..id = (json['id'] as num).toInt() + ..name = json['Name'] as String? + ..email = json['E-Mail'] as String? + ..phoneNumber = json['Telefonnummer'] as String? + ..description = json['Kurzbeschreibung'] as String? + ..serviceProvider = (json['09 Dienstleister'] as List?) + ?.map((e) => IdValue.fromJson(e as Map)) + .toList() + ..measures = (json['00 Maßnahmen_Main'] as List?) + ?.map((e) => IdValue.fromJson(e as Map)) + .toList(); + +Map _$ServiceProviderContactPersonToJson( + ServiceProviderContactPerson instance) => + { + 'id': instance.id, + 'Name': instance.name, + 'E-Mail': instance.email, + 'Telefonnummer': instance.phoneNumber, + 'Kurzbeschreibung': instance.description, + '09 Dienstleister': + instance.serviceProvider?.map((e) => e.toJson()).toList(), + '00 Maßnahmen_Main': instance.measures?.map((e) => e.toJson()).toList(), + }; diff --git a/lib/src/entity/service_provider/service_provider_contact_person_repository.dart b/lib/src/entity/service_provider/service_provider_contact_person_repository.dart new file mode 100644 index 0000000..75be70f --- /dev/null +++ b/lib/src/entity/service_provider/service_provider_contact_person_repository.dart @@ -0,0 +1,10 @@ +import 'package:ambito/src/entity/entities.dart'; +import 'package:ambito/src/packages/ambito_db/base_db.dart'; +import 'package:isar/isar.dart'; + +import '../../../../main.dart'; + +class ServiceProviderContactPersonRepository extends BaseDB { + @override + IsarCollection collection = isar.serviceProviderContactPersons; +} diff --git a/lib/src/entity/service_provider/service_provider_repository.dart b/lib/src/entity/service_provider/service_provider_repository.dart new file mode 100644 index 0000000..c19e60b --- /dev/null +++ b/lib/src/entity/service_provider/service_provider_repository.dart @@ -0,0 +1,10 @@ +import 'package:ambito/src/entity/entities.dart'; +import 'package:ambito/src/packages/ambito_db/base_db.dart'; +import 'package:isar/isar.dart'; + +import '../../../../main.dart'; + +class ServiceProviderRepository extends BaseDB { + @override + IsarCollection collection = isar.serviceProviders; +} diff --git a/lib/src/entity/source/source.dart b/lib/src/entity/source/source.dart new file mode 100644 index 0000000..b5cd266 --- /dev/null +++ b/lib/src/entity/source/source.dart @@ -0,0 +1,43 @@ +import 'package:ambito/src/entity/entities.dart'; +import 'package:isar/isar.dart'; +import 'package:json_annotation/json_annotation.dart'; + +part 'source.g.dart'; + +@JsonSerializable(explicitToJson: true) +@collection +class Source extends BaseEntity with EntityWithId { + Source(); + + @JsonKey(name: 'Titel') + @Index() + String? title; + @JsonKey(name: '00 Maßnahmen_Main') + List? measures; + @JsonKey(name: 'Tag') + List? tags; + @JsonKey(name: 'Erscheinungsjahr') + String? publicationYear; + @JsonKey(name: 'Link Webseite') + String? url; + @JsonKey(name: 'DOI') + String? doi; + @JsonKey(name: 'Quellart') + List? typeOfSource; + @JsonKey(name: 'Datei') + List? files; + @JsonKey(name: 'Link zu Server') + String? serverUrl; + @JsonKey(name: 'Autor/in') + List? authors; + @JsonKey(name: 'Seiten') + String? pages; + @JsonKey(name: 'Verwendet in Maßnahmendatenblatt') + List? usedInFactsheet; + @JsonKey(name: 'Anmerkung') + String? note; + + factory Source.fromJson(Map json) => _$SourceFromJson(json); + + Map toJson() => _$SourceToJson(this); +} diff --git a/lib/src/entity/source/source.g.dart b/lib/src/entity/source/source.g.dart new file mode 100644 index 0000000..7c33f15 --- /dev/null +++ b/lib/src/entity/source/source.g.dart @@ -0,0 +1,2977 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'source.dart'; + +// ************************************************************************** +// _IsarCollectionGenerator +// ************************************************************************** + +// coverage:ignore-file +// ignore_for_file: duplicate_ignore, invalid_use_of_protected_member, lines_longer_than_80_chars, constant_identifier_names, avoid_js_rounded_ints, no_leading_underscores_for_local_identifiers, require_trailing_commas, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_in_if_null_operators, library_private_types_in_public_api, prefer_const_constructors +// ignore_for_file: type=lint + +extension GetSourceCollection on Isar { + IsarCollection get sources => this.collection(); +} + +const SourceSchema = IsarGeneratedSchema( + schema: IsarSchema( + name: 'Source', + idName: 'id', + embedded: false, + properties: [ + IsarPropertySchema( + name: 'title', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'measures', + type: IsarType.objectList, + target: 'IdValue', + ), + IsarPropertySchema( + name: 'tags', + type: IsarType.objectList, + target: 'IdValueColor', + ), + IsarPropertySchema( + name: 'publicationYear', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'url', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'doi', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'typeOfSource', + type: IsarType.objectList, + target: 'IdValueColor', + ), + IsarPropertySchema( + name: 'files', + type: IsarType.objectList, + target: 'FilePart', + ), + IsarPropertySchema( + name: 'serverUrl', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'authors', + type: IsarType.objectList, + target: 'IdValueColor', + ), + IsarPropertySchema( + name: 'pages', + type: IsarType.string, + ), + IsarPropertySchema( + name: 'usedInFactsheet', + type: IsarType.objectList, + target: 'IdValue', + ), + IsarPropertySchema( + name: 'note', + type: IsarType.string, + ), + ], + indexes: [ + IsarIndexSchema( + name: 'title', + properties: [ + "title", + ], + unique: false, + hash: false, + ), + ], + ), + converter: IsarObjectConverter( + serialize: serializeSource, + deserialize: deserializeSource, + deserializeProperty: deserializeSourceProp, + ), + embeddedSchemas: [ + IdValueSchema, + IdValueColorSchema, + FilePartSchema, + ThumbnailsSchema, + ThumbnailSchema + ], +); + +@isarProtected +int serializeSource(IsarWriter writer, Source object) { + { + final value = object.title; + if (value == null) { + IsarCore.writeNull(writer, 1); + } else { + IsarCore.writeString(writer, 1, value); + } + } + { + final list = object.measures; + if (list == null) { + IsarCore.writeNull(writer, 2); + } else { + final listWriter = IsarCore.beginList(writer, 2, list.length); + for (var i = 0; i < list.length; i++) { + { + final value = list[i]; + final objectWriter = IsarCore.beginObject(listWriter, i); + serializeIdValue(objectWriter, value); + IsarCore.endObject(listWriter, objectWriter); + } + } + IsarCore.endList(writer, listWriter); + } + } + { + final list = object.tags; + if (list == null) { + IsarCore.writeNull(writer, 3); + } else { + final listWriter = IsarCore.beginList(writer, 3, list.length); + for (var i = 0; i < list.length; i++) { + { + final value = list[i]; + final objectWriter = IsarCore.beginObject(listWriter, i); + serializeIdValueColor(objectWriter, value); + IsarCore.endObject(listWriter, objectWriter); + } + } + IsarCore.endList(writer, listWriter); + } + } + { + final value = object.publicationYear; + if (value == null) { + IsarCore.writeNull(writer, 4); + } else { + IsarCore.writeString(writer, 4, value); + } + } + { + final value = object.url; + if (value == null) { + IsarCore.writeNull(writer, 5); + } else { + IsarCore.writeString(writer, 5, value); + } + } + { + final value = object.doi; + if (value == null) { + IsarCore.writeNull(writer, 6); + } else { + IsarCore.writeString(writer, 6, value); + } + } + { + final list = object.typeOfSource; + if (list == null) { + IsarCore.writeNull(writer, 7); + } else { + final listWriter = IsarCore.beginList(writer, 7, list.length); + for (var i = 0; i < list.length; i++) { + { + final value = list[i]; + final objectWriter = IsarCore.beginObject(listWriter, i); + serializeIdValueColor(objectWriter, value); + IsarCore.endObject(listWriter, objectWriter); + } + } + IsarCore.endList(writer, listWriter); + } + } + { + final list = object.files; + if (list == null) { + IsarCore.writeNull(writer, 8); + } else { + final listWriter = IsarCore.beginList(writer, 8, list.length); + for (var i = 0; i < list.length; i++) { + { + final value = list[i]; + final objectWriter = IsarCore.beginObject(listWriter, i); + serializeFilePart(objectWriter, value); + IsarCore.endObject(listWriter, objectWriter); + } + } + IsarCore.endList(writer, listWriter); + } + } + { + final value = object.serverUrl; + if (value == null) { + IsarCore.writeNull(writer, 9); + } else { + IsarCore.writeString(writer, 9, value); + } + } + { + final list = object.authors; + if (list == null) { + IsarCore.writeNull(writer, 10); + } else { + final listWriter = IsarCore.beginList(writer, 10, list.length); + for (var i = 0; i < list.length; i++) { + { + final value = list[i]; + final objectWriter = IsarCore.beginObject(listWriter, i); + serializeIdValueColor(objectWriter, value); + IsarCore.endObject(listWriter, objectWriter); + } + } + IsarCore.endList(writer, listWriter); + } + } + { + final value = object.pages; + if (value == null) { + IsarCore.writeNull(writer, 11); + } else { + IsarCore.writeString(writer, 11, value); + } + } + { + final list = object.usedInFactsheet; + if (list == null) { + IsarCore.writeNull(writer, 12); + } else { + final listWriter = IsarCore.beginList(writer, 12, list.length); + for (var i = 0; i < list.length; i++) { + { + final value = list[i]; + final objectWriter = IsarCore.beginObject(listWriter, i); + serializeIdValue(objectWriter, value); + IsarCore.endObject(listWriter, objectWriter); + } + } + IsarCore.endList(writer, listWriter); + } + } + { + final value = object.note; + if (value == null) { + IsarCore.writeNull(writer, 13); + } else { + IsarCore.writeString(writer, 13, value); + } + } + return object.id; +} + +@isarProtected +Source deserializeSource(IsarReader reader) { + final object = Source(); + object.title = IsarCore.readString(reader, 1); + { + final length = IsarCore.readList(reader, 2, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.measures = null; + } else { + final list = List.filled(length, IdValue(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValue(); + } else { + final embedded = deserializeIdValue(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + object.measures = list; + } + } + } + { + final length = IsarCore.readList(reader, 3, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.tags = null; + } else { + final list = + List.filled(length, IdValueColor(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValueColor(); + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + object.tags = list; + } + } + } + object.publicationYear = IsarCore.readString(reader, 4); + object.url = IsarCore.readString(reader, 5); + object.doi = IsarCore.readString(reader, 6); + { + final length = IsarCore.readList(reader, 7, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.typeOfSource = null; + } else { + final list = + List.filled(length, IdValueColor(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValueColor(); + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + object.typeOfSource = list; + } + } + } + { + final length = IsarCore.readList(reader, 8, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.files = null; + } else { + final list = List.filled(length, FilePart(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = FilePart(); + } else { + final embedded = deserializeFilePart(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + object.files = list; + } + } + } + object.serverUrl = IsarCore.readString(reader, 9); + { + final length = IsarCore.readList(reader, 10, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.authors = null; + } else { + final list = + List.filled(length, IdValueColor(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValueColor(); + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + object.authors = list; + } + } + } + object.pages = IsarCore.readString(reader, 11); + { + final length = IsarCore.readList(reader, 12, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + object.usedInFactsheet = null; + } else { + final list = List.filled(length, IdValue(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValue(); + } else { + final embedded = deserializeIdValue(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + object.usedInFactsheet = list; + } + } + } + object.note = IsarCore.readString(reader, 13); + object.id = IsarCore.readId(reader); + return object; +} + +@isarProtected +dynamic deserializeSourceProp(IsarReader reader, int property) { + switch (property) { + case 1: + return IsarCore.readString(reader, 1); + case 2: + { + final length = IsarCore.readList(reader, 2, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = + List.filled(length, IdValue(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValue(); + } else { + final embedded = deserializeIdValue(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 3: + { + final length = IsarCore.readList(reader, 3, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = List.filled(length, IdValueColor(), + growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValueColor(); + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 4: + return IsarCore.readString(reader, 4); + case 5: + return IsarCore.readString(reader, 5); + case 6: + return IsarCore.readString(reader, 6); + case 7: + { + final length = IsarCore.readList(reader, 7, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = List.filled(length, IdValueColor(), + growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValueColor(); + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 8: + { + final length = IsarCore.readList(reader, 8, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = + List.filled(length, FilePart(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = FilePart(); + } else { + final embedded = deserializeFilePart(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 9: + return IsarCore.readString(reader, 9); + case 10: + { + final length = IsarCore.readList(reader, 10, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = List.filled(length, IdValueColor(), + growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValueColor(); + } else { + final embedded = deserializeIdValueColor(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 11: + return IsarCore.readString(reader, 11); + case 12: + { + final length = IsarCore.readList(reader, 12, IsarCore.readerPtrPtr); + { + final reader = IsarCore.readerPtr; + if (reader.isNull) { + return null; + } else { + final list = + List.filled(length, IdValue(), growable: true); + for (var i = 0; i < length; i++) { + { + final objectReader = IsarCore.readObject(reader, i); + if (objectReader.isNull) { + list[i] = IdValue(); + } else { + final embedded = deserializeIdValue(objectReader); + IsarCore.freeReader(objectReader); + list[i] = embedded; + } + } + } + IsarCore.freeReader(reader); + return list; + } + } + } + case 13: + return IsarCore.readString(reader, 13); + case 0: + return IsarCore.readId(reader); + default: + throw ArgumentError('Unknown property: $property'); + } +} + +sealed class _SourceUpdate { + bool call({ + required int id, + String? title, + String? publicationYear, + String? url, + String? doi, + String? serverUrl, + String? pages, + String? note, + }); +} + +class _SourceUpdateImpl implements _SourceUpdate { + const _SourceUpdateImpl(this.collection); + + final IsarCollection collection; + + @override + bool call({ + required int id, + Object? title = ignore, + Object? publicationYear = ignore, + Object? url = ignore, + Object? doi = ignore, + Object? serverUrl = ignore, + Object? pages = ignore, + Object? note = ignore, + }) { + return collection.updateProperties([ + id + ], { + if (title != ignore) 1: title as String?, + if (publicationYear != ignore) 4: publicationYear as String?, + if (url != ignore) 5: url as String?, + if (doi != ignore) 6: doi as String?, + if (serverUrl != ignore) 9: serverUrl as String?, + if (pages != ignore) 11: pages as String?, + if (note != ignore) 13: note as String?, + }) > + 0; + } +} + +sealed class _SourceUpdateAll { + int call({ + required List id, + String? title, + String? publicationYear, + String? url, + String? doi, + String? serverUrl, + String? pages, + String? note, + }); +} + +class _SourceUpdateAllImpl implements _SourceUpdateAll { + const _SourceUpdateAllImpl(this.collection); + + final IsarCollection collection; + + @override + int call({ + required List id, + Object? title = ignore, + Object? publicationYear = ignore, + Object? url = ignore, + Object? doi = ignore, + Object? serverUrl = ignore, + Object? pages = ignore, + Object? note = ignore, + }) { + return collection.updateProperties(id, { + if (title != ignore) 1: title as String?, + if (publicationYear != ignore) 4: publicationYear as String?, + if (url != ignore) 5: url as String?, + if (doi != ignore) 6: doi as String?, + if (serverUrl != ignore) 9: serverUrl as String?, + if (pages != ignore) 11: pages as String?, + if (note != ignore) 13: note as String?, + }); + } +} + +extension SourceUpdate on IsarCollection { + _SourceUpdate get update => _SourceUpdateImpl(this); + + _SourceUpdateAll get updateAll => _SourceUpdateAllImpl(this); +} + +sealed class _SourceQueryUpdate { + int call({ + String? title, + String? publicationYear, + String? url, + String? doi, + String? serverUrl, + String? pages, + String? note, + }); +} + +class _SourceQueryUpdateImpl implements _SourceQueryUpdate { + const _SourceQueryUpdateImpl(this.query, {this.limit}); + + final IsarQuery query; + final int? limit; + + @override + int call({ + Object? title = ignore, + Object? publicationYear = ignore, + Object? url = ignore, + Object? doi = ignore, + Object? serverUrl = ignore, + Object? pages = ignore, + Object? note = ignore, + }) { + return query.updateProperties(limit: limit, { + if (title != ignore) 1: title as String?, + if (publicationYear != ignore) 4: publicationYear as String?, + if (url != ignore) 5: url as String?, + if (doi != ignore) 6: doi as String?, + if (serverUrl != ignore) 9: serverUrl as String?, + if (pages != ignore) 11: pages as String?, + if (note != ignore) 13: note as String?, + }); + } +} + +extension SourceQueryUpdate on IsarQuery { + _SourceQueryUpdate get updateFirst => _SourceQueryUpdateImpl(this, limit: 1); + + _SourceQueryUpdate get updateAll => _SourceQueryUpdateImpl(this); +} + +class _SourceQueryBuilderUpdateImpl implements _SourceQueryUpdate { + const _SourceQueryBuilderUpdateImpl(this.query, {this.limit}); + + final QueryBuilder query; + final int? limit; + + @override + int call({ + Object? title = ignore, + Object? publicationYear = ignore, + Object? url = ignore, + Object? doi = ignore, + Object? serverUrl = ignore, + Object? pages = ignore, + Object? note = ignore, + }) { + final q = query.build(); + try { + return q.updateProperties(limit: limit, { + if (title != ignore) 1: title as String?, + if (publicationYear != ignore) 4: publicationYear as String?, + if (url != ignore) 5: url as String?, + if (doi != ignore) 6: doi as String?, + if (serverUrl != ignore) 9: serverUrl as String?, + if (pages != ignore) 11: pages as String?, + if (note != ignore) 13: note as String?, + }); + } finally { + q.close(); + } + } +} + +extension SourceQueryBuilderUpdate + on QueryBuilder { + _SourceQueryUpdate get updateFirst => + _SourceQueryBuilderUpdateImpl(this, limit: 1); + + _SourceQueryUpdate get updateAll => _SourceQueryBuilderUpdateImpl(this); +} + +extension SourceQueryFilter on QueryBuilder { + QueryBuilder titleIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 1)); + }); + } + + QueryBuilder titleIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 1)); + }); + } + + QueryBuilder titleEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder titleGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder titleGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder titleLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder titleLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder titleBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 1, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder titleStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder titleEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder titleContains( + String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 1, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder titleMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 1, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder titleIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 1, + value: '', + ), + ); + }); + } + + QueryBuilder titleIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 1, + value: '', + ), + ); + }); + } + + QueryBuilder measuresIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 2)); + }); + } + + QueryBuilder measuresIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 2)); + }); + } + + QueryBuilder measuresIsEmpty() { + return not().group( + (q) => q.measuresIsNull().or().measuresIsNotEmpty(), + ); + } + + QueryBuilder measuresIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 2, value: null), + ); + }); + } + + QueryBuilder tagsIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 3)); + }); + } + + QueryBuilder tagsIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 3)); + }); + } + + QueryBuilder tagsIsEmpty() { + return not().group( + (q) => q.tagsIsNull().or().tagsIsNotEmpty(), + ); + } + + QueryBuilder tagsIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 3, value: null), + ); + }); + } + + QueryBuilder publicationYearIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 4)); + }); + } + + QueryBuilder + publicationYearIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 4)); + }); + } + + QueryBuilder publicationYearEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 4, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + publicationYearGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 4, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + publicationYearGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 4, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder publicationYearLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 4, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + publicationYearLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 4, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder publicationYearBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 4, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder publicationYearStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 4, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder publicationYearEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 4, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder publicationYearContains( + String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 4, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder publicationYearMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 4, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder publicationYearIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 4, + value: '', + ), + ); + }); + } + + QueryBuilder + publicationYearIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 4, + value: '', + ), + ); + }); + } + + QueryBuilder urlIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 5)); + }); + } + + QueryBuilder urlIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 5)); + }); + } + + QueryBuilder urlEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder urlGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder urlGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder urlLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder urlLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder urlBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 5, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder urlStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder urlEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder urlContains(String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 5, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder urlMatches(String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 5, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder urlIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 5, + value: '', + ), + ); + }); + } + + QueryBuilder urlIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 5, + value: '', + ), + ); + }); + } + + QueryBuilder doiIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 6)); + }); + } + + QueryBuilder doiIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 6)); + }); + } + + QueryBuilder doiEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder doiGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder doiGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder doiLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder doiLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder doiBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 6, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder doiStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder doiEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder doiContains(String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 6, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder doiMatches(String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 6, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder doiIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 6, + value: '', + ), + ); + }); + } + + QueryBuilder doiIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 6, + value: '', + ), + ); + }); + } + + QueryBuilder typeOfSourceIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 7)); + }); + } + + QueryBuilder typeOfSourceIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 7)); + }); + } + + QueryBuilder typeOfSourceIsEmpty() { + return not().group( + (q) => q.typeOfSourceIsNull().or().typeOfSourceIsNotEmpty(), + ); + } + + QueryBuilder typeOfSourceIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 7, value: null), + ); + }); + } + + QueryBuilder filesIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 8)); + }); + } + + QueryBuilder filesIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 8)); + }); + } + + QueryBuilder filesIsEmpty() { + return not().group( + (q) => q.filesIsNull().or().filesIsNotEmpty(), + ); + } + + QueryBuilder filesIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 8, value: null), + ); + }); + } + + QueryBuilder serverUrlIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 9)); + }); + } + + QueryBuilder serverUrlIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 9)); + }); + } + + QueryBuilder serverUrlEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 9, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder serverUrlGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 9, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + serverUrlGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 9, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder serverUrlLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 9, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder + serverUrlLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 9, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder serverUrlBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 9, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder serverUrlStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 9, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder serverUrlEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 9, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder serverUrlContains( + String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 9, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder serverUrlMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 9, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder serverUrlIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 9, + value: '', + ), + ); + }); + } + + QueryBuilder serverUrlIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 9, + value: '', + ), + ); + }); + } + + QueryBuilder authorsIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 10)); + }); + } + + QueryBuilder authorsIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 10)); + }); + } + + QueryBuilder authorsIsEmpty() { + return not().group( + (q) => q.authorsIsNull().or().authorsIsNotEmpty(), + ); + } + + QueryBuilder authorsIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 10, value: null), + ); + }); + } + + QueryBuilder pagesIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 11)); + }); + } + + QueryBuilder pagesIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 11)); + }); + } + + QueryBuilder pagesEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 11, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder pagesGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 11, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder pagesGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 11, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder pagesLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 11, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder pagesLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 11, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder pagesBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 11, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder pagesStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 11, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder pagesEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 11, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder pagesContains( + String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 11, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder pagesMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 11, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder pagesIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 11, + value: '', + ), + ); + }); + } + + QueryBuilder pagesIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 11, + value: '', + ), + ); + }); + } + + QueryBuilder usedInFactsheetIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 12)); + }); + } + + QueryBuilder + usedInFactsheetIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 12)); + }); + } + + QueryBuilder usedInFactsheetIsEmpty() { + return not().group( + (q) => q.usedInFactsheetIsNull().or().usedInFactsheetIsNotEmpty(), + ); + } + + QueryBuilder + usedInFactsheetIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterOrEqualCondition(property: 12, value: null), + ); + }); + } + + QueryBuilder noteIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const IsNullCondition(property: 13)); + }); + } + + QueryBuilder noteIsNotNull() { + return QueryBuilder.apply(not(), (query) { + return query.addFilterCondition(const IsNullCondition(property: 13)); + }); + } + + QueryBuilder noteEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 13, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder noteGreaterThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 13, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder noteGreaterThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 13, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder noteLessThan( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 13, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder noteLessThanOrEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 13, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder noteBetween( + String? lower, + String? upper, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 13, + lower: lower, + upper: upper, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder noteStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + StartsWithCondition( + property: 13, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder noteEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EndsWithCondition( + property: 13, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder noteContains(String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + ContainsCondition( + property: 13, + value: value, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder noteMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + MatchesCondition( + property: 13, + wildcard: pattern, + caseSensitive: caseSensitive, + ), + ); + }); + } + + QueryBuilder noteIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const EqualCondition( + property: 13, + value: '', + ), + ); + }); + } + + QueryBuilder noteIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + const GreaterCondition( + property: 13, + value: '', + ), + ); + }); + } + + QueryBuilder idEqualTo( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + EqualCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder idGreaterThan( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder idGreaterThanOrEqualTo( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + GreaterOrEqualCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder idLessThan( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder idLessThanOrEqualTo( + int value, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + LessOrEqualCondition( + property: 0, + value: value, + ), + ); + }); + } + + QueryBuilder idBetween( + int lower, + int upper, + ) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition( + BetweenCondition( + property: 0, + lower: lower, + upper: upper, + ), + ); + }); + } +} + +extension SourceQueryObject on QueryBuilder {} + +extension SourceQuerySortBy on QueryBuilder { + QueryBuilder sortByTitle( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 1, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByTitleDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 1, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByPublicationYear( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 4, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByPublicationYearDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 4, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByUrl( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 5, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByUrlDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 5, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByDoi( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 6, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByDoiDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 6, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByServerUrl( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 9, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByServerUrlDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 9, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByPages( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 11, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByPagesDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 11, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByNote( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 13, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortByNoteDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy( + 13, + sort: Sort.desc, + caseSensitive: caseSensitive, + ); + }); + } + + QueryBuilder sortById() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0); + }); + } + + QueryBuilder sortByIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0, sort: Sort.desc); + }); + } +} + +extension SourceQuerySortThenBy on QueryBuilder { + QueryBuilder thenByTitle( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(1, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByTitleDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(1, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByPublicationYear( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(4, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByPublicationYearDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(4, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByUrl( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(5, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByUrlDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(5, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByDoi( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(6, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByDoiDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(6, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByServerUrl( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(9, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByServerUrlDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(9, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByPages( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(11, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByPagesDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(11, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByNote( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(13, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenByNoteDesc( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(13, sort: Sort.desc, caseSensitive: caseSensitive); + }); + } + + QueryBuilder thenById() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0); + }); + } + + QueryBuilder thenByIdDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(0, sort: Sort.desc); + }); + } +} + +extension SourceQueryWhereDistinct on QueryBuilder { + QueryBuilder distinctByTitle( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(1, caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctByPublicationYear( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(4, caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctByUrl( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(5, caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctByDoi( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(6, caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctByServerUrl( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(9, caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctByPages( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(11, caseSensitive: caseSensitive); + }); + } + + QueryBuilder distinctByNote( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(13, caseSensitive: caseSensitive); + }); + } +} + +extension SourceQueryProperty1 on QueryBuilder { + QueryBuilder titleProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(1); + }); + } + + QueryBuilder?, QAfterProperty> measuresProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(2); + }); + } + + QueryBuilder?, QAfterProperty> tagsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(3); + }); + } + + QueryBuilder publicationYearProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(4); + }); + } + + QueryBuilder urlProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(5); + }); + } + + QueryBuilder doiProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(6); + }); + } + + QueryBuilder?, QAfterProperty> + typeOfSourceProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(7); + }); + } + + QueryBuilder?, QAfterProperty> filesProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(8); + }); + } + + QueryBuilder serverUrlProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(9); + }); + } + + QueryBuilder?, QAfterProperty> authorsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(10); + }); + } + + QueryBuilder pagesProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(11); + }); + } + + QueryBuilder?, QAfterProperty> + usedInFactsheetProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(12); + }); + } + + QueryBuilder noteProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(13); + }); + } + + QueryBuilder idProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(0); + }); + } +} + +extension SourceQueryProperty2 on QueryBuilder { + QueryBuilder titleProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(1); + }); + } + + QueryBuilder?), QAfterProperty> measuresProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(2); + }); + } + + QueryBuilder?), QAfterProperty> + tagsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(3); + }); + } + + QueryBuilder publicationYearProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(4); + }); + } + + QueryBuilder urlProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(5); + }); + } + + QueryBuilder doiProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(6); + }); + } + + QueryBuilder?), QAfterProperty> + typeOfSourceProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(7); + }); + } + + QueryBuilder?), QAfterProperty> filesProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(8); + }); + } + + QueryBuilder serverUrlProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(9); + }); + } + + QueryBuilder?), QAfterProperty> + authorsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(10); + }); + } + + QueryBuilder pagesProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(11); + }); + } + + QueryBuilder?), QAfterProperty> + usedInFactsheetProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(12); + }); + } + + QueryBuilder noteProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(13); + }); + } + + QueryBuilder idProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(0); + }); + } +} + +extension SourceQueryProperty3 + on QueryBuilder { + QueryBuilder titleProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(1); + }); + } + + QueryBuilder?), QOperations> + measuresProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(2); + }); + } + + QueryBuilder?), QOperations> + tagsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(3); + }); + } + + QueryBuilder + publicationYearProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(4); + }); + } + + QueryBuilder urlProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(5); + }); + } + + QueryBuilder doiProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(6); + }); + } + + QueryBuilder?), QOperations> + typeOfSourceProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(7); + }); + } + + QueryBuilder?), QOperations> filesProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(8); + }); + } + + QueryBuilder serverUrlProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(9); + }); + } + + QueryBuilder?), QOperations> + authorsProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(10); + }); + } + + QueryBuilder pagesProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(11); + }); + } + + QueryBuilder?), QOperations> + usedInFactsheetProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(12); + }); + } + + QueryBuilder noteProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(13); + }); + } + + QueryBuilder idProperty() { + return QueryBuilder.apply(this, (query) { + return query.addProperty(0); + }); + } +} + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +Source _$SourceFromJson(Map json) => Source() + ..id = (json['id'] as num).toInt() + ..title = json['Titel'] as String? + ..measures = (json['00 Maßnahmen_Main'] as List?) + ?.map((e) => IdValue.fromJson(e as Map)) + .toList() + ..tags = (json['Tag'] as List?) + ?.map((e) => IdValueColor.fromJson(e as Map)) + .toList() + ..publicationYear = json['Erscheinungsjahr'] as String? + ..url = json['Link Webseite'] as String? + ..doi = json['DOI'] as String? + ..typeOfSource = (json['Quellart'] as List?) + ?.map((e) => IdValueColor.fromJson(e as Map)) + .toList() + ..files = (json['Datei'] as List?) + ?.map((e) => FilePart.fromJson(e as Map)) + .toList() + ..serverUrl = json['Link zu Server'] as String? + ..authors = (json['Autor/in'] as List?) + ?.map((e) => IdValueColor.fromJson(e as Map)) + .toList() + ..pages = json['Seiten'] as String? + ..usedInFactsheet = + (json['Verwendet in Maßnahmendatenblatt'] as List?) + ?.map((e) => IdValue.fromJson(e as Map)) + .toList() + ..note = json['Anmerkung'] as String?; + +Map _$SourceToJson(Source instance) => { + 'id': instance.id, + 'Titel': instance.title, + '00 Maßnahmen_Main': instance.measures?.map((e) => e.toJson()).toList(), + 'Tag': instance.tags?.map((e) => e.toJson()).toList(), + 'Erscheinungsjahr': instance.publicationYear, + 'Link Webseite': instance.url, + 'DOI': instance.doi, + 'Quellart': instance.typeOfSource?.map((e) => e.toJson()).toList(), + 'Datei': instance.files?.map((e) => e.toJson()).toList(), + 'Link zu Server': instance.serverUrl, + 'Autor/in': instance.authors?.map((e) => e.toJson()).toList(), + 'Seiten': instance.pages, + 'Verwendet in Maßnahmendatenblatt': + instance.usedInFactsheet?.map((e) => e.toJson()).toList(), + 'Anmerkung': instance.note, + }; diff --git a/lib/src/entity/source/source_repository.dart b/lib/src/entity/source/source_repository.dart new file mode 100644 index 0000000..63e185c --- /dev/null +++ b/lib/src/entity/source/source_repository.dart @@ -0,0 +1,10 @@ +import 'package:ambito/src/entity/entities.dart'; +import 'package:ambito/src/packages/ambito_db/base_db.dart'; +import 'package:isar/isar.dart'; + +import '../../../../main.dart'; + +class SourceRepository extends BaseDB { + @override + IsarCollection collection = isar.sources; +} diff --git a/lib/src/domain/entity/tree_type/tree_type.dart b/lib/src/entity/tree_type/tree_type.dart similarity index 97% rename from lib/src/domain/entity/tree_type/tree_type.dart rename to lib/src/entity/tree_type/tree_type.dart index b097e6e..d2e02ca 100644 --- a/lib/src/domain/entity/tree_type/tree_type.dart +++ b/lib/src/entity/tree_type/tree_type.dart @@ -1,4 +1,4 @@ -import 'package:ambito/src/domain/entity/entities.dart'; +import 'package:ambito/src/entity/entities.dart'; import 'package:isar/isar.dart'; import 'package:json_annotation/json_annotation.dart'; diff --git a/lib/src/domain/entity/tree_type/tree_type.g.dart b/lib/src/entity/tree_type/tree_type.g.dart similarity index 100% rename from lib/src/domain/entity/tree_type/tree_type.g.dart rename to lib/src/entity/tree_type/tree_type.g.dart diff --git a/lib/src/packages/ambito_db/repositories/tree_type_repository.dart b/lib/src/entity/tree_type/tree_type_repository.dart similarity index 58% rename from lib/src/packages/ambito_db/repositories/tree_type_repository.dart rename to lib/src/entity/tree_type/tree_type_repository.dart index 942c1de..36d0f0e 100644 --- a/lib/src/packages/ambito_db/repositories/tree_type_repository.dart +++ b/lib/src/entity/tree_type/tree_type_repository.dart @@ -1,9 +1,10 @@ -import 'package:ambito/src/domain/entity/entities.dart'; +import 'package:ambito/src/entity/entities.dart'; import 'package:isar/isar.dart'; import '../../../../main.dart'; -import '../base_db.dart'; +import '../../packages/ambito_db/base_db.dart'; class TreeTypeRepository extends BaseDB { + @override IsarCollection collection = isar.treeTypes; } diff --git a/lib/src/packages/ambito_api/base.dart b/lib/src/packages/ambito_api/base.dart deleted file mode 100644 index 3ad999d..0000000 --- a/lib/src/packages/ambito_api/base.dart +++ /dev/null @@ -1,65 +0,0 @@ -import 'dart:convert'; - -import 'package:ambito/src/domain/entity/entities.dart'; -import 'package:ambito/src/domain/entity/funding_program/funding_program.dart'; -import 'package:ambito/src/packages/ambito_api/restclient.dart'; -import 'package:ambito/src/packages/ambito_db/repositories/funding_program_repository.dart'; -import 'package:flutter_dotenv/flutter_dotenv.dart'; - -import '../ambito_db/base_db.dart'; - -class BaseApi { - Map tables = {}; - - init() { - tables = jsonDecode(dotenv.get('BASEROW_IDS')); - } - - Future getContent(String table) async { - init(); - int tableId = tables[table] ?? 0; - if (tableId > 0) { - var response = - await RestClient().get('$tableId/?user_field_names=true&size=200'); - if (response.statusCode == 200) { - var json = _jsonDecoded(response.body); - switch (table) { - case 'tree_type': - for (var treeType in json['results']) { - TreeTypeRepository().put(TreeType.fromJson(treeType)); - } - break; - case 'measure': - for (var measure in json['results']) { - MeasureRepository().put(Measure.fromJson(measure)); - } - break; - case 'measure_combination': - for (var measureCombination in json['results']) { - MeasureCombinationRepository() - .put(MeasureCombination.fromJson(measureCombination)); - } - break; - case 'organism': - for (var organism in json['results']) { - OrganismRepository().put(Organism.fromJson(organism)); - } - break; - case 'funding_program': - for (var fundingProgram in json['results']) { - FundingProgramRepository() - .put(FundingProgram.fromJson(fundingProgram)); - } - break; - } - return true; - } - return false; - } - return false; - } - - dynamic _jsonDecoded(String input) { - return jsonDecode(utf8.decode(input.runes.toList())); - } -} diff --git a/lib/src/packages/ambito_api/base_api.dart b/lib/src/packages/ambito_api/base_api.dart new file mode 100644 index 0000000..66dacb1 --- /dev/null +++ b/lib/src/packages/ambito_api/base_api.dart @@ -0,0 +1,103 @@ +import 'dart:convert'; + +import 'package:ambito/src/entity/entities.dart'; +import 'package:ambito/src/packages/ambito_api/restclient.dart'; +import 'package:flutter_dotenv/flutter_dotenv.dart'; + +import '../../../main.dart'; +import '../ambito_db/base_db.dart'; + +class BaseApi { + Map tables = {}; + + init() { + // read table ids from .env file... + tables = jsonDecode(dotenv.get('BASEROW_IDS')); + } + + Future getContent(String table) async { + init(); + int tableId = tables[table] ?? 0; + + if (tableId <= 0) return false; + + var response = + await RestClient().get('$tableId/?user_field_names=true&size=200'); + if (response.statusCode != 200) return false; + + var json = _jsonDecoded(response.body); + + if (table == 'source') { + logger.d(json); + } + + var results = json['results']; + + final repositoryMap = { + 'tree_type': TreeTypeRepository().put, + 'measure': MeasureRepository().put, + 'measure_combination': MeasureCombinationRepository().put, + 'organism': OrganismRepository().put, + 'funding_program': FundingProgramRepository().put, + 'location_requirements': LocationRequirementsRepository().put, + 'reference_implementation': ReferenceImplementationRepository().put, + 'business': BusinessRepository().put, + 'service_provider': ServiceProviderRepository().put, + 'service_provider_contact_person': + ServiceProviderContactPersonRepository().put, + 'material': MaterialRepository().put, + 'source': SourceRepository().put, + 'experience_report': ExperienceReportRepository().put, + 'approval_requirement': ApprovalRequirementRepository().put + }; + + var repositoryFunction = repositoryMap[table]; + if (repositoryFunction == null) return false; + + for (var item in results) { + var model = _createModelFromJson(table, item); + repositoryFunction(model); + } + + return true; + } + + dynamic _createModelFromJson(String table, Map json) { + switch (table) { + case 'tree_type': + return TreeType.fromJson(json); + case 'measure': + return Measure.fromJson(json); + case 'measure_combination': + return MeasureCombination.fromJson(json); + case 'organism': + return Organism.fromJson(json); + case 'funding_program': + return FundingProgram.fromJson(json); + case 'location_requirements': + return LocationRequirements.fromJson(json); + case 'reference_implementation': + return ReferenceImplementation.fromJson(json); + case 'business': + return Business.fromJson(json); + case 'service_provider': + return ServiceProvider.fromJson(json); + case 'service_provider_contact_person': + return ServiceProviderContactPerson.fromJson(json); + case 'material': + return Material.fromJson(json); + case 'source': + return Source.fromJson(json); + case 'experience_report': + return ExperienceReport.fromJson(json); + case 'approval_requirement': + return ApprovalRequirement.fromJson(json); + default: + return null; + } + } + + dynamic _jsonDecoded(String input) { + return jsonDecode(utf8.decode(input.runes.toList())); + } +} diff --git a/lib/src/packages/ambito_db/base_db.dart b/lib/src/packages/ambito_db/base_db.dart index b8661b1..8414324 100644 --- a/lib/src/packages/ambito_db/base_db.dart +++ b/lib/src/packages/ambito_db/base_db.dart @@ -1,12 +1,42 @@ -import 'package:ambito/src/domain/entity/entities.dart'; +import 'package:ambito/src/entity/approval_requirement/approval_requirement.dart'; +import 'package:ambito/src/entity/entities.dart'; +import 'package:flutter/foundation.dart'; import 'package:isar/isar.dart'; +import 'package:path_provider/path_provider.dart'; import '../../../main.dart'; -export 'repositories/measure_combination_repository.dart'; -export 'repositories/measure_repository.dart'; -export 'repositories/organism_repository.dart'; -export 'repositories/tree_type_repository.dart'; +export 'repositories/_repositories.dart'; + +class AmbitoIsarDB { + init() async { + await Isar.initialize(); + String dir = kIsWeb + ? Isar.sqliteInMemory + : (await getApplicationDocumentsDirectory()).path; + const engine = kIsWeb ? IsarEngine.sqlite : IsarEngine.isar; + isar = Isar.open( + schemas: [ + ApprovalRequirementSchema, + BusinessSchema, + FundingProgramSchema, + LocationRequirementsSchema, + MeasureSchema, + MeasureCombinationSchema, + NumberFactsheetSchema, + OrganismSchema, + ReferenceImplementationSchema, + ServiceProviderSchema, + ServiceProviderContactPersonSchema, + SourceSchema, + TreeTypeSchema, + ], + directory: dir, + engine: engine, + inspector: true, + ); + } +} abstract class BaseDB { abstract IsarCollection collection; @@ -23,10 +53,12 @@ abstract class BaseDB { }); } - get(int id) { + // get entity by id + BaseEntity get(int id) { return collection.get(id); } + // get all entities of selected collection List getAll() { return collection.where().findAll(); } diff --git a/lib/src/packages/ambito_db/repositories/_repositories.dart b/lib/src/packages/ambito_db/repositories/_repositories.dart new file mode 100644 index 0000000..80ae1fa --- /dev/null +++ b/lib/src/packages/ambito_db/repositories/_repositories.dart @@ -0,0 +1,15 @@ +export '../../../entity/approval_requirement/approval_requirement_repository.dart'; +export '../../../entity/business/business_repository.dart'; +export '../../../entity/experience_report/experience_report_repository.dart'; +export '../../../entity/funding_program/funding_program_repository.dart'; +export '../../../entity/location_requirements/location_requirements_repository.dart'; +export '../../../entity/material/material_repository.dart'; +export '../../../entity/measure/measure_repository.dart'; +export '../../../entity/measure_combination/measure_combination_repository.dart'; +export '../../../entity/number_factsheet/number_factsheet_repository.dart'; +export '../../../entity/organism/organism_repository.dart'; +export '../../../entity/reference_implementation/reference_implementation_repository.dart'; +export '../../../entity/service_provider/service_provider_contact_person_repository.dart'; +export '../../../entity/service_provider/service_provider_repository.dart'; +export '../../../entity/source/source_repository.dart'; +export '../../../entity/tree_type/tree_type_repository.dart'; diff --git a/lib/src/pages/actions/actions_page.dart b/lib/src/pages/actions/actions_page.dart index b375c31..df52918 100644 --- a/lib/src/pages/actions/actions_page.dart +++ b/lib/src/pages/actions/actions_page.dart @@ -1,5 +1,4 @@ -import 'package:ambito/src/extensions/extensions.dart'; -import 'package:ambito/src/packages/ambito_db/repositories/measure_repository.dart'; +import 'package:ambito/src/entity/measure/measure_repository.dart'; import 'package:ambito/src/widgets/form/fields/field_dropdown.dart'; import 'package:ambito/src/widgets/form/fields/field_monthsrangepicker.dart'; import 'package:ambito/src/widgets/form/form_widget.dart'; @@ -10,7 +9,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_i18n/flutter_i18n.dart'; import '../../../main.dart'; -import '../../domain/entity/entities.dart'; +import '../../entity/entities.dart'; class ActionsPage extends StatefulWidget { const ActionsPage({super.key}); @@ -46,8 +45,10 @@ class ActionsPageState extends State { support = {}; } + buildCards() {} + + @override Widget build(BuildContext context) { - // Step 1: Collect all distinct values in each Set in a single loop final updatedTypes = {}; final updatedAreaTypes = {}; final updatedSupports = {}; @@ -71,7 +72,6 @@ class ActionsPageState extends State { }); } - // Step 2: Update state with collected data in a single setState() call setState(() { type.addAll(updatedTypes); areaType.addAll(updatedAreaTypes); @@ -79,7 +79,6 @@ class ActionsPageState extends State { months.addAll(updatedMonths); }); - // Step 3: Generate the list of action cards with matching filters final actionCards = massnahmen.map((massnahme) { final typeMatches = filterType == null || massnahme.actionGroup?.value == filterType; @@ -92,7 +91,6 @@ class ActionsPageState extends State { ?.any((aType) => aType.value == filterSupport) ?? false); - // Update visibility in a single batch setState() setState(() { visible[massnahme.id] = typeMatches && areaTypeMatches && supportMatches; @@ -101,21 +99,33 @@ class ActionsPageState extends State { return getCard(context, massnahme); }).toList(); - // Step 4: Return UI widget structure return Padding( padding: const EdgeInsets.symmetric(horizontal: 32), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Text( - context.translate('page.actions.title'), - style: Theme.of(context).textTheme.headlineLarge, + getSpacer(), + Center( + child: SearchBar( + leading: const Icon(Icons.search), + onChanged: (value) { + for (Measure massnahme in massnahmen) { + if (!massnahme.name!.contains(value)) { + logger.d('$value not in ${massnahme.name}'); + setState(() { + visible[massnahme.id] = false; + }); + } else { + logger.d('$value in ${massnahme.name}'); + setState(() { + visible[massnahme.id] = true; + }); + } + } + }, + ), ), getSpacer(), - Text( - context.translate('page.actions.intro'), - style: Theme.of(context).textTheme.titleLarge, - ), getSpacer(), Expanded( child: Row( @@ -210,7 +220,7 @@ class ActionsPageState extends State { for (int i = 1; i <= 12; i++) { monthsSorted - .add(FlutterI18n.translate(context, 'general.lists.months.$i')); + .add(FlutterI18n.translate(context, '_general.lists.months.$i')); } fields.add( @@ -231,12 +241,12 @@ class ActionsPageState extends State { Widget getCard(BuildContext context, Measure massnahme) { final Map actionGroupColors = { - 'Baulelemente': const Color(0xffFFD269), - 'Begrünung': const Color(0xff40DD74), - 'Bewirtschaftung': const Color(0xffBF72ED), - 'Nisthilfe': const Color(0xffDAE3FD), - 'Pflanzung': const Color(0xff40D6E9), - 'Sondermaßnahmen': const Color(0xff689EF1), + 'Baulelemente': const Color(0xffFFD269).withOpacity(.4), + 'Begrünung': const Color(0xff40DD74).withOpacity(.4), + 'Bewirtschaftung': const Color(0xffBF72ED).withOpacity(.4), + 'Nisthilfe': const Color(0xffDAE3FD).withOpacity(.4), + 'Pflanzung': const Color(0xff40D6E9).withOpacity(.4), + 'Sondermaßnahmen': const Color(0xff689EF1).withOpacity(.4), }; Color background = @@ -249,43 +259,65 @@ class ActionsPageState extends State { child: SizedBox( width: 800, child: Card( - color: background, - child: Padding( - padding: const EdgeInsets.all(32), - child: Row( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - (image != null) - ? image - : const SizedBox( - width: 300, - height: 140, - ), - const SizedBox( - width: 16, - ), - Expanded( - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text(massnahme.name!, - style: Theme.of(context).textTheme.headlineSmall), - const SizedBox( - height: 8, - ), - ExpandableText( - massnahme.factsheetDefinition ?? '', - maxLines: 3, - expandText: 'mehr', - collapseText: 'weniger', - ) - ], + elevation: 2, + color: Colors.white, + child: ClipPath( + clipper: ShapeBorderClipper( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(8), + ), + ), + child: Container( + decoration: BoxDecoration( + border: Border( + left: BorderSide( + color: background, + width: 15, ), - ) - ], + ), + ), + child: Padding( + padding: const EdgeInsets.all(32), + child: Row( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + (image != null) + ? image + : const SizedBox( + width: 300, + height: 140, + ), + const SizedBox( + width: 16, + ), + Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + massnahme.name!, + style: Theme.of(context).textTheme.headlineSmall, + ), + const SizedBox( + height: 8, + ), + ExpandableText( + style: Theme.of(context).textTheme.bodyLarge, + massnahme.factsheetDefinition ?? '', + maxLines: 4, + expandText: 'mehr', + collapseText: 'weniger', + ) + ], + ), + ) + ], + ), + ), ), ), + /*child: ,*/ ), ), ); diff --git a/lib/src/pages/start/start_page.dart b/lib/src/pages/start/start_page.dart index c7a1605..83e578f 100644 --- a/lib/src/pages/start/start_page.dart +++ b/lib/src/pages/start/start_page.dart @@ -27,28 +27,21 @@ class StartPageState extends State { Widget build(BuildContext context) { return Scaffold( appBar: AppBar( - leading: Row( - children: [ - const SizedBox( - width: 30, + automaticallyImplyLeading: false, + leading: Padding( + padding: const EdgeInsets.all(8), + child: Hero( + tag: 'logo', + child: Image.asset( + 'assets/images/logo_trans.png', ), - Hero( - tag: 'logo', - child: Image.asset( - 'assets/images/logo_trans.png', - width: 50, - height: 50, - ), - ), - const SizedBox( - width: 30, - ), - _linkButton('database'), - ], + ), ), - leadingWidth: 400, - toolbarHeight: 100, - backgroundColor: Colors.white, + leadingWidth: 80, + centerTitle: true, + title: _linkButton('database'), + toolbarHeight: 80, + backgroundColor: Colors.grey.withOpacity(.4), actions: [ IconButton(onPressed: () {}, icon: const Icon(Icons.person)), const SizedBox( @@ -75,12 +68,12 @@ class StartPageState extends State { } Widget _linkButton(String link) { - double fontSize = 24; + double fontSize = 20; return TextButton( style: ButtonStyle( overlayColor: WidgetStateProperty.resolveWith((Set states) { - return Colors.white; + return Colors.transparent; }), ), onPressed: () { @@ -93,9 +86,7 @@ class StartPageState extends State { style: TextStyle( fontSize: fontSize, fontWeight: FontWeight.bold, - color: (activeLink == link) - ? Colors.grey.shade400 - : Colors.grey.shade800, + color: (activeLink == link) ? Colors.grey.shade800 : Colors.black, ), ), ); diff --git a/lib/src/widgets/form/fields/field_daterangepicker.dart b/lib/src/widgets/form/fields/field_daterangepicker.dart index 961aac9..61f5c7f 100644 --- a/lib/src/widgets/form/fields/field_daterangepicker.dart +++ b/lib/src/widgets/form/fields/field_daterangepicker.dart @@ -19,6 +19,7 @@ class FieldDaterangepicker extends FormWidgetField { final void Function(String?) onSelected; final List entries; + @override FormBuilderField get() { DateTime now = DateTime.now(); diff --git a/lib/src/widgets/form/fields/field_dropdown.dart b/lib/src/widgets/form/fields/field_dropdown.dart index d6c8738..8ec763c 100644 --- a/lib/src/widgets/form/fields/field_dropdown.dart +++ b/lib/src/widgets/form/fields/field_dropdown.dart @@ -18,6 +18,7 @@ class FieldDropdown extends FormWidgetField { final void Function(String?) onSelected; final List entries; + @override FormBuilderField get() { return FormBuilderDropdown( name: name, diff --git a/lib/src/widgets/form/fields/field_monthsrangepicker.dart b/lib/src/widgets/form/fields/field_monthsrangepicker.dart index 19a0519..20b3c40 100644 --- a/lib/src/widgets/form/fields/field_monthsrangepicker.dart +++ b/lib/src/widgets/form/fields/field_monthsrangepicker.dart @@ -19,6 +19,7 @@ class FieldMonthsRangepicker extends FormWidgetField { final void Function(String?) onSelected; final List entries; + @override Widget get() { return SfDateRangePicker( minDate: DateTime(2024, 1),