实现高效易用的java操作mysql包装
2009-11-27 00:00:00 来源:WEB开发网申明参数接口
package dao;
public interface Parameters {
void Add(MySqlParameter parm);
int getLength();
MySqlParameter getParameter(int i);
}
实现该接口
package dao;
public class MySqlParameter {
private DBType type;
private int len;
public MySqlParameter(DBType type, int len, Object value) {
super();
this.type = type;
this.len = len;
this.value = value;
}
/**
* @return the type
*/
public DBType getType() {
return type;
}
/**
* @param type the type to set
*/
public void setType(DBType type) {
this.type = type;
}
/**
* @return the len
*/
public int getLen() {
return len;
}
/**
* @param len the len to set
*/
public void setLen(int len) {
this.len = len;
}
/**
* @return the value
*/
public Object getValue() {
return value;
}
/**
* @param value the value to set
*/
public void setValue(Object value) {
this.value = value;
}
private Object value;
}
更多精彩
赞助商链接