mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
refactor
This commit is contained in:
@@ -15,27 +15,59 @@
|
||||
*/
|
||||
package com.alibaba.druid.proxy.jdbc;
|
||||
|
||||
import java.util.Calendar;
|
||||
|
||||
/**
|
||||
* @author wenshao<szujobs@hotmail.com>
|
||||
*/
|
||||
public class JdbcParameter {
|
||||
|
||||
private final int sqlType;
|
||||
private final Object[] values;
|
||||
public static final int BinaryInputStream = 10001;
|
||||
public static final int AsciiInputStream = 10002;
|
||||
public static final int CharacterInputStream = 10003;
|
||||
public static final int NCharacterInputStream = 10004;
|
||||
public static final int URL = 10005;
|
||||
|
||||
public JdbcParameter(int sqlType, Object[] values){
|
||||
private final int sqlType;
|
||||
private final Object value;
|
||||
private final long length;
|
||||
private final Calendar calendar;
|
||||
|
||||
public JdbcParameter(int sqlType, Object value, long length, Calendar calendar){
|
||||
this.sqlType = sqlType;
|
||||
this.values = values;
|
||||
this.value = value;
|
||||
this.length = length;
|
||||
this.calendar = calendar;
|
||||
}
|
||||
|
||||
public JdbcParameter(int sqlType, Object value){
|
||||
this(sqlType, value, -1, null);
|
||||
}
|
||||
|
||||
public JdbcParameter(int sqlType, Object value, long length){
|
||||
this(sqlType, value, length, null);
|
||||
}
|
||||
|
||||
public JdbcParameter(int sqlType, Object value, Calendar calendar){
|
||||
this(sqlType, value, -1, calendar);
|
||||
}
|
||||
|
||||
public Object getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public long getLength() {
|
||||
return length;
|
||||
}
|
||||
|
||||
public Calendar getCalendar() {
|
||||
return calendar;
|
||||
}
|
||||
|
||||
public int getSqlType() {
|
||||
return sqlType;
|
||||
}
|
||||
|
||||
public Object[] getValues() {
|
||||
return values;
|
||||
}
|
||||
|
||||
public static interface TYPE {
|
||||
|
||||
public static final int BinaryInputStream = 10001;
|
||||
@@ -43,6 +75,8 @@ public class JdbcParameter {
|
||||
public static final int CharacterInputStream = 10003;
|
||||
public static final int NCharacterInputStream = 10004;
|
||||
public static final int URL = 10005;
|
||||
public static final int UnicodeStream = 10006;
|
||||
public static final int BYTES = 10007;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user