64 lines
2.1 KiB
Java
64 lines
2.1 KiB
Java
/*
|
|
* To change this template, choose Tools | Templates
|
|
* and open the template in the editor.
|
|
*/
|
|
package com.rjconsultores.ventaboletos.service.impl;
|
|
|
|
import com.rjconsultores.ventaboletos.dao.AjusteEventoExtraDAO;
|
|
import com.rjconsultores.ventaboletos.entidad.AjusteEventoExtra;
|
|
import com.rjconsultores.ventaboletos.service.AjusteEventoExtraService;
|
|
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
|
import java.util.Calendar;
|
|
import java.util.List;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
/**
|
|
*
|
|
* @author Administrador
|
|
*/
|
|
@Service("ajusteEventoExtraService")
|
|
public class AjusteEventoExtraServiceImpl implements AjusteEventoExtraService {
|
|
|
|
@Autowired
|
|
private AjusteEventoExtraDAO ajusteEventoExtraDAO;
|
|
|
|
public List<AjusteEventoExtra> obtenerTodos() {
|
|
return ajusteEventoExtraDAO.obtenerTodos();
|
|
}
|
|
|
|
public AjusteEventoExtra obtenerID(Integer id) {
|
|
return ajusteEventoExtraDAO.obtenerID(id);
|
|
}
|
|
|
|
@Transactional
|
|
public AjusteEventoExtra suscribir(AjusteEventoExtra entidad) {
|
|
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
|
entidad.setFecmodif(Calendar.getInstance().getTime());
|
|
entidad.setActivo(Boolean.TRUE);
|
|
|
|
return ajusteEventoExtraDAO.suscribir(entidad);
|
|
}
|
|
|
|
@Transactional
|
|
public AjusteEventoExtra actualizacion(AjusteEventoExtra entidad) {
|
|
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
|
entidad.setFecmodif(Calendar.getInstance().getTime());
|
|
entidad.setActivo(Boolean.TRUE);
|
|
|
|
return ajusteEventoExtraDAO.actualizacion(entidad);
|
|
}
|
|
|
|
@Transactional
|
|
public void borrar(AjusteEventoExtra entidad) {
|
|
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
|
entidad.setFecmodif(Calendar.getInstance().getTime());
|
|
entidad.setActivo(Boolean.FALSE);
|
|
|
|
ajusteEventoExtraDAO.actualizacion(entidad);
|
|
}
|
|
|
|
|
|
}
|