March 2001
Intermediate to advanced
400 pages
8h 35m
English
As a parser parses a user's query, the parser sees select terms, class names, and where clause comparisons. After all these pieces are parsed, you can build a Query object that is a translation of the user's input.
The builder pattern applies when “the algorithm for creating a complex object should be independent of the parts that make up the object and how they are assembled” [Gamma et al.]. You use a builder to collect the various aspects of a query and then ask the builder for a query after parsing all the input text. Figure 15.13 shows the QueryBuilder class.
The constructor for ...
Read now
Unlock full access