Ignore:
Timestamp:
Jan 12, 2010, 1:09:03 PM (15 years ago)
Author:
gav
Message:

Improve bulk data creation batch times and use dynamic allocation of next available id.
Sort admin view controller classes by name.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/services/TaskSearchService.groovy

    r252 r260  
    66    def authenticateService
    77
     8    def paramsMax = 99999
     9
    810    def getTodays(params) {
    9         params.max = Math.min(params?.max?.toInteger() ?: 10, 100)
     11        params.max = Math.min(params?.max?.toInteger() ?: 10, paramsMax)
    1012        params.offset = params?.offset?.toInteger() ?: 0
    1113        params.sort = params?.sort ?: "id"
     
    2426
    2527    def getMyTodays(params) {
    26         params.max = Math.min(params?.max?.toInteger() ?: 10, 100)
     28        params.max = Math.min(params?.max?.toInteger() ?: 10, paramsMax)
    2729        params.offset = params?.offset?.toInteger() ?: 0
    2830        params.sort = params?.sort ?: "id"
     
    4244
    4345    def getInTheLastWeek(params) {
    44         params.max = Math.min(params?.max?.toInteger() ?: 10, 100)
     46        params.max = Math.min(params?.max?.toInteger() ?: 10, paramsMax)
    4547        params.offset = params?.offset?.toInteger() ?: 0
    4648        params.sort = params?.sort ?: "id"
     
    5961
    6062    def getMyInTheLastWeek(params) {
    61         params.max = Math.min(params?.max?.toInteger() ?: 10, 100)
     63        params.max = Math.min(params?.max?.toInteger() ?: 10, paramsMax)
    6264        params.offset = params?.offset?.toInteger() ?: 0
    6365        params.sort = params?.sort ?: "id"
     
    7779
    7880    def getBudgetPlanned(params) {
    79         params.max = Math.min(params?.max?.toInteger() ?: 10, 100)
     81        params.max = Math.min(params?.max?.toInteger() ?: 10, paramsMax)
    8082        params.offset = params?.offset?.toInteger() ?: 0
    8183        params.sort = params?.sort ?: "id"
     
    9597
    9698    def getBudgetUnplanned(params) {
    97         params.max = Math.min(params?.max?.toInteger() ?: 10, 100)
     99        params.max = Math.min(params?.max?.toInteger() ?: 10, paramsMax)
    98100        params.offset = params?.offset?.toInteger() ?: 0
    99101        params.sort = params?.sort ?: "id"
Note: See TracChangeset for help on using the changeset viewer.