| 1 |  |  package org.kuali.rice.kim.impl.entity.privacy | 
  | 2 |  |   | 
  | 3 |  |  import javax.persistence.Entity | 
  | 4 |  |  import javax.persistence.Table | 
  | 5 |  |  import org.kuali.rice.kim.api.entity.privacy.EntityPrivacyPreferencesContract | 
  | 6 |  |  import org.kuali.rice.kns.bo.PersistableBusinessObjectBase | 
  | 7 |  |  import javax.persistence.Column | 
  | 8 |  |  import javax.persistence.Id | 
  | 9 |  |  import org.hibernate.annotations.Type | 
  | 10 |  |  import org.kuali.rice.kim.api.entity.phone.EntityPhone | 
  | 11 |  |  import org.kuali.rice.kim.api.entity.privacy.EntityPrivacyPreferences | 
  | 12 |  |   | 
  | 13 |  |  @Entity | 
  | 14 |  |  @Table(name = "KRIM_ENTITY_PRIV_PREF_T") | 
  | 15 |  |  class EntityPrivacyPreferencesBo extends PersistableBusinessObjectBase implements EntityPrivacyPreferencesContract { | 
  | 16 |  |              private static final long serialVersionUID = 1L; | 
  | 17 |  |   | 
  | 18 |  |          @Id | 
  | 19 |  |          @Column(name = "ENTITY_ID") | 
  | 20 |  |          String entityId; | 
  | 21 |  |   | 
  | 22 |  |          @Type(type="yes_no") | 
  | 23 |  |          @Column(name="SUPPRESS_NM_IND") | 
  | 24 |  |          boolean suppressName; | 
  | 25 |  |   | 
  | 26 |  |          @Type(type="yes_no") | 
  | 27 |  |          @Column(name="SUPPRESS_EMAIL_IND") | 
  | 28 |  |          boolean suppressEmail; | 
  | 29 |  |   | 
  | 30 |  |          @Type(type="yes_no") | 
  | 31 |  |          @Column(name="SUPPRESS_ADDR_IND") | 
  | 32 |  |          boolean suppressAddress; | 
  | 33 |  |   | 
  | 34 |  |          @Type(type="yes_no") | 
  | 35 |  |          @Column(name="SUPPRESS_PHONE_IND") | 
  | 36 |  |          boolean suppressPhone; | 
  | 37 |  |   | 
  | 38 |  |          @Type(type="yes_no") | 
  | 39 |  |          @Column(name="SUPPRESS_PRSNL_IND") | 
  | 40 |  |          boolean suppressPersonal; | 
  | 41 |  |   | 
  | 42 |  |    | 
  | 43 |  |   | 
  | 44 |  |   | 
  | 45 |  |   | 
  | 46 |  |   | 
  | 47 |  |    static EntityPrivacyPreferences to(EntityPrivacyPreferencesBo bo) { | 
  | 48 | 0 |      if (bo == null) { return null } | 
  | 49 | 0 |      return EntityPrivacyPreferences.Builder.create(bo).build() | 
  | 50 |  |    } | 
  | 51 |  |   | 
  | 52 |  |     | 
  | 53 |  |   | 
  | 54 |  |   | 
  | 55 |  |   | 
  | 56 |  |   | 
  | 57 |  |    static EntityPrivacyPreferencesBo from(EntityPrivacyPreferences immutable) { | 
  | 58 | 0 |      if (immutable == null) {return null} | 
  | 59 |  |   | 
  | 60 | 0 |      EntityPrivacyPreferencesBo bo = new EntityPrivacyPreferencesBo() | 
  | 61 |  |   | 
  | 62 | 0 |      bo.entityId = immutable.entityId | 
  | 63 | 0 |      bo.suppressAddress = immutable.suppressAddress | 
  | 64 | 0 |      bo.suppressEmail = immutable.suppressEmail | 
  | 65 | 0 |      bo.suppressName = immutable.suppressName | 
  | 66 | 0 |      bo.suppressPersonal = immutable.suppressPersonal | 
  | 67 | 0 |      bo.suppressPhone = immutable.suppressPhone | 
  | 68 | 0 |      bo.versionNumber = immutable.versionNumber | 
  | 69 | 0 |      bo.objectId = immutable.objectId | 
  | 70 |  |   | 
  | 71 | 0 |      return bo; | 
  | 72 |  |    } | 
  | 73 |  |   | 
  | 74 |  |  } |