getWaterLineFieldWhere method
WhereData
getWaterLineFieldWhere(
- int? id,
- int? table_field_id,
- List<
ChangeType> ? changeTypeList, - UiType? uiType,
- NotifyState? notifyState,
- int? localTs,
- SqlOperator tsOperator,
- bool? includeMax,
Implementation
WhereData getWaterLineFieldWhere(
int? id,
int? table_field_id,
List<ChangeType>? changeTypeList,
UiType? uiType,
NotifyState? notifyState,
int? localTs,
SqlOperator tsOperator,
bool? includeMax) {
if (!initialized) throw ArgumentError(AbstractDao.C_MUST_INIT);
WhereData whereData = WhereData();
whereData.set("id", SqlOperator.EQUAL, id);
if (includeMax == null) includeMax = false;
if (table_field_id != null)
whereData.set("table_field_id", SqlOperator.EQUAL, table_field_id);
if (changeTypeList != null) {
String inString = "";
bool firstPass = true;
for (ChangeType ct in changeTypeList) {
if (!firstPass) inString += ",";
inString += "" + WaterLineField.getChangeTypeValue(ct).toString();
firstPass = false;
}
whereData.set("change_type", SqlOperator.IN, inString);
}
if (uiType != null)
whereData.set(
"ui_type", SqlOperator.EQUAL, WaterLineField.getUiTypeValue(uiType));
if (notifyState != null)
whereData.set("notify_state", SqlOperator.EQUAL,
WaterLineField.getNotifyStateValue(notifyState));
whereData.set("local_ts", tsOperator, localTs);
if (!includeMax)
whereData.set("id", SqlOperator.LESS, DbConstants.C_MEDIUMINT_MAX);
return whereData;
}