RestProjection

public class RestProjection extends LinkedHashMap<String, Object>

The RestProjection class represents entity fields projection onto entity fields exposed over REST. Because of its Map interface inheritance, we can leave output handling to other components. Additionally, LinkedHashMap ensures unchanged fields order.

See also: org.motechproject.mds.rest.MdsRestFacade

Methods

createProjection

public static <T> RestProjection createProjection(T element, List<String> fields, List<String> blobFields)

createProjectionCollection

public static <T> List<RestProjection> createProjectionCollection(Collection<T> collection, List<String> fields, List<String> blobFields)