public abstract class AbstractResourceBeanMapper extends Object implements ResourceBeanMapper
ResourceBeanMapper
.Constructor and Description |
---|
AbstractResourceBeanMapper() |
Modifier and Type | Method and Description |
---|---|
<T> Collection<T> |
mapCollection(ResourceCollection resourceCollection,
Class<T> beanType)
Map the child resources of the
ResourceCollection to a new collection of beanType to return. |
<T> void |
mapCollection(ResourceCollection resourceCollection,
Class<T> beanType,
Collection<T> targetBeanCollection)
Map the child resources of the
ResourceCollection and push them to the given targetBeanCollection
of beanType . |
<T> void |
mapCollection(ResourceCollection resourceCollection,
Class<T> beanType,
Collection<T> targetBeanCollection,
int offset,
int length)
Map the child resources of the
ResourceCollection and push them to the given targetBeanCollection
of beanType from the offset index up to limit size at max. |
<T> Collection<T> |
mapCollection(ResourceCollection resourceCollection,
Class<T> beanType,
int offset,
int limit)
Map the child resources of the
ResourceCollection to a new collection of beanType to return. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
map
public <T> Collection<T> mapCollection(ResourceCollection resourceCollection, Class<T> beanType) throws ResourceException
ResourceBeanMapper
ResourceCollection
to a new collection of beanType
to return.mapCollection
in interface ResourceBeanMapper
resourceCollection
- a ResourceCollection
objectbeanType
- type of bean to which the Resource
should be mappedresourceCollection
ResourceException
- if a resource
cannot be mapped to the beanType
public <T> Collection<T> mapCollection(ResourceCollection resourceCollection, Class<T> beanType, int offset, int limit) throws ResourceException
ResourceBeanMapper
ResourceCollection
to a new collection of beanType
to return.mapCollection
in interface ResourceBeanMapper
resourceCollection
- a ResourceCollection
objectbeanType
- type of bean to which the Resource
should be mappedoffset
- start index of resourceCollection
to convert from.
If offset is a negative value, it's ignored, meaning zero index being effective.limit
- max size of resourceCollection
to convert from offset
index.
If limit is a negative value, it's ignored, meaning no limit being applied.resourceCollection
ResourceException
- if a resource
cannot be mapped to the beanType
public <T> void mapCollection(ResourceCollection resourceCollection, Class<T> beanType, Collection<T> targetBeanCollection) throws ResourceException
ResourceBeanMapper
ResourceCollection
and push them to the given targetBeanCollection
of beanType
.mapCollection
in interface ResourceBeanMapper
resourceCollection
- a ResourceCollection
objectbeanType
- type of bean to which the Resource
should be mappedtargetBeanCollection
- target collection of beans converted from the child resources of the resourceCollection
.ResourceException
- if a resource
cannot be mapped to the beanType
public <T> void mapCollection(ResourceCollection resourceCollection, Class<T> beanType, Collection<T> targetBeanCollection, int offset, int length) throws ResourceException
ResourceBeanMapper
ResourceCollection
and push them to the given targetBeanCollection
of beanType
from the offset
index up to limit
size at max.mapCollection
in interface ResourceBeanMapper
resourceCollection
- a ResourceCollection
objectbeanType
- type of bean to which the Resource
should be mappedtargetBeanCollection
- target collection of beans converted from the child resources of the resourceCollection
.offset
- start index of resourceCollection
to convert from.
If offset is a negative value, it's ignored, meaning zero index being effective.length
- max size of resourceCollection
to convert from offset
index.
If limit is a negative value, it's ignored, meaning no limit being applied.ResourceException
- if a resource
cannot be mapped to the beanType
Copyright © 2017–2020 Hippo B.V. (http://www.onehippo.com). All rights reserved.