I have a Car class. It has three properties: id, color, and model.
In a specific query, I want to return all the cars and their properties, and also want to return a true / false field called "searcherKnowsOwner", which is the field that I calculate in the query of my database, based on whether the owner knows the search. I have a database function that takes a crawler id and a car id and returns a boolean.
My car class looks like this (pseudo code):
class Car{
int id;
Color color;
Model model;
}
I have a screen where I want to display all the cars, but I also want to display a flag next to each car if the person viewing the page knows the owner of this car.
Should I add a field to the Car class, a boolean searcherKnowsOwner? This is not a property of the car, but is actually the property of the user conducting the search. But this seems to be the most effective place to post this information.
source
share