first commit
This commit is contained in:
37
hrmsEjb/wenrgise/ejb/common/helper/DBObject.java
Normal file
37
hrmsEjb/wenrgise/ejb/common/helper/DBObject.java
Normal file
@@ -0,0 +1,37 @@
|
||||
package wenrgise.ejb.common.helper;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class DBObject extends InputDBObject implements Serializable {
|
||||
private int iInputOutput;
|
||||
|
||||
public static final int IN = 1;
|
||||
|
||||
public static final int OUT = 2;
|
||||
|
||||
public static final int INOUT = 3;
|
||||
|
||||
public DBObject() {}
|
||||
|
||||
public DBObject(int iPosition, int iDataType) {
|
||||
this.iPosition = iPosition;
|
||||
this.iDataType = iDataType;
|
||||
}
|
||||
|
||||
public DBObject(int iPosition, int iInputOutput, int iDataType) {
|
||||
this.iPosition = iPosition;
|
||||
this.iInputOutput = iInputOutput;
|
||||
this.iDataType = iDataType;
|
||||
}
|
||||
|
||||
public DBObject(int iPosition, int iInputOutput, int iDataType, Object oValue) {
|
||||
this.iPosition = iPosition;
|
||||
this.iInputOutput = iInputOutput;
|
||||
this.iDataType = iDataType;
|
||||
this.oValue = oValue;
|
||||
}
|
||||
|
||||
public int getDirection() {
|
||||
return this.iInputOutput;
|
||||
}
|
||||
}
|
43
hrmsEjb/wenrgise/ejb/common/helper/InputDBObject.java
Normal file
43
hrmsEjb/wenrgise/ejb/common/helper/InputDBObject.java
Normal file
@@ -0,0 +1,43 @@
|
||||
package wenrgise.ejb.common.helper;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class InputDBObject implements Serializable {
|
||||
protected int iPosition;
|
||||
|
||||
protected int iDataType;
|
||||
|
||||
protected Object oValue;
|
||||
|
||||
public InputDBObject() {}
|
||||
|
||||
public InputDBObject(int iPosition, int iDataType, Object oValue) {
|
||||
this.iPosition = iPosition;
|
||||
this.iDataType = iDataType;
|
||||
this.oValue = oValue;
|
||||
}
|
||||
|
||||
public int getDataType() {
|
||||
return this.iDataType;
|
||||
}
|
||||
|
||||
public void setDataType(int newIDataType) {
|
||||
this.iDataType = newIDataType;
|
||||
}
|
||||
|
||||
public int getPosition() {
|
||||
return this.iPosition;
|
||||
}
|
||||
|
||||
public void setPosition(int newIPosition) {
|
||||
this.iPosition = newIPosition;
|
||||
}
|
||||
|
||||
public Object getObject() {
|
||||
return this.oValue;
|
||||
}
|
||||
|
||||
public void setObject(Object newOValue) {
|
||||
this.oValue = newOValue;
|
||||
}
|
||||
}
|
7
hrmsEjb/wenrgise/ejb/common/helper/ParameterTypes.java
Normal file
7
hrmsEjb/wenrgise/ejb/common/helper/ParameterTypes.java
Normal file
@@ -0,0 +1,7 @@
|
||||
package wenrgise.ejb.common.helper;
|
||||
|
||||
import oracle.jdbc.driver.OracleTypes;
|
||||
|
||||
public class ParameterTypes extends OracleTypes {
|
||||
int i = 3;
|
||||
}
|
26
hrmsEjb/wenrgise/ejb/common/helper/QueryRow.java
Normal file
26
hrmsEjb/wenrgise/ejb/common/helper/QueryRow.java
Normal file
@@ -0,0 +1,26 @@
|
||||
package wenrgise.ejb.common.helper;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.HashMap;
|
||||
|
||||
public class QueryRow implements Serializable {
|
||||
private HashMap row = null;
|
||||
|
||||
public QueryRow(int iCapacity) {
|
||||
this.row = new HashMap(iCapacity);
|
||||
}
|
||||
|
||||
public HashMap getRow() {
|
||||
return this.row;
|
||||
}
|
||||
|
||||
public void setRow(HashMap newRow) {
|
||||
this.row = newRow;
|
||||
}
|
||||
|
||||
public QueryValue get(String sColumnName) {
|
||||
if (this.row != null)
|
||||
return (QueryValue)this.row.get(sColumnName.toUpperCase());
|
||||
return null;
|
||||
}
|
||||
}
|
166
hrmsEjb/wenrgise/ejb/common/helper/QueryValue.java
Normal file
166
hrmsEjb/wenrgise/ejb/common/helper/QueryValue.java
Normal file
@@ -0,0 +1,166 @@
|
||||
package wenrgise.ejb.common.helper;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.Blob;
|
||||
import java.sql.Clob;
|
||||
import java.sql.Date;
|
||||
import java.sql.Time;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Date;
|
||||
|
||||
public class QueryValue implements Serializable {
|
||||
private String stringValue = null;
|
||||
|
||||
private BigDecimal bigDecimalValue = BigDecimal.valueOf(0L);
|
||||
|
||||
private short shortValue = 0;
|
||||
|
||||
private int intValue = 0;
|
||||
|
||||
private long longValue = 0L;
|
||||
|
||||
private float floatValue = 0.0F;
|
||||
|
||||
private double doubleValue = 0.0D;
|
||||
|
||||
private Date dateValue = null;
|
||||
|
||||
private Blob blobValue = null;
|
||||
|
||||
private Clob clobValue = null;
|
||||
|
||||
public void setString(String value) {
|
||||
this.stringValue = value;
|
||||
}
|
||||
|
||||
public String getString() {
|
||||
return this.stringValue;
|
||||
}
|
||||
|
||||
public void setBigDecimal(BigDecimal value) {
|
||||
this.bigDecimalValue = value;
|
||||
this.stringValue = (null != value) ? value.toString() : null;
|
||||
}
|
||||
|
||||
public BigDecimal getBigDecimal() {
|
||||
return this.bigDecimalValue;
|
||||
}
|
||||
|
||||
public void setShort(short value) {
|
||||
this.shortValue = value;
|
||||
Short shrt = new Short(value);
|
||||
this.stringValue = (null != shrt) ? shrt.toString() : null;
|
||||
}
|
||||
|
||||
public short getShort() {
|
||||
return this.shortValue;
|
||||
}
|
||||
|
||||
public void setInt(int value) {
|
||||
this.intValue = value;
|
||||
Integer iValue = new Integer(value);
|
||||
this.stringValue = (null != iValue) ? iValue.toString() : null;
|
||||
}
|
||||
|
||||
public int getInt() {
|
||||
return this.intValue;
|
||||
}
|
||||
|
||||
public void setLong(long value) {
|
||||
this.longValue = value;
|
||||
Long lValue = new Long(value);
|
||||
this.stringValue = (null != lValue) ? lValue.toString() : null;
|
||||
}
|
||||
|
||||
public long getLong() {
|
||||
return this.longValue;
|
||||
}
|
||||
|
||||
public void setFloat(float value) {
|
||||
this.floatValue = value;
|
||||
Float fValue = new Float(value);
|
||||
this.stringValue = (null != fValue) ? fValue.toString() : null;
|
||||
}
|
||||
|
||||
public float getFloat() {
|
||||
return this.floatValue;
|
||||
}
|
||||
|
||||
public void setDouble(double value) {
|
||||
this.doubleValue = value;
|
||||
Double dValue = new Double(value);
|
||||
this.stringValue = (null != dValue) ? dValue.toString() : null;
|
||||
}
|
||||
|
||||
public double getDouble() {
|
||||
return this.doubleValue;
|
||||
}
|
||||
|
||||
public void setDate(Date value) {
|
||||
this.dateValue = value;
|
||||
this.stringValue = (null != value) ? value.toString() : null;
|
||||
}
|
||||
|
||||
public void setDate(Date value) {
|
||||
if (null == value) {
|
||||
this.stringValue = null;
|
||||
this.dateValue = null;
|
||||
return;
|
||||
}
|
||||
this.dateValue = new Date(value.getTime());
|
||||
this.stringValue = this.dateValue.toString();
|
||||
}
|
||||
|
||||
public Date getDate() {
|
||||
return this.dateValue;
|
||||
}
|
||||
|
||||
public void setTime(Date value) {
|
||||
setDate(value);
|
||||
}
|
||||
|
||||
public void setTime(Time value) {
|
||||
if (null == value) {
|
||||
this.stringValue = null;
|
||||
this.dateValue = null;
|
||||
return;
|
||||
}
|
||||
this.dateValue = new Date(value.getTime());
|
||||
this.stringValue = this.dateValue.toString();
|
||||
}
|
||||
|
||||
public Date getTime() {
|
||||
return this.dateValue;
|
||||
}
|
||||
|
||||
public void setTimestamp(Timestamp value) {
|
||||
if (null == value) {
|
||||
this.stringValue = null;
|
||||
this.dateValue = null;
|
||||
return;
|
||||
}
|
||||
this.dateValue = new Date(value.getTime() + (value.getNanos() / 1000000));
|
||||
this.stringValue = this.dateValue.toString();
|
||||
}
|
||||
|
||||
public Date getTimestamp() {
|
||||
return this.dateValue;
|
||||
}
|
||||
|
||||
public void setBlob(Blob value) {
|
||||
this.blobValue = value;
|
||||
}
|
||||
|
||||
public Blob getBlob() {
|
||||
return this.blobValue;
|
||||
}
|
||||
|
||||
public void setClob(Clob value) {
|
||||
this.clobValue = value;
|
||||
}
|
||||
|
||||
public Clob getClob() {
|
||||
return this.clobValue;
|
||||
}
|
||||
}
|
51
hrmsEjb/wenrgise/ejb/common/helper/ScreenWrapper.java
Normal file
51
hrmsEjb/wenrgise/ejb/common/helper/ScreenWrapper.java
Normal file
@@ -0,0 +1,51 @@
|
||||
package wenrgise.ejb.common.helper;
|
||||
|
||||
import java.util.HashMap;
|
||||
import wenrgise.common.vo.BaseHeaderVO;
|
||||
import wenrgise.common.vo.BaseQueryVO;
|
||||
|
||||
public class ScreenWrapper {
|
||||
private BaseHeaderVO oBaseHeaderVO = null;
|
||||
|
||||
private BaseQueryVO oBaseQueryVO = null;
|
||||
|
||||
private HashMap oScreenMap = null;
|
||||
|
||||
private String forwardedPage = null;
|
||||
|
||||
public ScreenWrapper() {
|
||||
this.oScreenMap = new HashMap();
|
||||
}
|
||||
|
||||
public BaseHeaderVO getOBaseHeaderVO() {
|
||||
return this.oBaseHeaderVO;
|
||||
}
|
||||
|
||||
public void setOBaseHeaderVO(BaseHeaderVO newOBaseHeaderVO) {
|
||||
this.oBaseHeaderVO = newOBaseHeaderVO;
|
||||
}
|
||||
|
||||
public BaseQueryVO getOBaseQueryVO() {
|
||||
return this.oBaseQueryVO;
|
||||
}
|
||||
|
||||
public void setOBaseQueryVO(BaseQueryVO newOBaseQueryVO) {
|
||||
this.oBaseQueryVO = newOBaseQueryVO;
|
||||
}
|
||||
|
||||
public HashMap getOScreenMap() {
|
||||
return this.oScreenMap;
|
||||
}
|
||||
|
||||
public void setOScreenMap(HashMap newOScreenMap) {
|
||||
this.oScreenMap = newOScreenMap;
|
||||
}
|
||||
|
||||
public String getForwardedPage() {
|
||||
return this.forwardedPage;
|
||||
}
|
||||
|
||||
public void setForwardedPage(String newForwardedPage) {
|
||||
this.forwardedPage = newForwardedPage;
|
||||
}
|
||||
}
|
17
hrmsEjb/wenrgise/ejb/common/helper/SysadminSql.java
Normal file
17
hrmsEjb/wenrgise/ejb/common/helper/SysadminSql.java
Normal file
@@ -0,0 +1,17 @@
|
||||
package wenrgise.ejb.common.helper;
|
||||
|
||||
public class SysadminSql {
|
||||
public static final String GetDate = "SELECT sysdate FROM dual";
|
||||
|
||||
public static final String GlobalCodeHeader = "SELECT * FROM aaa_myself";
|
||||
|
||||
public static final String GlobalCodeHeaderCount = "SELECT count(*) as counter FROM aaa_myself";
|
||||
|
||||
public static final String GlobalCodeHeaderName = "SELECT * FROM aaa_myself WHERE name = ?";
|
||||
|
||||
public static final String GlobalCodeHeaderNameCount = "SELECT count(*) as counter FROM aaa_myself WHERE name = ?";
|
||||
|
||||
public static final String GlobalCodeHeaderSex = "SELECT * FROM aaa_myself WHERE sex = ?";
|
||||
|
||||
public static final String GlobalCodeHeaderNameSex = "SELECT * FROM aaa_myself WHERE name = ? AND sex = ?";
|
||||
}
|
Reference in New Issue
Block a user