1 23 24 package org.dbforms.event.classic; 25 26 import org.apache.commons.logging.Log; 27 import org.apache.commons.logging.LogFactory; 28 29 import org.dbforms.config.*; 30 31 import org.dbforms.event.NavigationEvent; 32 33 import java.sql.*; 34 35 import javax.servlet.http.*; 36 37 38 39 46 public class NavLastEvent extends NavigationEvent { 47 static Log logCat = LogFactory.getLog(NavLastEvent.class.getName()); 49 56 public NavLastEvent(String action, 57 HttpServletRequest request, 58 DbFormsConfig config) { 59 super(action, request, config); 60 } 61 62 63 70 public NavLastEvent(Table table, 71 HttpServletRequest request, 72 DbFormsConfig config) { 73 super(table, request, config); 74 } 75 76 97 public ResultSetVector processEvent(FieldValue[] childFieldValues, 98 FieldValue[] orderConstraint, 99 String sqlFilter, 100 FieldValue[] sqlFilterParams, 101 int count, 102 String firstPosition, 103 String lastPosition, 104 DbEventInterceptorData interceptorData) 105 throws SQLException { 106 logCat.info("==>NavLastEvent"); 108 FieldValue.invert(orderConstraint); 109 110 ResultSetVector resultSetVector = getTable() 111 .doConstrainedSelect(childFieldValues, 112 orderConstraint, 113 sqlFilter, 114 sqlFilterParams, 115 Constants.COMPARE_NONE, 116 count, interceptorData); 117 FieldValue.invert(orderConstraint); 118 resultSetVector.flip(); 119 120 return resultSetVector; 121 } 122 } 123 | Popular Tags |