Class ArrayResultRowMapperFactory
java.lang.Object
ch.tocco.nice2.persist.core.impl.hibernate.query.mapper.ArrayResultRowMapperFactory
- All Implemented Interfaces:
ResultRowMapperFactory
@Component
public class ArrayResultRowMapperFactory
extends Object
implements ResultRowMapperFactory
ResultRowMapperFactory
that supports query results of type Object
[].
The order of the array is defined by the order the paths are given to PathQueryBuilder.addPathToSelection(String...)
.
Note:
This mapper is only partially suited for to-many paths. When multiple to-many paths of the same entity are queried
they cannot be referenced by array index, because null values are ignored. In addition nested to-many path values will be
returned in one flattened array.
MapResultRowMapperFactory
is better suited for to many paths.-
Constructor Summary
-
Method Summary
-
Constructor Details
-
ArrayResultRowMapperFactory
public ArrayResultRowMapperFactory()
-
-
Method Details
-
supports
- Specified by:
supports
in interfaceResultRowMapperFactory
- Returns:
- true if this factory supports the given target type
-
createMapper
- Specified by:
createMapper
in interfaceResultRowMapperFactory
- Returns:
- a
ResultRowMapper
that can produce results of type T
-