Class ItemsServiceImpl<T extends ItemDTO>

java.lang.Object
info.ejava.examples.svc.aop.items.services.ItemsServiceImpl<T>
All Implemented Interfaces:
ItemsService<T>
Direct Known Subclasses:
BedsServiceImpl, GrillsServiceImpl, MowersServiceImpl

public class ItemsServiceImpl<T extends ItemDTO> extends Object implements ItemsService<T>
  • Field Details

  • Constructor Details

    • ItemsServiceImpl

      public ItemsServiceImpl()
  • Method Details

    • createItem

      public T createItem(T item)
      Specified by:
      createItem in interface ItemsService<T extends ItemDTO>
    • clone

      private T clone(T original)
      Place a clone of the provided objects into storage since tests are all running within the same JVM instance/thread. This prevents accidental instance reuse and easier to make sense of post-test status.
      Parameters:
      original -
      Returns:
      copy of original
    • updateItem

      public T updateItem(int id, T item)
      Specified by:
      updateItem in interface ItemsService<T extends ItemDTO>
    • getItem

      public T getItem(int id)
      Specified by:
      getItem in interface ItemsService<T extends ItemDTO>
    • deleteItem

      public void deleteItem(int id)
      Specified by:
      deleteItem in interface ItemsService<T extends ItemDTO>
    • deleteItems

      public void deleteItems()
      Specified by:
      deleteItems in interface ItemsService<T extends ItemDTO>