Baumarten -> TreeType
This commit is contained in:
parent
263faa1756
commit
c4174a248d
9 changed files with 983 additions and 898 deletions
2
.env
2
.env
|
@ -1,2 +1,2 @@
|
||||||
BASEROW_TOKEN="TFxO7vzBLVRCu9I3VMoHmTuCvSu8aCDi"
|
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, "baumarten": 342622, "aenderungfactsheet": 330946}'
|
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}'
|
|
@ -28,11 +28,11 @@ void main() async {
|
||||||
const engine = kIsWeb ? IsarEngine.sqlite : IsarEngine.isar;
|
const engine = kIsWeb ? IsarEngine.sqlite : IsarEngine.isar;
|
||||||
isar = Isar.open(
|
isar = Isar.open(
|
||||||
schemas: [
|
schemas: [
|
||||||
BaumartenSchema,
|
|
||||||
FundingProgramSchema,
|
FundingProgramSchema,
|
||||||
MeasureSchema,
|
MeasureSchema,
|
||||||
MeasureCombinationSchema,
|
MeasureCombinationSchema,
|
||||||
OrganismSchema
|
OrganismSchema,
|
||||||
|
TreeTypeSchema,
|
||||||
],
|
],
|
||||||
directory: dir,
|
directory: dir,
|
||||||
engine: engine,
|
engine: engine,
|
||||||
|
@ -40,7 +40,7 @@ void main() async {
|
||||||
);
|
);
|
||||||
|
|
||||||
await Future.wait([
|
await Future.wait([
|
||||||
BaseApi().getContent('baumarten'),
|
BaseApi().getContent('tree_type'),
|
||||||
BaseApi().getContent('measure'),
|
BaseApi().getContent('measure'),
|
||||||
BaseApi().getContent('measure_combination'),
|
BaseApi().getContent('measure_combination'),
|
||||||
BaseApi().getContent('organism'),
|
BaseApi().getContent('organism'),
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
library ambito_entities;
|
library ambito_entities;
|
||||||
|
|
||||||
export 'base_entity.dart';
|
export 'base_entity.dart';
|
||||||
export 'baumarten/baumarten.dart';
|
|
||||||
export 'general/file/file_part.dart';
|
export 'general/file/file_part.dart';
|
||||||
export 'general/file/thumbnail.dart';
|
export 'general/file/thumbnail.dart';
|
||||||
export 'general/file/thumbnails.dart';
|
export 'general/file/thumbnails.dart';
|
||||||
|
@ -12,3 +11,4 @@ export 'general/month/month.dart';
|
||||||
export 'measure/measure.dart';
|
export 'measure/measure.dart';
|
||||||
export 'measure_combination/measure_combination.dart';
|
export 'measure_combination/measure_combination.dart';
|
||||||
export 'organism/organism.dart';
|
export 'organism/organism.dart';
|
||||||
|
export 'tree_type//tree_type.dart';
|
||||||
|
|
|
@ -31,7 +31,22 @@ const FundingProgramSchema = IsarGeneratedSchema(
|
||||||
),
|
),
|
||||||
IsarPropertySchema(
|
IsarPropertySchema(
|
||||||
name: 'calculationBase',
|
name: 'calculationBase',
|
||||||
type: IsarType.string,
|
type: IsarType.object,
|
||||||
|
target: 'IdValueColor',
|
||||||
|
),
|
||||||
|
IsarPropertySchema(
|
||||||
|
name: 'fundingFrequency',
|
||||||
|
type: IsarType.object,
|
||||||
|
target: 'IdValueColor',
|
||||||
|
),
|
||||||
|
IsarPropertySchema(
|
||||||
|
name: 'deminimis',
|
||||||
|
type: IsarType.bool,
|
||||||
|
),
|
||||||
|
IsarPropertySchema(
|
||||||
|
name: 'regions',
|
||||||
|
type: IsarType.objectList,
|
||||||
|
target: 'IdValueColor',
|
||||||
),
|
),
|
||||||
IsarPropertySchema(
|
IsarPropertySchema(
|
||||||
name: 'name',
|
name: 'name',
|
||||||
|
@ -54,7 +69,7 @@ const FundingProgramSchema = IsarGeneratedSchema(
|
||||||
deserialize: deserializeFundingProgram,
|
deserialize: deserializeFundingProgram,
|
||||||
deserializeProperty: deserializeFundingProgramProp,
|
deserializeProperty: deserializeFundingProgramProp,
|
||||||
),
|
),
|
||||||
embeddedSchemas: [IdValueSchema],
|
embeddedSchemas: [IdValueSchema, IdValueColorSchema],
|
||||||
);
|
);
|
||||||
|
|
||||||
@isarProtected
|
@isarProtected
|
||||||
|
@ -89,15 +104,52 @@ int serializeFundingProgram(IsarWriter writer, FundingProgram object) {
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
IsarCore.writeNull(writer, 3);
|
IsarCore.writeNull(writer, 3);
|
||||||
} else {
|
} else {
|
||||||
IsarCore.writeString(writer, 3, value);
|
final objectWriter = IsarCore.beginObject(writer, 3);
|
||||||
|
serializeIdValueColor(objectWriter, value);
|
||||||
|
IsarCore.endObject(writer, objectWriter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
final value = object.fundingFrequency;
|
||||||
|
if (value == null) {
|
||||||
|
IsarCore.writeNull(writer, 4);
|
||||||
|
} else {
|
||||||
|
final objectWriter = IsarCore.beginObject(writer, 4);
|
||||||
|
serializeIdValueColor(objectWriter, value);
|
||||||
|
IsarCore.endObject(writer, objectWriter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
final value = object.deminimis;
|
||||||
|
if (value == null) {
|
||||||
|
IsarCore.writeNull(writer, 5);
|
||||||
|
} else {
|
||||||
|
IsarCore.writeBool(writer, 5, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
final list = object.regions;
|
||||||
|
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 value = object.name;
|
final value = object.name;
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
IsarCore.writeNull(writer, 4);
|
IsarCore.writeNull(writer, 7);
|
||||||
} else {
|
} else {
|
||||||
IsarCore.writeString(writer, 4, value);
|
IsarCore.writeString(writer, 7, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return object.id;
|
return object.id;
|
||||||
|
@ -132,9 +184,61 @@ FundingProgram deserializeFundingProgram(IsarReader reader) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
object.fundingAmount = IsarCore.readString(reader, 2);
|
object.fundingAmount = IsarCore.readString(reader, 2);
|
||||||
object.calculationBase = IsarCore.readString(reader, 3);
|
{
|
||||||
|
final objectReader = IsarCore.readObject(reader, 3);
|
||||||
|
if (objectReader.isNull) {
|
||||||
|
object.calculationBase = null;
|
||||||
|
} else {
|
||||||
|
final embedded = deserializeIdValueColor(objectReader);
|
||||||
|
IsarCore.freeReader(objectReader);
|
||||||
|
object.calculationBase = embedded;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
final objectReader = IsarCore.readObject(reader, 4);
|
||||||
|
if (objectReader.isNull) {
|
||||||
|
object.fundingFrequency = null;
|
||||||
|
} else {
|
||||||
|
final embedded = deserializeIdValueColor(objectReader);
|
||||||
|
IsarCore.freeReader(objectReader);
|
||||||
|
object.fundingFrequency = embedded;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
if (IsarCore.readNull(reader, 5)) {
|
||||||
|
object.deminimis = null;
|
||||||
|
} else {
|
||||||
|
object.deminimis = IsarCore.readBool(reader, 5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{
|
||||||
|
final length = IsarCore.readList(reader, 6, IsarCore.readerPtrPtr);
|
||||||
|
{
|
||||||
|
final reader = IsarCore.readerPtr;
|
||||||
|
if (reader.isNull) {
|
||||||
|
object.regions = null;
|
||||||
|
} else {
|
||||||
|
final list =
|
||||||
|
List<IdValueColor>.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.regions = list;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
object.id = IsarCore.readId(reader);
|
object.id = IsarCore.readId(reader);
|
||||||
object.name = IsarCore.readString(reader, 4);
|
object.name = IsarCore.readString(reader, 7);
|
||||||
return object;
|
return object;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -171,11 +275,66 @@ dynamic deserializeFundingProgramProp(IsarReader reader, int property) {
|
||||||
case 2:
|
case 2:
|
||||||
return IsarCore.readString(reader, 2);
|
return IsarCore.readString(reader, 2);
|
||||||
case 3:
|
case 3:
|
||||||
return IsarCore.readString(reader, 3);
|
{
|
||||||
|
final objectReader = IsarCore.readObject(reader, 3);
|
||||||
|
if (objectReader.isNull) {
|
||||||
|
return null;
|
||||||
|
} else {
|
||||||
|
final embedded = deserializeIdValueColor(objectReader);
|
||||||
|
IsarCore.freeReader(objectReader);
|
||||||
|
return embedded;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 4:
|
||||||
|
{
|
||||||
|
final objectReader = IsarCore.readObject(reader, 4);
|
||||||
|
if (objectReader.isNull) {
|
||||||
|
return null;
|
||||||
|
} else {
|
||||||
|
final embedded = deserializeIdValueColor(objectReader);
|
||||||
|
IsarCore.freeReader(objectReader);
|
||||||
|
return embedded;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 5:
|
||||||
|
{
|
||||||
|
if (IsarCore.readNull(reader, 5)) {
|
||||||
|
return null;
|
||||||
|
} else {
|
||||||
|
return IsarCore.readBool(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<IdValueColor>.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:
|
case 0:
|
||||||
return IsarCore.readId(reader);
|
return IsarCore.readId(reader);
|
||||||
case 4:
|
case 7:
|
||||||
return IsarCore.readString(reader, 4);
|
return IsarCore.readString(reader, 7);
|
||||||
default:
|
default:
|
||||||
throw ArgumentError('Unknown property: $property');
|
throw ArgumentError('Unknown property: $property');
|
||||||
}
|
}
|
||||||
|
@ -185,7 +344,7 @@ sealed class _FundingProgramUpdate {
|
||||||
bool call({
|
bool call({
|
||||||
required int id,
|
required int id,
|
||||||
String? fundingAmount,
|
String? fundingAmount,
|
||||||
String? calculationBase,
|
bool? deminimis,
|
||||||
String? name,
|
String? name,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -199,15 +358,15 @@ class _FundingProgramUpdateImpl implements _FundingProgramUpdate {
|
||||||
bool call({
|
bool call({
|
||||||
required int id,
|
required int id,
|
||||||
Object? fundingAmount = ignore,
|
Object? fundingAmount = ignore,
|
||||||
Object? calculationBase = ignore,
|
Object? deminimis = ignore,
|
||||||
Object? name = ignore,
|
Object? name = ignore,
|
||||||
}) {
|
}) {
|
||||||
return collection.updateProperties([
|
return collection.updateProperties([
|
||||||
id
|
id
|
||||||
], {
|
], {
|
||||||
if (fundingAmount != ignore) 2: fundingAmount as String?,
|
if (fundingAmount != ignore) 2: fundingAmount as String?,
|
||||||
if (calculationBase != ignore) 3: calculationBase as String?,
|
if (deminimis != ignore) 5: deminimis as bool?,
|
||||||
if (name != ignore) 4: name as String?,
|
if (name != ignore) 7: name as String?,
|
||||||
}) >
|
}) >
|
||||||
0;
|
0;
|
||||||
}
|
}
|
||||||
|
@ -217,7 +376,7 @@ sealed class _FundingProgramUpdateAll {
|
||||||
int call({
|
int call({
|
||||||
required List<int> id,
|
required List<int> id,
|
||||||
String? fundingAmount,
|
String? fundingAmount,
|
||||||
String? calculationBase,
|
bool? deminimis,
|
||||||
String? name,
|
String? name,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -231,13 +390,13 @@ class _FundingProgramUpdateAllImpl implements _FundingProgramUpdateAll {
|
||||||
int call({
|
int call({
|
||||||
required List<int> id,
|
required List<int> id,
|
||||||
Object? fundingAmount = ignore,
|
Object? fundingAmount = ignore,
|
||||||
Object? calculationBase = ignore,
|
Object? deminimis = ignore,
|
||||||
Object? name = ignore,
|
Object? name = ignore,
|
||||||
}) {
|
}) {
|
||||||
return collection.updateProperties(id, {
|
return collection.updateProperties(id, {
|
||||||
if (fundingAmount != ignore) 2: fundingAmount as String?,
|
if (fundingAmount != ignore) 2: fundingAmount as String?,
|
||||||
if (calculationBase != ignore) 3: calculationBase as String?,
|
if (deminimis != ignore) 5: deminimis as bool?,
|
||||||
if (name != ignore) 4: name as String?,
|
if (name != ignore) 7: name as String?,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -251,7 +410,7 @@ extension FundingProgramUpdate on IsarCollection<int, FundingProgram> {
|
||||||
sealed class _FundingProgramQueryUpdate {
|
sealed class _FundingProgramQueryUpdate {
|
||||||
int call({
|
int call({
|
||||||
String? fundingAmount,
|
String? fundingAmount,
|
||||||
String? calculationBase,
|
bool? deminimis,
|
||||||
String? name,
|
String? name,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -265,13 +424,13 @@ class _FundingProgramQueryUpdateImpl implements _FundingProgramQueryUpdate {
|
||||||
@override
|
@override
|
||||||
int call({
|
int call({
|
||||||
Object? fundingAmount = ignore,
|
Object? fundingAmount = ignore,
|
||||||
Object? calculationBase = ignore,
|
Object? deminimis = ignore,
|
||||||
Object? name = ignore,
|
Object? name = ignore,
|
||||||
}) {
|
}) {
|
||||||
return query.updateProperties(limit: limit, {
|
return query.updateProperties(limit: limit, {
|
||||||
if (fundingAmount != ignore) 2: fundingAmount as String?,
|
if (fundingAmount != ignore) 2: fundingAmount as String?,
|
||||||
if (calculationBase != ignore) 3: calculationBase as String?,
|
if (deminimis != ignore) 5: deminimis as bool?,
|
||||||
if (name != ignore) 4: name as String?,
|
if (name != ignore) 7: name as String?,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -294,15 +453,15 @@ class _FundingProgramQueryBuilderUpdateImpl
|
||||||
@override
|
@override
|
||||||
int call({
|
int call({
|
||||||
Object? fundingAmount = ignore,
|
Object? fundingAmount = ignore,
|
||||||
Object? calculationBase = ignore,
|
Object? deminimis = ignore,
|
||||||
Object? name = ignore,
|
Object? name = ignore,
|
||||||
}) {
|
}) {
|
||||||
final q = query.build();
|
final q = query.build();
|
||||||
try {
|
try {
|
||||||
return q.updateProperties(limit: limit, {
|
return q.updateProperties(limit: limit, {
|
||||||
if (fundingAmount != ignore) 2: fundingAmount as String?,
|
if (fundingAmount != ignore) 2: fundingAmount as String?,
|
||||||
if (calculationBase != ignore) 3: calculationBase as String?,
|
if (deminimis != ignore) 5: deminimis as bool?,
|
||||||
if (name != ignore) 4: name as String?,
|
if (name != ignore) 7: name as String?,
|
||||||
});
|
});
|
||||||
} finally {
|
} finally {
|
||||||
q.close();
|
q.close();
|
||||||
|
@ -560,181 +719,73 @@ extension FundingProgramQueryFilter
|
||||||
}
|
}
|
||||||
|
|
||||||
QueryBuilder<FundingProgram, FundingProgram, QAfterFilterCondition>
|
QueryBuilder<FundingProgram, FundingProgram, QAfterFilterCondition>
|
||||||
calculationBaseEqualTo(
|
fundingFrequencyIsNull() {
|
||||||
String? value, {
|
return QueryBuilder.apply(this, (query) {
|
||||||
bool caseSensitive = true,
|
return query.addFilterCondition(const IsNullCondition(property: 4));
|
||||||
}) {
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
QueryBuilder<FundingProgram, FundingProgram, QAfterFilterCondition>
|
||||||
|
fundingFrequencyIsNotNull() {
|
||||||
|
return QueryBuilder.apply(not(), (query) {
|
||||||
|
return query.addFilterCondition(const IsNullCondition(property: 4));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
QueryBuilder<FundingProgram, FundingProgram, QAfterFilterCondition>
|
||||||
|
deminimisIsNull() {
|
||||||
|
return QueryBuilder.apply(this, (query) {
|
||||||
|
return query.addFilterCondition(const IsNullCondition(property: 5));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
QueryBuilder<FundingProgram, FundingProgram, QAfterFilterCondition>
|
||||||
|
deminimisIsNotNull() {
|
||||||
|
return QueryBuilder.apply(not(), (query) {
|
||||||
|
return query.addFilterCondition(const IsNullCondition(property: 5));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
QueryBuilder<FundingProgram, FundingProgram, QAfterFilterCondition>
|
||||||
|
deminimisEqualTo(
|
||||||
|
bool? value,
|
||||||
|
) {
|
||||||
return QueryBuilder.apply(this, (query) {
|
return QueryBuilder.apply(this, (query) {
|
||||||
return query.addFilterCondition(
|
return query.addFilterCondition(
|
||||||
EqualCondition(
|
EqualCondition(
|
||||||
property: 3,
|
property: 5,
|
||||||
value: value,
|
value: value,
|
||||||
caseSensitive: caseSensitive,
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
QueryBuilder<FundingProgram, FundingProgram, QAfterFilterCondition>
|
QueryBuilder<FundingProgram, FundingProgram, QAfterFilterCondition>
|
||||||
calculationBaseGreaterThan(
|
regionsIsNull() {
|
||||||
String? value, {
|
|
||||||
bool caseSensitive = true,
|
|
||||||
}) {
|
|
||||||
return QueryBuilder.apply(this, (query) {
|
return QueryBuilder.apply(this, (query) {
|
||||||
return query.addFilterCondition(
|
return query.addFilterCondition(const IsNullCondition(property: 6));
|
||||||
GreaterCondition(
|
|
||||||
property: 3,
|
|
||||||
value: value,
|
|
||||||
caseSensitive: caseSensitive,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
QueryBuilder<FundingProgram, FundingProgram, QAfterFilterCondition>
|
QueryBuilder<FundingProgram, FundingProgram, QAfterFilterCondition>
|
||||||
calculationBaseGreaterThanOrEqualTo(
|
regionsIsNotNull() {
|
||||||
String? value, {
|
return QueryBuilder.apply(not(), (query) {
|
||||||
bool caseSensitive = true,
|
return query.addFilterCondition(const IsNullCondition(property: 6));
|
||||||
}) {
|
|
||||||
return QueryBuilder.apply(this, (query) {
|
|
||||||
return query.addFilterCondition(
|
|
||||||
GreaterOrEqualCondition(
|
|
||||||
property: 3,
|
|
||||||
value: value,
|
|
||||||
caseSensitive: caseSensitive,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
QueryBuilder<FundingProgram, FundingProgram, QAfterFilterCondition>
|
QueryBuilder<FundingProgram, FundingProgram, QAfterFilterCondition>
|
||||||
calculationBaseLessThan(
|
regionsIsEmpty() {
|
||||||
String? value, {
|
return not().group(
|
||||||
bool caseSensitive = true,
|
(q) => q.regionsIsNull().or().regionsIsNotEmpty(),
|
||||||
}) {
|
);
|
||||||
return QueryBuilder.apply(this, (query) {
|
|
||||||
return query.addFilterCondition(
|
|
||||||
LessCondition(
|
|
||||||
property: 3,
|
|
||||||
value: value,
|
|
||||||
caseSensitive: caseSensitive,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QueryBuilder<FundingProgram, FundingProgram, QAfterFilterCondition>
|
QueryBuilder<FundingProgram, FundingProgram, QAfterFilterCondition>
|
||||||
calculationBaseLessThanOrEqualTo(
|
regionsIsNotEmpty() {
|
||||||
String? value, {
|
|
||||||
bool caseSensitive = true,
|
|
||||||
}) {
|
|
||||||
return QueryBuilder.apply(this, (query) {
|
return QueryBuilder.apply(this, (query) {
|
||||||
return query.addFilterCondition(
|
return query.addFilterCondition(
|
||||||
LessOrEqualCondition(
|
const GreaterOrEqualCondition(property: 6, value: null),
|
||||||
property: 3,
|
|
||||||
value: value,
|
|
||||||
caseSensitive: caseSensitive,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
QueryBuilder<FundingProgram, FundingProgram, QAfterFilterCondition>
|
|
||||||
calculationBaseBetween(
|
|
||||||
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<FundingProgram, FundingProgram, QAfterFilterCondition>
|
|
||||||
calculationBaseStartsWith(
|
|
||||||
String value, {
|
|
||||||
bool caseSensitive = true,
|
|
||||||
}) {
|
|
||||||
return QueryBuilder.apply(this, (query) {
|
|
||||||
return query.addFilterCondition(
|
|
||||||
StartsWithCondition(
|
|
||||||
property: 3,
|
|
||||||
value: value,
|
|
||||||
caseSensitive: caseSensitive,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
QueryBuilder<FundingProgram, FundingProgram, QAfterFilterCondition>
|
|
||||||
calculationBaseEndsWith(
|
|
||||||
String value, {
|
|
||||||
bool caseSensitive = true,
|
|
||||||
}) {
|
|
||||||
return QueryBuilder.apply(this, (query) {
|
|
||||||
return query.addFilterCondition(
|
|
||||||
EndsWithCondition(
|
|
||||||
property: 3,
|
|
||||||
value: value,
|
|
||||||
caseSensitive: caseSensitive,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
QueryBuilder<FundingProgram, FundingProgram, QAfterFilterCondition>
|
|
||||||
calculationBaseContains(String value, {bool caseSensitive = true}) {
|
|
||||||
return QueryBuilder.apply(this, (query) {
|
|
||||||
return query.addFilterCondition(
|
|
||||||
ContainsCondition(
|
|
||||||
property: 3,
|
|
||||||
value: value,
|
|
||||||
caseSensitive: caseSensitive,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
QueryBuilder<FundingProgram, FundingProgram, QAfterFilterCondition>
|
|
||||||
calculationBaseMatches(String pattern, {bool caseSensitive = true}) {
|
|
||||||
return QueryBuilder.apply(this, (query) {
|
|
||||||
return query.addFilterCondition(
|
|
||||||
MatchesCondition(
|
|
||||||
property: 3,
|
|
||||||
wildcard: pattern,
|
|
||||||
caseSensitive: caseSensitive,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
QueryBuilder<FundingProgram, FundingProgram, QAfterFilterCondition>
|
|
||||||
calculationBaseIsEmpty() {
|
|
||||||
return QueryBuilder.apply(this, (query) {
|
|
||||||
return query.addFilterCondition(
|
|
||||||
const EqualCondition(
|
|
||||||
property: 3,
|
|
||||||
value: '',
|
|
||||||
),
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
QueryBuilder<FundingProgram, FundingProgram, QAfterFilterCondition>
|
|
||||||
calculationBaseIsNotEmpty() {
|
|
||||||
return QueryBuilder.apply(this, (query) {
|
|
||||||
return query.addFilterCondition(
|
|
||||||
const GreaterCondition(
|
|
||||||
property: 3,
|
|
||||||
value: '',
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -826,14 +877,14 @@ extension FundingProgramQueryFilter
|
||||||
QueryBuilder<FundingProgram, FundingProgram, QAfterFilterCondition>
|
QueryBuilder<FundingProgram, FundingProgram, QAfterFilterCondition>
|
||||||
nameIsNull() {
|
nameIsNull() {
|
||||||
return QueryBuilder.apply(this, (query) {
|
return QueryBuilder.apply(this, (query) {
|
||||||
return query.addFilterCondition(const IsNullCondition(property: 4));
|
return query.addFilterCondition(const IsNullCondition(property: 7));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
QueryBuilder<FundingProgram, FundingProgram, QAfterFilterCondition>
|
QueryBuilder<FundingProgram, FundingProgram, QAfterFilterCondition>
|
||||||
nameIsNotNull() {
|
nameIsNotNull() {
|
||||||
return QueryBuilder.apply(not(), (query) {
|
return QueryBuilder.apply(not(), (query) {
|
||||||
return query.addFilterCondition(const IsNullCondition(property: 4));
|
return query.addFilterCondition(const IsNullCondition(property: 7));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -845,7 +896,7 @@ extension FundingProgramQueryFilter
|
||||||
return QueryBuilder.apply(this, (query) {
|
return QueryBuilder.apply(this, (query) {
|
||||||
return query.addFilterCondition(
|
return query.addFilterCondition(
|
||||||
EqualCondition(
|
EqualCondition(
|
||||||
property: 4,
|
property: 7,
|
||||||
value: value,
|
value: value,
|
||||||
caseSensitive: caseSensitive,
|
caseSensitive: caseSensitive,
|
||||||
),
|
),
|
||||||
|
@ -861,7 +912,7 @@ extension FundingProgramQueryFilter
|
||||||
return QueryBuilder.apply(this, (query) {
|
return QueryBuilder.apply(this, (query) {
|
||||||
return query.addFilterCondition(
|
return query.addFilterCondition(
|
||||||
GreaterCondition(
|
GreaterCondition(
|
||||||
property: 4,
|
property: 7,
|
||||||
value: value,
|
value: value,
|
||||||
caseSensitive: caseSensitive,
|
caseSensitive: caseSensitive,
|
||||||
),
|
),
|
||||||
|
@ -877,7 +928,7 @@ extension FundingProgramQueryFilter
|
||||||
return QueryBuilder.apply(this, (query) {
|
return QueryBuilder.apply(this, (query) {
|
||||||
return query.addFilterCondition(
|
return query.addFilterCondition(
|
||||||
GreaterOrEqualCondition(
|
GreaterOrEqualCondition(
|
||||||
property: 4,
|
property: 7,
|
||||||
value: value,
|
value: value,
|
||||||
caseSensitive: caseSensitive,
|
caseSensitive: caseSensitive,
|
||||||
),
|
),
|
||||||
|
@ -893,7 +944,7 @@ extension FundingProgramQueryFilter
|
||||||
return QueryBuilder.apply(this, (query) {
|
return QueryBuilder.apply(this, (query) {
|
||||||
return query.addFilterCondition(
|
return query.addFilterCondition(
|
||||||
LessCondition(
|
LessCondition(
|
||||||
property: 4,
|
property: 7,
|
||||||
value: value,
|
value: value,
|
||||||
caseSensitive: caseSensitive,
|
caseSensitive: caseSensitive,
|
||||||
),
|
),
|
||||||
|
@ -909,7 +960,7 @@ extension FundingProgramQueryFilter
|
||||||
return QueryBuilder.apply(this, (query) {
|
return QueryBuilder.apply(this, (query) {
|
||||||
return query.addFilterCondition(
|
return query.addFilterCondition(
|
||||||
LessOrEqualCondition(
|
LessOrEqualCondition(
|
||||||
property: 4,
|
property: 7,
|
||||||
value: value,
|
value: value,
|
||||||
caseSensitive: caseSensitive,
|
caseSensitive: caseSensitive,
|
||||||
),
|
),
|
||||||
|
@ -926,7 +977,7 @@ extension FundingProgramQueryFilter
|
||||||
return QueryBuilder.apply(this, (query) {
|
return QueryBuilder.apply(this, (query) {
|
||||||
return query.addFilterCondition(
|
return query.addFilterCondition(
|
||||||
BetweenCondition(
|
BetweenCondition(
|
||||||
property: 4,
|
property: 7,
|
||||||
lower: lower,
|
lower: lower,
|
||||||
upper: upper,
|
upper: upper,
|
||||||
caseSensitive: caseSensitive,
|
caseSensitive: caseSensitive,
|
||||||
|
@ -943,7 +994,7 @@ extension FundingProgramQueryFilter
|
||||||
return QueryBuilder.apply(this, (query) {
|
return QueryBuilder.apply(this, (query) {
|
||||||
return query.addFilterCondition(
|
return query.addFilterCondition(
|
||||||
StartsWithCondition(
|
StartsWithCondition(
|
||||||
property: 4,
|
property: 7,
|
||||||
value: value,
|
value: value,
|
||||||
caseSensitive: caseSensitive,
|
caseSensitive: caseSensitive,
|
||||||
),
|
),
|
||||||
|
@ -959,7 +1010,7 @@ extension FundingProgramQueryFilter
|
||||||
return QueryBuilder.apply(this, (query) {
|
return QueryBuilder.apply(this, (query) {
|
||||||
return query.addFilterCondition(
|
return query.addFilterCondition(
|
||||||
EndsWithCondition(
|
EndsWithCondition(
|
||||||
property: 4,
|
property: 7,
|
||||||
value: value,
|
value: value,
|
||||||
caseSensitive: caseSensitive,
|
caseSensitive: caseSensitive,
|
||||||
),
|
),
|
||||||
|
@ -972,7 +1023,7 @@ extension FundingProgramQueryFilter
|
||||||
return QueryBuilder.apply(this, (query) {
|
return QueryBuilder.apply(this, (query) {
|
||||||
return query.addFilterCondition(
|
return query.addFilterCondition(
|
||||||
ContainsCondition(
|
ContainsCondition(
|
||||||
property: 4,
|
property: 7,
|
||||||
value: value,
|
value: value,
|
||||||
caseSensitive: caseSensitive,
|
caseSensitive: caseSensitive,
|
||||||
),
|
),
|
||||||
|
@ -985,7 +1036,7 @@ extension FundingProgramQueryFilter
|
||||||
return QueryBuilder.apply(this, (query) {
|
return QueryBuilder.apply(this, (query) {
|
||||||
return query.addFilterCondition(
|
return query.addFilterCondition(
|
||||||
MatchesCondition(
|
MatchesCondition(
|
||||||
property: 4,
|
property: 7,
|
||||||
wildcard: pattern,
|
wildcard: pattern,
|
||||||
caseSensitive: caseSensitive,
|
caseSensitive: caseSensitive,
|
||||||
),
|
),
|
||||||
|
@ -998,7 +1049,7 @@ extension FundingProgramQueryFilter
|
||||||
return QueryBuilder.apply(this, (query) {
|
return QueryBuilder.apply(this, (query) {
|
||||||
return query.addFilterCondition(
|
return query.addFilterCondition(
|
||||||
const EqualCondition(
|
const EqualCondition(
|
||||||
property: 4,
|
property: 7,
|
||||||
value: '',
|
value: '',
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -1010,7 +1061,7 @@ extension FundingProgramQueryFilter
|
||||||
return QueryBuilder.apply(this, (query) {
|
return QueryBuilder.apply(this, (query) {
|
||||||
return query.addFilterCondition(
|
return query.addFilterCondition(
|
||||||
const GreaterCondition(
|
const GreaterCondition(
|
||||||
property: 4,
|
property: 7,
|
||||||
value: '',
|
value: '',
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -1019,7 +1070,21 @@ extension FundingProgramQueryFilter
|
||||||
}
|
}
|
||||||
|
|
||||||
extension FundingProgramQueryObject
|
extension FundingProgramQueryObject
|
||||||
on QueryBuilder<FundingProgram, FundingProgram, QFilterCondition> {}
|
on QueryBuilder<FundingProgram, FundingProgram, QFilterCondition> {
|
||||||
|
QueryBuilder<FundingProgram, FundingProgram, QAfterFilterCondition>
|
||||||
|
calculationBase(FilterQuery<IdValueColor> q) {
|
||||||
|
return QueryBuilder.apply(this, (query) {
|
||||||
|
return query.object(q, 3);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
QueryBuilder<FundingProgram, FundingProgram, QAfterFilterCondition>
|
||||||
|
fundingFrequency(FilterQuery<IdValueColor> q) {
|
||||||
|
return QueryBuilder.apply(this, (query) {
|
||||||
|
return query.object(q, 4);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
extension FundingProgramQuerySortBy
|
extension FundingProgramQuerySortBy
|
||||||
on QueryBuilder<FundingProgram, FundingProgram, QSortBy> {
|
on QueryBuilder<FundingProgram, FundingProgram, QSortBy> {
|
||||||
|
@ -1044,24 +1109,16 @@ extension FundingProgramQuerySortBy
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
QueryBuilder<FundingProgram, FundingProgram, QAfterSortBy>
|
QueryBuilder<FundingProgram, FundingProgram, QAfterSortBy> sortByDeminimis() {
|
||||||
sortByCalculationBase({bool caseSensitive = true}) {
|
|
||||||
return QueryBuilder.apply(this, (query) {
|
return QueryBuilder.apply(this, (query) {
|
||||||
return query.addSortBy(
|
return query.addSortBy(5);
|
||||||
3,
|
|
||||||
caseSensitive: caseSensitive,
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
QueryBuilder<FundingProgram, FundingProgram, QAfterSortBy>
|
QueryBuilder<FundingProgram, FundingProgram, QAfterSortBy>
|
||||||
sortByCalculationBaseDesc({bool caseSensitive = true}) {
|
sortByDeminimisDesc() {
|
||||||
return QueryBuilder.apply(this, (query) {
|
return QueryBuilder.apply(this, (query) {
|
||||||
return query.addSortBy(
|
return query.addSortBy(5, sort: Sort.desc);
|
||||||
3,
|
|
||||||
sort: Sort.desc,
|
|
||||||
caseSensitive: caseSensitive,
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1081,7 +1138,7 @@ extension FundingProgramQuerySortBy
|
||||||
{bool caseSensitive = true}) {
|
{bool caseSensitive = true}) {
|
||||||
return QueryBuilder.apply(this, (query) {
|
return QueryBuilder.apply(this, (query) {
|
||||||
return query.addSortBy(
|
return query.addSortBy(
|
||||||
4,
|
7,
|
||||||
caseSensitive: caseSensitive,
|
caseSensitive: caseSensitive,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
@ -1091,7 +1148,7 @@ extension FundingProgramQuerySortBy
|
||||||
{bool caseSensitive = true}) {
|
{bool caseSensitive = true}) {
|
||||||
return QueryBuilder.apply(this, (query) {
|
return QueryBuilder.apply(this, (query) {
|
||||||
return query.addSortBy(
|
return query.addSortBy(
|
||||||
4,
|
7,
|
||||||
sort: Sort.desc,
|
sort: Sort.desc,
|
||||||
caseSensitive: caseSensitive,
|
caseSensitive: caseSensitive,
|
||||||
);
|
);
|
||||||
|
@ -1115,17 +1172,16 @@ extension FundingProgramQuerySortThenBy
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
QueryBuilder<FundingProgram, FundingProgram, QAfterSortBy>
|
QueryBuilder<FundingProgram, FundingProgram, QAfterSortBy> thenByDeminimis() {
|
||||||
thenByCalculationBase({bool caseSensitive = true}) {
|
|
||||||
return QueryBuilder.apply(this, (query) {
|
return QueryBuilder.apply(this, (query) {
|
||||||
return query.addSortBy(3, caseSensitive: caseSensitive);
|
return query.addSortBy(5);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
QueryBuilder<FundingProgram, FundingProgram, QAfterSortBy>
|
QueryBuilder<FundingProgram, FundingProgram, QAfterSortBy>
|
||||||
thenByCalculationBaseDesc({bool caseSensitive = true}) {
|
thenByDeminimisDesc() {
|
||||||
return QueryBuilder.apply(this, (query) {
|
return QueryBuilder.apply(this, (query) {
|
||||||
return query.addSortBy(3, sort: Sort.desc, caseSensitive: caseSensitive);
|
return query.addSortBy(5, sort: Sort.desc);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1144,14 +1200,14 @@ extension FundingProgramQuerySortThenBy
|
||||||
QueryBuilder<FundingProgram, FundingProgram, QAfterSortBy> thenByName(
|
QueryBuilder<FundingProgram, FundingProgram, QAfterSortBy> thenByName(
|
||||||
{bool caseSensitive = true}) {
|
{bool caseSensitive = true}) {
|
||||||
return QueryBuilder.apply(this, (query) {
|
return QueryBuilder.apply(this, (query) {
|
||||||
return query.addSortBy(4, caseSensitive: caseSensitive);
|
return query.addSortBy(7, caseSensitive: caseSensitive);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
QueryBuilder<FundingProgram, FundingProgram, QAfterSortBy> thenByNameDesc(
|
QueryBuilder<FundingProgram, FundingProgram, QAfterSortBy> thenByNameDesc(
|
||||||
{bool caseSensitive = true}) {
|
{bool caseSensitive = true}) {
|
||||||
return QueryBuilder.apply(this, (query) {
|
return QueryBuilder.apply(this, (query) {
|
||||||
return query.addSortBy(4, sort: Sort.desc, caseSensitive: caseSensitive);
|
return query.addSortBy(7, sort: Sort.desc, caseSensitive: caseSensitive);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1166,16 +1222,16 @@ extension FundingProgramQueryWhereDistinct
|
||||||
}
|
}
|
||||||
|
|
||||||
QueryBuilder<FundingProgram, FundingProgram, QAfterDistinct>
|
QueryBuilder<FundingProgram, FundingProgram, QAfterDistinct>
|
||||||
distinctByCalculationBase({bool caseSensitive = true}) {
|
distinctByDeminimis() {
|
||||||
return QueryBuilder.apply(this, (query) {
|
return QueryBuilder.apply(this, (query) {
|
||||||
return query.addDistinctBy(3, caseSensitive: caseSensitive);
|
return query.addDistinctBy(5);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
QueryBuilder<FundingProgram, FundingProgram, QAfterDistinct> distinctByName(
|
QueryBuilder<FundingProgram, FundingProgram, QAfterDistinct> distinctByName(
|
||||||
{bool caseSensitive = true}) {
|
{bool caseSensitive = true}) {
|
||||||
return QueryBuilder.apply(this, (query) {
|
return QueryBuilder.apply(this, (query) {
|
||||||
return query.addDistinctBy(4, caseSensitive: caseSensitive);
|
return query.addDistinctBy(7, caseSensitive: caseSensitive);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1196,13 +1252,33 @@ extension FundingProgramQueryProperty1
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
QueryBuilder<FundingProgram, String?, QAfterProperty>
|
QueryBuilder<FundingProgram, IdValueColor?, QAfterProperty>
|
||||||
calculationBaseProperty() {
|
calculationBaseProperty() {
|
||||||
return QueryBuilder.apply(this, (query) {
|
return QueryBuilder.apply(this, (query) {
|
||||||
return query.addProperty(3);
|
return query.addProperty(3);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QueryBuilder<FundingProgram, IdValueColor?, QAfterProperty>
|
||||||
|
fundingFrequencyProperty() {
|
||||||
|
return QueryBuilder.apply(this, (query) {
|
||||||
|
return query.addProperty(4);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
QueryBuilder<FundingProgram, bool?, QAfterProperty> deminimisProperty() {
|
||||||
|
return QueryBuilder.apply(this, (query) {
|
||||||
|
return query.addProperty(5);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
QueryBuilder<FundingProgram, List<IdValueColor>?, QAfterProperty>
|
||||||
|
regionsProperty() {
|
||||||
|
return QueryBuilder.apply(this, (query) {
|
||||||
|
return query.addProperty(6);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
QueryBuilder<FundingProgram, int, QAfterProperty> idProperty() {
|
QueryBuilder<FundingProgram, int, QAfterProperty> idProperty() {
|
||||||
return QueryBuilder.apply(this, (query) {
|
return QueryBuilder.apply(this, (query) {
|
||||||
return query.addProperty(0);
|
return query.addProperty(0);
|
||||||
|
@ -1211,7 +1287,7 @@ extension FundingProgramQueryProperty1
|
||||||
|
|
||||||
QueryBuilder<FundingProgram, String?, QAfterProperty> nameProperty() {
|
QueryBuilder<FundingProgram, String?, QAfterProperty> nameProperty() {
|
||||||
return QueryBuilder.apply(this, (query) {
|
return QueryBuilder.apply(this, (query) {
|
||||||
return query.addProperty(4);
|
return query.addProperty(7);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1232,13 +1308,33 @@ extension FundingProgramQueryProperty2<R>
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
QueryBuilder<FundingProgram, (R, String?), QAfterProperty>
|
QueryBuilder<FundingProgram, (R, IdValueColor?), QAfterProperty>
|
||||||
calculationBaseProperty() {
|
calculationBaseProperty() {
|
||||||
return QueryBuilder.apply(this, (query) {
|
return QueryBuilder.apply(this, (query) {
|
||||||
return query.addProperty(3);
|
return query.addProperty(3);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QueryBuilder<FundingProgram, (R, IdValueColor?), QAfterProperty>
|
||||||
|
fundingFrequencyProperty() {
|
||||||
|
return QueryBuilder.apply(this, (query) {
|
||||||
|
return query.addProperty(4);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
QueryBuilder<FundingProgram, (R, bool?), QAfterProperty> deminimisProperty() {
|
||||||
|
return QueryBuilder.apply(this, (query) {
|
||||||
|
return query.addProperty(5);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
QueryBuilder<FundingProgram, (R, List<IdValueColor>?), QAfterProperty>
|
||||||
|
regionsProperty() {
|
||||||
|
return QueryBuilder.apply(this, (query) {
|
||||||
|
return query.addProperty(6);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
QueryBuilder<FundingProgram, (R, int), QAfterProperty> idProperty() {
|
QueryBuilder<FundingProgram, (R, int), QAfterProperty> idProperty() {
|
||||||
return QueryBuilder.apply(this, (query) {
|
return QueryBuilder.apply(this, (query) {
|
||||||
return query.addProperty(0);
|
return query.addProperty(0);
|
||||||
|
@ -1247,7 +1343,7 @@ extension FundingProgramQueryProperty2<R>
|
||||||
|
|
||||||
QueryBuilder<FundingProgram, (R, String?), QAfterProperty> nameProperty() {
|
QueryBuilder<FundingProgram, (R, String?), QAfterProperty> nameProperty() {
|
||||||
return QueryBuilder.apply(this, (query) {
|
return QueryBuilder.apply(this, (query) {
|
||||||
return query.addProperty(4);
|
return query.addProperty(7);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1268,13 +1364,34 @@ extension FundingProgramQueryProperty3<R1, R2>
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
QueryBuilder<FundingProgram, (R1, R2, String?), QOperations>
|
QueryBuilder<FundingProgram, (R1, R2, IdValueColor?), QOperations>
|
||||||
calculationBaseProperty() {
|
calculationBaseProperty() {
|
||||||
return QueryBuilder.apply(this, (query) {
|
return QueryBuilder.apply(this, (query) {
|
||||||
return query.addProperty(3);
|
return query.addProperty(3);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QueryBuilder<FundingProgram, (R1, R2, IdValueColor?), QOperations>
|
||||||
|
fundingFrequencyProperty() {
|
||||||
|
return QueryBuilder.apply(this, (query) {
|
||||||
|
return query.addProperty(4);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
QueryBuilder<FundingProgram, (R1, R2, bool?), QOperations>
|
||||||
|
deminimisProperty() {
|
||||||
|
return QueryBuilder.apply(this, (query) {
|
||||||
|
return query.addProperty(5);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
QueryBuilder<FundingProgram, (R1, R2, List<IdValueColor>?), QOperations>
|
||||||
|
regionsProperty() {
|
||||||
|
return QueryBuilder.apply(this, (query) {
|
||||||
|
return query.addProperty(6);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
QueryBuilder<FundingProgram, (R1, R2, int), QOperations> idProperty() {
|
QueryBuilder<FundingProgram, (R1, R2, int), QOperations> idProperty() {
|
||||||
return QueryBuilder.apply(this, (query) {
|
return QueryBuilder.apply(this, (query) {
|
||||||
return query.addProperty(0);
|
return query.addProperty(0);
|
||||||
|
@ -1283,7 +1400,7 @@ extension FundingProgramQueryProperty3<R1, R2>
|
||||||
|
|
||||||
QueryBuilder<FundingProgram, (R1, R2, String?), QOperations> nameProperty() {
|
QueryBuilder<FundingProgram, (R1, R2, String?), QOperations> nameProperty() {
|
||||||
return QueryBuilder.apply(this, (query) {
|
return QueryBuilder.apply(this, (query) {
|
||||||
return query.addProperty(4);
|
return query.addProperty(7);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1300,7 +1417,18 @@ FundingProgram _$FundingProgramFromJson(Map<String, dynamic> json) =>
|
||||||
?.map((e) => IdValue.fromJson(e as Map<String, dynamic>))
|
?.map((e) => IdValue.fromJson(e as Map<String, dynamic>))
|
||||||
.toList()
|
.toList()
|
||||||
..fundingAmount = json['Höhe der Förderung'] as String?
|
..fundingAmount = json['Höhe der Förderung'] as String?
|
||||||
..calculationBase = json['Berechnungsgrundlage'] as String?;
|
..calculationBase = json['Berechnungsgrundlage'] == null
|
||||||
|
? null
|
||||||
|
: IdValueColor.fromJson(
|
||||||
|
json['Berechnungsgrundlage'] as Map<String, dynamic>)
|
||||||
|
..fundingFrequency = json['Förderfrequenz'] == null
|
||||||
|
? null
|
||||||
|
: IdValueColor.fromJson(
|
||||||
|
json['Förderfrequenz'] as Map<String, dynamic>)
|
||||||
|
..deminimis = json['De-Minimis-Pflichtig'] as bool?
|
||||||
|
..regions = (json['Region/Bundesland'] as List<dynamic>?)
|
||||||
|
?.map((e) => IdValueColor.fromJson(e as Map<String, dynamic>))
|
||||||
|
.toList();
|
||||||
|
|
||||||
Map<String, dynamic> _$FundingProgramToJson(FundingProgram instance) =>
|
Map<String, dynamic> _$FundingProgramToJson(FundingProgram instance) =>
|
||||||
<String, dynamic>{
|
<String, dynamic>{
|
||||||
|
@ -1308,5 +1436,8 @@ Map<String, dynamic> _$FundingProgramToJson(FundingProgram instance) =>
|
||||||
'Name': instance.name,
|
'Name': instance.name,
|
||||||
'Maßnahmen_Main': instance.measures?.map((e) => e.toJson()).toList(),
|
'Maßnahmen_Main': instance.measures?.map((e) => e.toJson()).toList(),
|
||||||
'Höhe der Förderung': instance.fundingAmount,
|
'Höhe der Förderung': instance.fundingAmount,
|
||||||
'Berechnungsgrundlage': instance.calculationBase,
|
'Berechnungsgrundlage': instance.calculationBase?.toJson(),
|
||||||
|
'Förderfrequenz': instance.fundingFrequency?.toJson(),
|
||||||
|
'De-Minimis-Pflichtig': instance.deminimis,
|
||||||
|
'Region/Bundesland': instance.regions?.map((e) => e.toJson()).toList(),
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,12 +2,12 @@ import 'package:ambito/src/domain/entity/entities.dart';
|
||||||
import 'package:isar/isar.dart';
|
import 'package:isar/isar.dart';
|
||||||
import 'package:json_annotation/json_annotation.dart';
|
import 'package:json_annotation/json_annotation.dart';
|
||||||
|
|
||||||
part 'baumarten.g.dart';
|
part 'tree_type.g.dart';
|
||||||
|
|
||||||
@JsonSerializable(explicitToJson: true)
|
@JsonSerializable(explicitToJson: true)
|
||||||
@collection
|
@collection
|
||||||
class Baumarten extends BaseEntity with EntityWithId {
|
class TreeType extends BaseEntity with EntityWithId {
|
||||||
Baumarten();
|
TreeType();
|
||||||
|
|
||||||
@JsonKey(name: 'order')
|
@JsonKey(name: 'order')
|
||||||
String? orderString;
|
String? orderString;
|
||||||
|
@ -74,8 +74,8 @@ class Baumarten extends BaseEntity with EntityWithId {
|
||||||
@JsonKey(name: 'Heimisch')
|
@JsonKey(name: 'Heimisch')
|
||||||
bool? local;
|
bool? local;
|
||||||
|
|
||||||
factory Baumarten.fromJson(Map<String, dynamic> json) =>
|
factory TreeType.fromJson(Map<String, dynamic> json) =>
|
||||||
_$BaumartenFromJson(json);
|
_$TreeTypeFromJson(json);
|
||||||
|
|
||||||
Map<String, dynamic> toJson() => _$BaumartenToJson(this);
|
Map<String, dynamic> toJson() => _$TreeTypeToJson(this);
|
||||||
}
|
}
|
File diff suppressed because it is too large
Load diff
|
@ -24,9 +24,9 @@ class BaseApi {
|
||||||
if (response.statusCode == 200) {
|
if (response.statusCode == 200) {
|
||||||
var json = _jsonDecoded(response.body);
|
var json = _jsonDecoded(response.body);
|
||||||
switch (table) {
|
switch (table) {
|
||||||
case 'baumarten':
|
case 'tree_type':
|
||||||
for (var baumart in json['results']) {
|
for (var treeType in json['results']) {
|
||||||
BaumartenRepository().put(Baumarten.fromJson(baumart));
|
TreeTypeRepository().put(TreeType.fromJson(treeType));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'measure':
|
case 'measure':
|
||||||
|
@ -35,9 +35,9 @@ class BaseApi {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'measure_combination':
|
case 'measure_combination':
|
||||||
for (var measure_combination in json['results']) {
|
for (var measureCombination in json['results']) {
|
||||||
MeasureCombinationRepository()
|
MeasureCombinationRepository()
|
||||||
.put(MeasureCombination.fromJson(measure_combination));
|
.put(MeasureCombination.fromJson(measureCombination));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 'organism':
|
case 'organism':
|
||||||
|
|
|
@ -3,10 +3,10 @@ import 'package:isar/isar.dart';
|
||||||
|
|
||||||
import '../../../main.dart';
|
import '../../../main.dart';
|
||||||
|
|
||||||
export 'repositories/baumarten_repository.dart';
|
|
||||||
export 'repositories/measure_combination_repository.dart';
|
export 'repositories/measure_combination_repository.dart';
|
||||||
export 'repositories/measure_repository.dart';
|
export 'repositories/measure_repository.dart';
|
||||||
export 'repositories/organism_repository.dart';
|
export 'repositories/organism_repository.dart';
|
||||||
|
export 'repositories/tree_type_repository.dart';
|
||||||
|
|
||||||
abstract class BaseDB {
|
abstract class BaseDB {
|
||||||
abstract IsarCollection collection;
|
abstract IsarCollection collection;
|
||||||
|
|
|
@ -4,6 +4,6 @@ import 'package:isar/isar.dart';
|
||||||
import '../../../../main.dart';
|
import '../../../../main.dart';
|
||||||
import '../base_db.dart';
|
import '../base_db.dart';
|
||||||
|
|
||||||
class BaumartenRepository extends BaseDB {
|
class TreeTypeRepository extends BaseDB {
|
||||||
IsarCollection collection = isar.baumartens;
|
IsarCollection collection = isar.treeTypes;
|
||||||
}
|
}
|
Loading…
Reference in a new issue