You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

197 lines
3.5 KiB
Java

2 years ago
package cokr.xit.base.code;
import java.util.Date;
import cokr.xit.foundation.Assert;
/**
* @author mjkhan
*/
public class CommonCode {
private String
groupID,
code,
value,
description,
etc1,
etc2,
etc3,
createdBy,
inUse;
private int sortOrder;
private Date createdAt;
/** id .
* @return id
*/
public String getGroupID() {
return groupID;
}
/** id .
* @param groupID id
*/
public void setGroupID(String groupID) {
this.groupID = groupID;
}
/** .
* @return
*/
public String getCode() {
return code;
}
/** .
* @param id
*/
public void setCode(String id) {
this.code = id;
}
/** .
* @return
*/
public String getValue() {
return value;
}
/** .
* @param name
*/
public void setValue(String name) {
this.value = name;
}
/** .
* @return
*/
public String getDescription() {
return description;
}
/** .
* @param description
*/
public void setDescription(String description) {
this.description = description;
}
/** 1 .
* @return 1
*/
public String getEtc1() {
return etc1;
}
/** 1 .
* @param etc1 1
*/
public void setEtc1(String etc1) {
this.etc1 = etc1;
}
/** 2 .
* @return 2
*/
public String getEtc2() {
return etc2;
}
/** 2 .
* @param etc2 2
*/
public void setEtc2(String etc2) {
this.etc2 = etc2;
}
/** 3 .
* @return 3
*/
public String getEtc3() {
return etc3;
}
/** 3 .
* @param etc3 3
*/
public void setEtc3(String etc3) {
this.etc3 = etc3;
}
/** id .
* @return id
*/
public String getCreatedBy() {
return createdBy;
}
/** id .
* @param createdBy id
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/** .
* @return
* <ul><li>Y - </li>
* <li>N - </li>
* </ul>
*/
public String getInUse() {
return Assert.ifEmpty(inUse, "Y");
}
/** .
* @return
* <ul><li>true - </li>
* <li>false - </li>
* </ul>
*/
public boolean inUse() {
return "Y".equals(getInUse());
}
/** .
* @param inUse
* <ul><li>Y - </li>
* <li>N - </li>
* </ul>
*/
public void setInUse(String inUse) {
this.inUse = inUse;
}
/** .
* @return
*/
public int getSortOrder() {
return sortOrder;
}
/** .
* @param sortOrder
*/
public void setSortOrder(int sortOrder) {
this.sortOrder = sortOrder;
}
/** .
* @return
*/
public Date getCreatedAt() {
return createdAt;
}
/** .
* @param createdAt
*/
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
@Override
public String toString() {
return String.format("%s('%s', '%s', '%s')", getClass().getSimpleName(), getGroupID(), getCode(), getValue());
}
}