| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
package org.kuali.mobility.admin.entity; |
| 17 | |
|
| 18 | |
import java.io.Serializable; |
| 19 | |
|
| 20 | |
import javax.persistence.Column; |
| 21 | |
import javax.persistence.Entity; |
| 22 | |
import javax.persistence.GeneratedValue; |
| 23 | |
import javax.persistence.GenerationType; |
| 24 | |
import javax.persistence.Id; |
| 25 | |
import javax.persistence.Table; |
| 26 | |
import javax.persistence.Transient; |
| 27 | |
import javax.persistence.Version; |
| 28 | |
|
| 29 | |
|
| 30 | |
|
| 31 | |
|
| 32 | |
|
| 33 | |
|
| 34 | 0 | @Entity |
| 35 | |
@Table(name="TL_T") |
| 36 | 0 | public class Tool implements Serializable, Comparable<Tool> { |
| 37 | |
|
| 38 | |
private static final long serialVersionUID = 4709451428489759275L; |
| 39 | |
|
| 40 | |
@Id |
| 41 | |
@GeneratedValue(strategy = GenerationType.TABLE) |
| 42 | |
@Column(name="ID") |
| 43 | |
private Long toolId; |
| 44 | |
|
| 45 | |
@Column(name="ALIAS") |
| 46 | |
private String alias; |
| 47 | |
|
| 48 | |
@Column(name="TTL") |
| 49 | |
private String title; |
| 50 | |
|
| 51 | |
@Column(name="URL") |
| 52 | |
private String url; |
| 53 | |
|
| 54 | |
@Column(name="DESC_TXT") |
| 55 | |
private String description; |
| 56 | |
|
| 57 | |
@Column(name="ICN_URL") |
| 58 | |
private String iconUrl; |
| 59 | |
|
| 60 | |
@Version |
| 61 | |
@Column(name="VER_NBR") |
| 62 | |
private Long versionNumber; |
| 63 | |
|
| 64 | |
@Transient |
| 65 | |
private String badgeCount; |
| 66 | |
|
| 67 | |
public Long getToolId() { |
| 68 | 0 | return toolId; |
| 69 | |
} |
| 70 | |
|
| 71 | |
public void setToolId(Long id) { |
| 72 | 0 | this.toolId = id; |
| 73 | 0 | } |
| 74 | |
|
| 75 | |
public String getAlias() { |
| 76 | 0 | return alias; |
| 77 | |
} |
| 78 | |
|
| 79 | |
public void setAlias(String alias) { |
| 80 | 0 | this.alias = alias; |
| 81 | 0 | } |
| 82 | |
|
| 83 | |
public String getTitle() { |
| 84 | 0 | return title; |
| 85 | |
} |
| 86 | |
|
| 87 | |
public void setTitle(String title) { |
| 88 | 0 | this.title = title; |
| 89 | 0 | } |
| 90 | |
|
| 91 | |
public String getUrl() { |
| 92 | 0 | return url; |
| 93 | |
} |
| 94 | |
|
| 95 | |
public void setUrl(String url) { |
| 96 | 0 | this.url = url; |
| 97 | 0 | } |
| 98 | |
|
| 99 | |
public String getDescription() { |
| 100 | 0 | return description; |
| 101 | |
} |
| 102 | |
|
| 103 | |
public void setDescription(String description) { |
| 104 | 0 | this.description = description; |
| 105 | 0 | } |
| 106 | |
|
| 107 | |
|
| 108 | |
|
| 109 | |
|
| 110 | |
public String getBadgeCount() { |
| 111 | 0 | return badgeCount; |
| 112 | |
} |
| 113 | |
|
| 114 | |
|
| 115 | |
|
| 116 | |
|
| 117 | |
|
| 118 | |
public void setBadgeCount(String badgeCount) { |
| 119 | 0 | this.badgeCount = badgeCount; |
| 120 | 0 | } |
| 121 | |
|
| 122 | |
public String getIconUrl() { |
| 123 | 0 | return iconUrl; |
| 124 | |
} |
| 125 | |
|
| 126 | |
public void setIconUrl(String iconUrl) { |
| 127 | 0 | this.iconUrl = iconUrl; |
| 128 | 0 | } |
| 129 | |
|
| 130 | |
public Long getVersionNumber() { |
| 131 | 0 | return versionNumber; |
| 132 | |
} |
| 133 | |
|
| 134 | |
public void setVersionNumber(Long versionNumber) { |
| 135 | 0 | this.versionNumber = versionNumber; |
| 136 | 0 | } |
| 137 | |
|
| 138 | |
@Override |
| 139 | |
public int compareTo(Tool that) { |
| 140 | 0 | if (that == null) { |
| 141 | 0 | return -1; |
| 142 | |
} |
| 143 | 0 | return this.title.compareTo(that.title); |
| 144 | |
} |
| 145 | |
|
| 146 | |
@Override |
| 147 | |
public boolean equals(Object that) { |
| 148 | 0 | if (that == null) { |
| 149 | 0 | return false; |
| 150 | |
} |
| 151 | 0 | if (that instanceof Tool) { |
| 152 | 0 | return this.toolId.equals(((Tool)that).toolId); |
| 153 | |
} |
| 154 | 0 | return false; |
| 155 | |
} |
| 156 | |
|
| 157 | |
} |