| 1 |  |   | 
  | 2 |  |   | 
  | 3 |  |   | 
  | 4 |  |   | 
  | 5 |  |   | 
  | 6 |  |   | 
  | 7 |  |   | 
  | 8 |  |   | 
  | 9 |  |   | 
  | 10 |  |   | 
  | 11 |  |   | 
  | 12 |  |   | 
  | 13 |  |   | 
  | 14 |  |   | 
  | 15 |  |   | 
  | 16 |  |  package org.kuali.student.core.organization.assembly.data.client; | 
  | 17 |  |   | 
  | 18 |  |   | 
  | 19 |  |  import org.kuali.student.common.assembly.data.Data; | 
  | 20 |  |  import org.kuali.student.common.assembly.helper.PropertyEnum; | 
  | 21 |  |   | 
  | 22 |  |   | 
  | 23 |  |  public class RuntimeDataHelper | 
  | 24 |  |  { | 
  | 25 |  |          private static final long serialVersionUID = 1; | 
  | 26 |  |           | 
  | 27 | 0 |          public enum Properties implements PropertyEnum | 
  | 28 |  |          { | 
  | 29 | 0 |                  CREATED ("created"), | 
  | 30 | 0 |                  DELETED ("deleted"), | 
  | 31 | 0 |                  UPDATED ("updated"), | 
  | 32 | 0 |                  VERSIONS ("versions"); | 
  | 33 |  |                   | 
  | 34 |  |                  private final String key; | 
  | 35 |  |                   | 
  | 36 |  |                  private Properties (final String key) | 
  | 37 | 0 |                  { | 
  | 38 | 0 |                          this.key = key; | 
  | 39 | 0 |                  } | 
  | 40 |  |                   | 
  | 41 |  |                  @Override | 
  | 42 |  |                  public String getKey () | 
  | 43 |  |                  { | 
  | 44 | 0 |                          return this.key; | 
  | 45 |  |                  } | 
  | 46 |  |          } | 
  | 47 |  |          private Data data; | 
  | 48 |  |           | 
  | 49 |  |          private RuntimeDataHelper (Data data) | 
  | 50 | 0 |          { | 
  | 51 | 0 |                  this.data = data; | 
  | 52 | 0 |          } | 
  | 53 |  |           | 
  | 54 |  |          public static RuntimeDataHelper wrap (Data data) | 
  | 55 |  |          { | 
  | 56 | 0 |                  if (data == null) | 
  | 57 |  |                  { | 
  | 58 | 0 |                           return null; | 
  | 59 |  |                  } | 
  | 60 | 0 |                  return new RuntimeDataHelper (data); | 
  | 61 |  |          } | 
  | 62 |  |           | 
  | 63 |  |          public Data getData () | 
  | 64 |  |          { | 
  | 65 | 0 |                  return data; | 
  | 66 |  |          } | 
  | 67 |  |           | 
  | 68 |  |           | 
  | 69 |  |          public void setCreated (Boolean value) | 
  | 70 |  |          { | 
  | 71 | 0 |                  data.set (Properties.CREATED.getKey (), value); | 
  | 72 | 0 |          } | 
  | 73 |  |           | 
  | 74 |  |           | 
  | 75 |  |          public Boolean isCreated () | 
  | 76 |  |          { | 
  | 77 | 0 |                  return (Boolean) data.get (Properties.CREATED.getKey ()); | 
  | 78 |  |          } | 
  | 79 |  |           | 
  | 80 |  |           | 
  | 81 |  |          public void setDeleted (Boolean value) | 
  | 82 |  |          { | 
  | 83 | 0 |                  data.set (Properties.DELETED.getKey (), value); | 
  | 84 | 0 |          } | 
  | 85 |  |           | 
  | 86 |  |           | 
  | 87 |  |          public Boolean isDeleted () | 
  | 88 |  |          { | 
  | 89 | 0 |                  return (Boolean) data.get (Properties.DELETED.getKey ()); | 
  | 90 |  |          } | 
  | 91 |  |           | 
  | 92 |  |           | 
  | 93 |  |          public void setUpdated (Boolean value) | 
  | 94 |  |          { | 
  | 95 | 0 |                  data.set (Properties.UPDATED.getKey (), value); | 
  | 96 | 0 |          } | 
  | 97 |  |           | 
  | 98 |  |           | 
  | 99 |  |          public Boolean isUpdated () | 
  | 100 |  |          { | 
  | 101 | 0 |                  return (Boolean) data.get (Properties.UPDATED.getKey ()); | 
  | 102 |  |          } | 
  | 103 |  |           | 
  | 104 |  |           | 
  | 105 |  |          public void setVersions (Data value) | 
  | 106 |  |          { | 
  | 107 | 0 |                  data.set (Properties.VERSIONS.getKey (), value); | 
  | 108 | 0 |          } | 
  | 109 |  |           | 
  | 110 |  |           | 
  | 111 |  |          public Data getVersions () | 
  | 112 |  |          { | 
  | 113 | 0 |                  return (Data) data.get (Properties.VERSIONS.getKey ()); | 
  | 114 |  |          } | 
  | 115 |  |           | 
  | 116 |  |  } | 
  | 117 |  |   |