| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
package org.kuali.rice.kim.bo.reference.impl; |
| 17 | |
|
| 18 | |
import java.util.LinkedHashMap; |
| 19 | |
|
| 20 | |
import javax.persistence.AttributeOverride; |
| 21 | |
import javax.persistence.AttributeOverrides; |
| 22 | |
import javax.persistence.Column; |
| 23 | |
import javax.persistence.MappedSuperclass; |
| 24 | |
|
| 25 | |
import org.apache.commons.lang.StringUtils; |
| 26 | |
import org.kuali.rice.kim.bo.reference.KimCode; |
| 27 | |
import org.kuali.rice.kim.bo.reference.dto.AddressTypeInfo; |
| 28 | |
import org.kuali.rice.kns.bo.KualiCodeBase; |
| 29 | |
|
| 30 | |
|
| 31 | |
|
| 32 | |
|
| 33 | |
|
| 34 | |
|
| 35 | |
@MappedSuperclass |
| 36 | |
@AttributeOverrides({ |
| 37 | |
@AttributeOverride(name="active",column=@Column(name="ACTV_IND")) |
| 38 | |
}) |
| 39 | 0 | public abstract class KimCodeBase extends KualiCodeBase implements KimCode { |
| 40 | |
|
| 41 | |
private static final long serialVersionUID = 1660166679188995697L; |
| 42 | 0 | @Column(name="DISPLAY_SORT_CD") |
| 43 | |
protected String displaySortCode = ""; |
| 44 | |
|
| 45 | |
|
| 46 | |
|
| 47 | |
|
| 48 | |
|
| 49 | |
|
| 50 | |
@SuppressWarnings("unchecked") |
| 51 | |
@Override |
| 52 | |
protected LinkedHashMap toStringMapper() { |
| 53 | 0 | LinkedHashMap<String, Object> lhm = new LinkedHashMap<String, Object>(); |
| 54 | 0 | lhm.put("code", getCode()); |
| 55 | 0 | lhm.put("name", getName()); |
| 56 | 0 | return lhm; |
| 57 | |
} |
| 58 | |
|
| 59 | |
|
| 60 | |
|
| 61 | |
|
| 62 | |
public boolean isActive() { |
| 63 | 0 | return active; |
| 64 | |
} |
| 65 | |
|
| 66 | |
|
| 67 | |
|
| 68 | |
|
| 69 | |
public void setActive(boolean active) { |
| 70 | 0 | this.active = active; |
| 71 | 0 | } |
| 72 | |
|
| 73 | |
|
| 74 | |
|
| 75 | |
|
| 76 | |
|
| 77 | |
|
| 78 | |
public boolean equals(Object obj) { |
| 79 | 0 | if (obj instanceof KualiCodeBase) { |
| 80 | 0 | return StringUtils.equals(this.getCode(), ((KualiCodeBase) obj).getCode()); |
| 81 | |
} |
| 82 | 0 | return false; |
| 83 | |
} |
| 84 | |
|
| 85 | |
|
| 86 | |
|
| 87 | |
|
| 88 | |
|
| 89 | |
|
| 90 | |
public int hashCode() { |
| 91 | 0 | int hashCode = 0; |
| 92 | |
|
| 93 | 0 | if (getCode() != null) { |
| 94 | 0 | hashCode = getCode().hashCode(); |
| 95 | |
} |
| 96 | |
|
| 97 | 0 | return hashCode; |
| 98 | |
} |
| 99 | |
|
| 100 | |
|
| 101 | |
|
| 102 | |
|
| 103 | |
public String getDisplaySortCode() { |
| 104 | 0 | return this.displaySortCode; |
| 105 | |
} |
| 106 | |
|
| 107 | |
|
| 108 | |
|
| 109 | |
|
| 110 | |
public void setDisplaySortCode(String displaySortCode) { |
| 111 | 0 | this.displaySortCode = displaySortCode; |
| 112 | 0 | } |
| 113 | |
|
| 114 | |
} |