1 package org.kuali.student.lum.common.client.widgets; 2 3 import org.kuali.student.r1.common.assembly.data.Data; 4 import org.kuali.student.r1.common.assembly.helper.PropertyEnum; 5 6 public class CluSetRangeHelper { 7 8 public enum Properties implements PropertyEnum 9 { 10 ID ("id"), 11 SEARCH_TYPE_KEY ("searchTypeKey"), 12 QUERY_PARAMS ("queryParams"); 13 14 15 private final String key; 16 17 private Properties (final String key) { 18 this.key = key; 19 } 20 21 @Override 22 public String getKey() { 23 return this.key; 24 } 25 } 26 27 private Data data; 28 29 public CluSetRangeHelper(Data data) { 30 this.data = data; 31 } 32 33 public static CluSetRangeHelper wrap(Data data) { 34 if (data == null) { 35 return null; 36 } 37 return new CluSetRangeHelper(data); 38 } 39 40 public void setId(String value) { 41 data.set(Properties.ID.getKey(), value); 42 } 43 44 public String getId() { 45 return data.get(Properties.ID.getKey()); 46 } 47 48 public void setSearchTypeKey(String value) { 49 data.set(Properties.SEARCH_TYPE_KEY.getKey(), value); 50 } 51 52 public String getSearchTypeKey() { 53 return data.get(Properties.SEARCH_TYPE_KEY.getKey()); 54 } 55 56 public void setQueryParams(Data value) { 57 data.set(Properties.QUERY_PARAMS.getKey(), value); 58 } 59 public Data getQueryParams() { 60 Data queryParams = data.get(Properties.QUERY_PARAMS.getKey()); 61 if (queryParams == null) { 62 queryParams = new Data(); 63 setQueryParams(queryParams); 64 } 65 return queryParams; 66 } 67 68 public Data getData() { 69 return data; 70 } 71 }