Package ar.com.AmberSoft.iEvenTask.services

Source Code of ar.com.AmberSoft.iEvenTask.services.DeleteProfileService

package ar.com.AmberSoft.iEvenTask.services;

import java.util.Collection;
import java.util.Iterator;
import java.util.Map;

import ar.com.AmberSoft.iEvenTask.backend.entities.Entity;
import ar.com.AmberSoft.iEvenTask.backend.entities.Profile;
import ar.com.AmberSoft.util.ParamsConst;

public class DeleteProfileService extends DeleteService {

  @SuppressWarnings("rawtypes")
  @Override
  public Map onExecute(Map params) {
    Collection ids = (Collection) params.get(ParamsConst.IDS);
    for (Iterator iterator = ids.iterator(); iterator.hasNext();) {
      Integer id = (Integer) iterator.next();
      Entity entity = (Entity) getSession().get(getEntity(), id);
      //entity.setDelete(new Date());
      getSession().delete(entity);
    }
   
    return null;   
  }

 
  @SuppressWarnings("rawtypes")
  @Override
  public Class getEntity() {
    return Profile.class;
  }

}
TOP

Related Classes of ar.com.AmberSoft.iEvenTask.services.DeleteProfileService

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.