Пример #1
0
 public CarritoDTO getCarrito(Long id) {
   return CarritoConverter.entity2PersistenceDTO(entityManager.find(CarritoEntity.class, id));
 }
Пример #2
0
 public void updateCarrito(CarritoDTO detail) {
   CarritoEntity entity = entityManager.merge(CarritoConverter.persistenceDTO2Entity(detail));
   CarritoConverter.entity2PersistenceDTO(entity);
 }
Пример #3
0
 public CarritoDTO createCarrito(CarritoDTO carrito) {
   CarritoEntity entity = CarritoConverter.persistenceDTO2Entity(carrito);
   entityManager.persist(entity);
   return CarritoConverter.entity2PersistenceDTO(entity);
 }