catalog.tex 2.2 KB

12345678910111213141516171819202122232425262728293031
  1. \section{Catalog}
  2. \label{sec:catalog}
  3. \begin{figure}[ht]
  4. \centering
  5. \includegraphics[width=1.0\textwidth]{images/Catalog_Overview.eps}
  6. \label{catalog_overview}
  7. \caption{Catalog - Class Overview}
  8. \end{figure}
  9. The \code{Catalog} interface was designed to manage \code{Product}s and \code{ProductFeature}s in the system.
  10. It provides functionality to add, remove, and find \code{Product}s.
  11. \code{Product}s can be searched by their name or category.
  12. \code{Product}s and \code{ProductFeature}s are more closely described in Section \ref{sec:product}.
  13. The \code{PersistentCatalog} is an implementation of the \code{Catalog} interface.
  14. Additionally \code{PersistentCatalog} provides an \code{update()}-method to update and merge existing \code{PersistentProduct}s to the database.\footnote{\code{update()} to the interface. Misuse \code{add()} for updates? this seems inconsistent.}
  15. The \code{find()} methods request the database in the form of \code{CriteriaQuerys} which will be processed by JPA and results are returned in the form of \code{Iterables}. The reason for this is to make returned objects immutable without making it difficult to iterate over these results.
  16. %If you want to sell your products at your shop, you must presenting them very good to stimulate customers interests. A helpful solution to giving this people a clearly overview could be
  17. %a catalog. With the \code{PersistentCatalog}-class, you can implemented such a thing. This class is an implementation of the interface \code{Catalog}.\\
  18. %After you created a new catalog, you can add \code{ProductTypes} to it or remove them from it. Also you can checked, whether the catalog contains a defined \code{ProductType}. Aside from you
  19. %this class provides methods to find productTypes by their name or their category at your catalog.\\
  20. %In case you have added a \code{ProductType} to the catalog and now you are changing this type, you do not need remove the old type from this catalog and add the new to it. Only you need to
  21. %used the method \code{update(PersistentProductType productType)} from the \code{PersistentCatalog}-class and this \code{productType} will be updated and persist to the \code{PersistentCatalog}
  22. %and the Database.