1 21 package net.mlw.vlh.adapter; 22 23 import net.mlw.vlh.ValueListAdapter; 24 import net.mlw.vlh.ValueListInfo; 25 26 31 public abstract class AbstractValueListAdapter implements ValueListAdapter 32 { 33 34 private int adapterType = DO_NOTHING; 35 36 37 private int defaultNumberPerPage = Integer.MAX_VALUE; 38 39 40 private String defaultSortColumn; 41 42 43 private Integer defaultSortDirection = ValueListInfo.ASCENDING; 44 45 48 public int getAdapterType() 49 { 50 return adapterType; 51 } 52 53 57 public void setAdapterType(int adapterType) 58 { 59 this.adapterType = adapterType; 60 } 61 62 67 public void setDefaultNumberPerPage(int defaultNumberPerPage) 68 { 69 this.defaultNumberPerPage = defaultNumberPerPage; 70 } 71 72 76 public int getDefaultNumberPerPage() 77 { 78 return defaultNumberPerPage; 79 } 80 81 86 public void setDefaultSortColumn(String defaultSortColumn) 87 { 88 this.defaultSortColumn = defaultSortColumn; 89 } 90 91 94 public String getDefaultSortColumn() 95 { 96 return defaultSortColumn; 97 } 98 99 106 public void setDefaultSortDirection(String defaultSortDirection) 107 { 108 this.defaultSortDirection = "desc".equals(defaultSortDirection) ? ValueListInfo.DESCENDING : ValueListInfo.ASCENDING; 109 } 110 111 115 public Integer getDefaultSortDirectionInteger() 116 { 117 return defaultSortDirection; 118 } 119 } | Popular Tags |