Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Se crea un nuevo servicio para hechos vitales - Se restructura la función de los EJB para facilitar la claridad del codigo - Se añaden las opciones por defecto al properties
- Loading branch information
1 parent
7c79d23
commit 4030aba
Showing
15 changed files
with
594 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
87 changes: 87 additions & 0 deletions
87
moduls/apirest/src/es/caib/rolsac/apirest/v1/model/filtros/FiltroAgrupacioFetVital.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
package es.caib.rolsac.apirest.v1.model.filtros; | ||
|
||
import java.io.IOException; | ||
|
||
import javax.xml.bind.annotation.XmlRootElement; | ||
|
||
import org.ibit.rol.sac.model.filtro.FiltroGenerico; | ||
|
||
import com.fasterxml.jackson.core.JsonProcessingException; | ||
import com.fasterxml.jackson.core.type.TypeReference; | ||
import com.fasterxml.jackson.databind.ObjectMapper; | ||
import com.fasterxml.jackson.databind.SerializationFeature; | ||
|
||
import io.swagger.annotations.ApiModel; | ||
import io.swagger.annotations.ApiModelProperty; | ||
|
||
/** | ||
* FiltroUA. | ||
* | ||
* @author indra | ||
* | ||
*/ | ||
@XmlRootElement | ||
@ApiModel(value = "FiltroAgrupacioFetVital", description = "Filtro propio de la entidad AgrupacioFetVital") | ||
public class FiltroAgrupacioFetVital { | ||
|
||
public static final String SAMPLE = "{\"publico\":\"0\"}"; | ||
|
||
|
||
/** CodigoUAPadre. **/ | ||
@ApiModelProperty(value = "Código Publico Objetivo ", dataType = "java.lang.Integer", required = false) | ||
private Integer publico; | ||
|
||
|
||
public static FiltroAgrupacioFetVital valueOf(final String json) { | ||
final ObjectMapper objectMapper = new ObjectMapper(); | ||
final TypeReference<FiltroAgrupacioFetVital> typeRef = new TypeReference<FiltroAgrupacioFetVital>() { | ||
}; | ||
FiltroAgrupacioFetVital obj; | ||
try { | ||
obj = (FiltroAgrupacioFetVital) objectMapper.readValue(json, typeRef); | ||
} catch (final IOException e) { | ||
// TODO PENDIENTE | ||
throw new RuntimeException(e); | ||
} | ||
return obj; | ||
} | ||
|
||
|
||
public FiltroGenerico toFiltroGenerico() { | ||
FiltroGenerico fg = new FiltroGenerico(); | ||
if(this.publico!= null) { | ||
fg.addFiltro(FiltroGenerico.FILTRO_AFV_PUBLICO, this.publico+""); | ||
} | ||
|
||
return fg; | ||
} | ||
|
||
|
||
public String toJson() { | ||
try { | ||
final ObjectMapper objectMapper = new ObjectMapper(); | ||
objectMapper.configure(SerializationFeature.INDENT_OUTPUT, false); | ||
return objectMapper.writeValueAsString(this); | ||
} catch (final JsonProcessingException e) { | ||
// TODO PENDIENTE | ||
throw new RuntimeException(e); | ||
} | ||
} | ||
|
||
|
||
/** | ||
* @return the publico | ||
*/ | ||
public Integer getPublico() { | ||
return publico; | ||
} | ||
|
||
|
||
/** | ||
* @param publico the publico to set | ||
*/ | ||
public void setPublico(Integer publico) { | ||
this.publico = publico; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
...ls/apirest/src/es/caib/rolsac/apirest/v1/model/respuestas/RespuestaAgrupacioFetVital.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package es.caib.rolsac.apirest.v1.model.respuestas; | ||
|
||
import java.util.List; | ||
|
||
import javax.xml.bind.annotation.XmlRootElement; | ||
|
||
import es.caib.rolsac.apirest.v1.model.AgrupacioFetVital; | ||
import io.swagger.annotations.ApiModel; | ||
import io.swagger.annotations.ApiModelProperty; | ||
|
||
/** | ||
* Respuesta Idioma | ||
* | ||
* @author indra | ||
* | ||
*/ | ||
|
||
@XmlRootElement | ||
@ApiModel(value = "Respuesta Agrupación hecho vital", description = "Respuesta Agrupación hecho vital") | ||
public class RespuestaAgrupacioFetVital extends RespuestaBase{ | ||
/** Resultado. **/ | ||
@ApiModelProperty(value = "Listado con los objetos de resultado", required = false) | ||
private List<AgrupacioFetVital> resultado; | ||
public RespuestaAgrupacioFetVital(String status, String mensaje, Integer numeroElementos, | ||
List<AgrupacioFetVital> resultado) { | ||
super(status, mensaje, numeroElementos); | ||
this.resultado=resultado; | ||
}; | ||
public RespuestaAgrupacioFetVital() { | ||
super(); | ||
} | ||
public List<AgrupacioFetVital> getResultado() { | ||
return resultado; | ||
} | ||
public void setResultado(List<AgrupacioFetVital> resultado) { | ||
this.resultado = resultado; | ||
} | ||
} |
Oops, something went wrong.