Package ar.com.AmberSoft.iEvenTask.backend.entities

Examples of ar.com.AmberSoft.iEvenTask.backend.entities.Entity


@SuppressWarnings({"rawtypes"})
public class UpdateEntityService extends Service {

  @Override
  public Map onExecute(Map params) {
    Entity entity = (Entity) params.get(ParamsConst.ENTITY);
    getSession().saveOrUpdate(entity);
    return null;
  }
View Full Code Here


  @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().saveOrUpdate(entity);
    }
   
    return null;   
  }
View Full Code Here

public abstract class CreateService extends Service {

  @Override
  public Map onExecute(Map paramsthrows Exception {
    Map map = new HashMap();
    Entity entity = getEntity(params);
    if (Boolean.TRUE.equals(params.get(ParamsConst.GET_ENTITY))){
      map.put(ParamsConst.ENTITY, entity);
    }
    getSession().save(entity);
    return map;
View Full Code Here

  @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;   
View Full Code Here

TOP

Related Classes of ar.com.AmberSoft.iEvenTask.backend.entities.Entity

Copyright © 2018 www.massapicom. 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.