예제 #1
0
 public void updateCarrito(CarritoDTO detail) {
   CarritoEntity entity = entityManager.merge(CarritoConverter.persistenceDTO2Entity(detail));
   CarritoConverter.entity2PersistenceDTO(entity);
 }
예제 #2
0
 @SuppressWarnings("unchecked")
 public List<CarritoDTO> getCarritos() {
   Query q = entityManager.createQuery("select u from CarritoEntity u");
   return CarritoConverter.entity2PersistenceDTOList(q.getResultList());
 }
예제 #3
0
 public CarritoDTO getCarrito(Long id) {
   return CarritoConverter.entity2PersistenceDTO(entityManager.find(CarritoEntity.class, id));
 }
예제 #4
0
 public CarritoDTO createCarrito(CarritoDTO carrito) {
   CarritoEntity entity = CarritoConverter.persistenceDTO2Entity(carrito);
   entityManager.persist(entity);
   return CarritoConverter.entity2PersistenceDTO(entity);
 }