public class MasterDetailControllerUtil extends Object
| Constructor and Description |
|---|
MasterDetailControllerUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addPagedModelAttributes(String orderBy,
Boolean orderAsc,
String pointToPointFlowProfileSearch,
Boolean pointToPointFlowProfileSelectAll,
Boolean moduleSelectAll,
org.springframework.ui.ModelMap model,
int pageNo,
int pageSize,
PagedSearchResult<?> pagedResult,
javax.servlet.http.HttpServletRequest request,
Map<String,Object> searchParams)
Adds all standard control attributes to the model for displaying the
search results page
|
static void |
addParam(Map<String,Object> searchParams,
String paramName,
Object paramValue)
Adds a parameter to the searchParams map, only if it has a value
|
static boolean |
defaultFalse(Boolean input)
Standardises the input field to use false if otherwise not supplied
|
static boolean |
defaultTrue(Boolean input)
Standardises the input field to use true if otherwise not supplied
|
static int |
defaultZero(Integer input)
Returns the input value if not null, otherwise 0
|
static String |
nullForEmpty(String input)
Returns the input value or null for an empty String
|
static String |
resolveOrderBy(String orderBy)
Returns the input value if not null, otherwise "id"
|
public static void addParam(Map<String,Object> searchParams, String paramName, Object paramValue)
searchParams - - The search parameters map to add toparamName - - The name of the parameter to addparamValue - - The value of the parameter to addpublic static void addPagedModelAttributes(String orderBy, Boolean orderAsc, String pointToPointFlowProfileSearch, Boolean pointToPointFlowProfileSelectAll, Boolean moduleSelectAll, org.springframework.ui.ModelMap model, int pageNo, int pageSize, PagedSearchResult<?> pagedResult, javax.servlet.http.HttpServletRequest request, Map<String,Object> searchParams)
orderBy - - The field we are ordering byorderAsc - - Flag to determine if we are ordering by ascending value
or notpointToPointFlowProfileSearch - - Flag to indicate what type of searchpointToPointFlowProfileSelectAll - - Select all boolean for
pointToPointFlowProfile based searchmoduleSelectAll - - Select all boolean for pointToPointFlowProfile
based searchmodel - - The model we are displaying (the data)pageNo - - The page number we are onpageSize - - The page Size (how many results to display per page)pagedResult - - The paged result pagerequest - - standard HttpRequestsearchParams - - The search parameters we're usingpublic static boolean defaultFalse(Boolean input)
input - - The ascending order flagpublic static boolean defaultTrue(Boolean input)
input - - The ascending order flagpublic static String resolveOrderBy(String orderBy)
orderBy - - Field to order bypublic static int defaultZero(Integer input)
input - - inputCopyright © 2007-2015 Ikasan. All Rights Reserved.