⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 messageelement.java

📁 对日软件外包 为东芝做的一个全球商业管理系统
💻 JAVA
字号:
package COMMON;

/**
 * <p>title: MessageElement</p>
 * <p>explanation: </p>
 * 
 * @author ym
 * @version 1.0
 */
public class MessageElement implements java.io.Serializable {
	private String msgId;
	private String msgKind;
	private String msgFormat;
	private String msgSolution;
	private String msgCause;
	private String[] keys;
	private String[] labelText;
	private String[] values;
	private int[] rowid;
	private Object[] formatArgs;
	private String[] labelNums; 
	
	public MessageElement(){
		msgId = "";
		msgKind = "";
		msgFormat = "";
		msgSolution = "";
		msgCause = "";
	}

	public String getKey() {
		if (keys == null || keys.length <= 0) {
			return null;
		}
		return keys[0];
	}
	public String[] getKeys() {
		return keys;
	}
	public void setKey(String key) {
		this.keys = new String[]{key};
	}
	public void setKeys(String[] keys) {
		this.keys = keys;
	}
	
	public String getLabelNum() {
		if (labelNums == null || labelNums.length <= 0) {
			return null;
		}
		return labelNums[0];
	}
	public String[] getLabelNums() {
		return labelNums;
	}
	public void setLabelNum(String labelNum) {
		this.labelNums = new String[]{labelNum};
	}
	public void setLabelNums(String[] labelNums) {
		this.labelNums = labelNums;
	}
	
	
	public int getRowid() {
		if (rowid == null || rowid.length <= 0) {
			return 0;
		}
		return rowid[0];
	}
	public int[] getRowids() {
		return rowid;
	}
	public void setRowid(int rowid) {
		this.rowid = new int[]{rowid};
	}
	public void setRowids(int[] rowid) {
		this.rowid = rowid;
	}
	public String getValue() {
		if (values == null || values.length <= 0) {
			return null;
		}
		return values[0];
	}
	public String[] getValues() {
		return values;
	}
	public void setValue(String value) {
		this.values = new String[]{value};
	}
	public void setValues(String[] values) {
		this.values = values;
	}
	public String toString() {
		return "msgId: " + msgId +
				" and msgKind: " + msgKind +
				" and msgFormat: " + msgFormat +
				" and keys: " + arrayToString(keys, "keys") +
				" and labelText: " + arrayToString(labelText, "labelText") +
				" and values: " + arrayToString(values, "values") +
				" and rowid: " + arrayToString(rowid, "rowid");
	}
	private String arrayToString(String[] src, String name) {
		String text = null;

		if (src == null) {
			text = "null";
		} else {
			for (int i=0; i<src.length; i++) {
				if (text == null) {
					text = "";
				} else {
					text = text + ", ";
				}
				text = text + name + "[" + i + "]=" + src[i];
			}
		}
		return text;
	}
	private String arrayToString(int[] src, String name) {
		String text = null;

		if (src == null) {
			text = "null";
		} else {
			for (int i=0; i<src.length; i++) {
				if (text == null) {
					text = "";
				} else {
					text = text + ", ";
				}
				text = text + name + "[" + i + "]=" + String.valueOf(src[i]);
			}
		}
		return text;
	}
	public String getMsgFormat() {
		return msgFormat;
	}
	public void setMsgFormat(String msgFormat) {
		this.msgFormat = msgFormat;
	}
	public String getMsgId() {
		return msgId;
	}
	public void setMsgId(String msgId) {
		this.msgId = msgId;
	}
	public String getMsgKind() {
		return msgKind;
	}
	public void setMsgKind(String msgKind) {
		this.msgKind = msgKind;
	}
	public String[] getLabelText() {
		return labelText;
	}
	public void setLabelText(String[] labelText) {
		this.labelText = labelText;
	}
	public String getMsgCause() {
		return msgCause;
	}
	public void setMsgCause(String msgCause) {
		this.msgCause = msgCause;
	}
	public String getMsgSolution() {
		return msgSolution;
	}
	public void setMsgSolution(String msgSolution) {
		this.msgSolution = msgSolution;
	}
	public Object[] getFormatArgs() {
		return formatArgs;
	}
	public void setFormatArgs(Object[] formatArgs) {
		this.formatArgs = formatArgs;
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -