public class JsonMapper extends Object implements SpgeedMapper
| Constructor and Description |
|---|
JsonMapper() |
| Modifier and Type | Method and Description |
|---|---|
void |
configureObjectMapper(com.fasterxml.jackson.databind.ObjectMapper mapper) |
protected Class<?> |
findElementArrayClass(String elementTypeName)
Find a Class for the given elementTypeName as an Array.
|
protected String |
generateFacets(QueryFacets facets,
String view,
String facetsAlias) |
<E> E |
getResult(AnnotationProvider annotationProvider,
ResultSet rs,
Class<E> returnType,
Class elementType) |
String |
getSql(AnnotationProvider annotationProvider,
String sql,
Optional<Chunk> optChunk,
QueryFacets facets,
Optional<String> roleContraints) |
public void configureObjectMapper(com.fasterxml.jackson.databind.ObjectMapper mapper)
public String getSql(AnnotationProvider annotationProvider, String sql, Optional<Chunk> optChunk, QueryFacets facets, Optional<String> roleContraints)
getSql in interface SpgeedMappersql - primitive sql queryoptChunk - previous chunk used to create next callroleContraints - contraint on role need by userprotected String generateFacets(QueryFacets facets, String view, String facetsAlias)
public <E> E getResult(AnnotationProvider annotationProvider, ResultSet rs, Class<E> returnType, Class elementType) throws Exception
getResult in interface SpgeedMapperrs - ResultSet to transformreturnType - wanted final typeelementType - element type if returnType is collection or arrayException - if error during conversionprotected Class<?> findElementArrayClass(String elementTypeName) throws ClassNotFoundException
elementTypeName - the element to find in an array format. Example: MyObjectClass<MyObject[]>ClassNotFoundException - if the class cannot be foundClass.forName(String)Copyright © 2017–2020 CodeLutin. All rights reserved.