Package ar.com.AmberSoft.iEvenTask.services

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

package ar.com.AmberSoft.iEvenTask.services;

import java.util.HashMap;
import java.util.Map;

import ar.com.AmberSoft.iEvenTask.backend.entities.Entity;
import ar.com.AmberSoft.util.ParamsConst;
@SuppressWarnings("rawtypes")
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;
  }
 
  /**
   * Retorna la entidad que sera almacenada
   * @param params
   * @return
   */
  public abstract Entity getEntity (Map paramsthrows Exception ;


}
TOP

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

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.