|
How would a method DeletionQuery#fromString(String) work? You'd have to have an instance of the thing you are trying to create. So I made the decision to put all conversion behaviour into the DeleteByQuerySupport class. Also you don't have to know which class to instantiate before you call DeleteByQuery's methods at all since they do all the heavy lifting.
So let's say we'd move the toLuceneQuery(...) and toString() to the DeletionQuery and keep the fromString(...) somewhere else. Then we'd end up with code scattered all over the place and I don't like that.
|