public void mudarPaiItens(HttpServletRequest request) throws ECARException {
Transaction tx = null;
try {
List listItens = new ArrayList();
MudarPaiItensTempBean bean = new MudarPaiItensTempBean(Long.valueOf("1533"), Long.valueOf("521"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("1523"), Long.valueOf("1593"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("1186"), Long.valueOf("521"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("1520"), Long.valueOf("521"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("1532"), Long.valueOf("521"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("1322"), Long.valueOf("1593"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("1429"), Long.valueOf("1593"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("1519"), Long.valueOf("521"));
listItens.add(bean);
/*
// SITES
bean = new MudarPaiItensTempBean(Long.valueOf("1522"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("1710"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("1583"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("1329"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("1457"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("1581"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("1535"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("1212"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("1196"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("453"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("452"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("437"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("484"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("1187"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("1660"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("481"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("483"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("484"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("479"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("1184"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("465"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("466"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("1204"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("1334"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("1524"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("482"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("448"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("449"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("1213"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("1193"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("477"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("1730"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("464"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("469"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("1454"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("468"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("1184"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("467"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("1444"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("451"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("1211"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("1208"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("1447"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("1245"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("1330"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("1446"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("1490"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("1621"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("1700"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("1701"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("1734"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("1215"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("1666"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("1349"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("1416"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("1362"), Long.valueOf("457"));
listItens.add(bean);
bean = new MudarPaiItensTempBean(Long.valueOf("1184"), Long.valueOf("457"));
listItens.add(bean);
*/
tx = session.beginTransaction();
ControlePermissao controlePermissao = new ControlePermissao();
Iterator it = listItens.iterator();
while (it.hasNext()) {
MudarPaiItensTempBean itemBean = (MudarPaiItensTempBean) it.next();
ItemEstruturaIett itemEstrutura = (ItemEstruturaIett) this.buscar(ItemEstruturaIett.class, itemBean.getCodItem());
Set Iettus = itemEstrutura.getItemEstrutUsuarioIettusesByCodIett();
Iterator itIettus = Iettus.iterator();
while (itIettus.hasNext()) {
ItemEstrutUsuarioIettus itemEstrutUsuario = (ItemEstrutUsuarioIettus) itIettus.next();
/******** Historico *********/
HistoricoIettus historico = new HistoricoIettus(itemEstrutUsuario,
HistoricoIettus.excluirPermissoes,
session,
new ConfiguracaoDao(request),
request);
historico.gerarHistorico();
/******** Historico *********/
//
// controlar as permissoes
//
//if(!ControlePermissao.PERMISSAO_FUNCAO_ACOMPANHAMENTO.equals(itemEstrutUsuario.getCodTpPermIettus())){
session.delete(itemEstrutUsuario);
//}
}
//mudar o pai
itemEstrutura.setItemEstruturaIett((ItemEstruturaIett) this.buscar(ItemEstruturaIett.class, itemBean.getCodPai()));
//
// controlar as permissoes
//