📄 insattribute.java
字号:
package com.nari.pmos.wf.workflow;
import java.io.Serializable;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
public class InsAttribute implements Serializable {
private String name = null;
private Object value = null;
private String datatype = null;
public static String Format(InsAttribute insA) {
String s = "";
if (insA.value instanceof Date) {
Date dt = null;
int iMonth = 0;
int iDay = 0;
String sMonth = "";
String sDay = "";
try {
// fixed the bug 2007-11-20
dt = (Date) insA.value;
Calendar cal = new GregorianCalendar();
cal.setTime(dt);
iMonth = cal.get(Calendar.MONTH) + 1;
iDay = cal.get(Calendar.DAY_OF_MONTH);
if(iMonth<10)
sMonth = "0"+iMonth;
else
sMonth = ""+iMonth;
if(iDay<10)
sDay = "0"+iDay;
else
sDay = ""+iDay;
s = cal.get(Calendar.YEAR) + "-" + sMonth + "-" + sDay;
} catch (Exception e) {
e.printStackTrace();
}
} else
s = insA.value.toString();
s = insA.name + "," + s;
return s;
}
public InsAttribute() {
}
public InsAttribute(String name, Object value) {
this.name = name;
this.value = value;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Object getValue() {
return value;
}
public void setValue(Object value) {
this.value = value;
}
public String getDatatype() {
return datatype;
}
public void setDatatype(String datatype) {
this.datatype = datatype;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -