EntityFullFunc
This commit is contained in:
@@ -21,151 +21,341 @@ public interface DataResultSetRow {
|
|||||||
// 可以为空
|
// 可以为空
|
||||||
public @Nullable EntityInfo getEntityInfo();
|
public @Nullable EntityInfo getEntityInfo();
|
||||||
|
|
||||||
// columnIdex从1开始
|
/**
|
||||||
public Object getObject(int columnIdex);
|
* 根据字段序号获取字段值, index从1开始
|
||||||
|
*
|
||||||
|
* @param columnIndex 字段序号
|
||||||
|
* @return 字段值
|
||||||
|
*/
|
||||||
|
public Object getObject(int columnIndex);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据字段名获取字段值
|
||||||
|
*
|
||||||
|
* @param columnLabel 字段名
|
||||||
|
* @return 字段值
|
||||||
|
*/
|
||||||
public Object getObject(String columnLabel);
|
public Object getObject(String columnLabel);
|
||||||
|
|
||||||
// columnIdex从1开始
|
/**
|
||||||
|
* 根据字段序号获取字段值, index从1开始
|
||||||
|
*
|
||||||
|
* @param <T> 泛型
|
||||||
|
* @param attr Attribute
|
||||||
|
* @param columnIndex 字段序号
|
||||||
|
* @param columnLabel 字段名
|
||||||
|
* @return 字段值
|
||||||
|
*/
|
||||||
default <T> Serializable getObject(Attribute<T, Serializable> attr, int columnIndex, String columnLabel) {
|
default <T> Serializable getObject(Attribute<T, Serializable> attr, int columnIndex, String columnLabel) {
|
||||||
return DataResultSet.getRowColumnValue(this, attr, columnIndex, columnLabel);
|
return DataResultSet.getRowColumnValue(this, attr, columnIndex, columnLabel);
|
||||||
}
|
}
|
||||||
|
|
||||||
// columnIdex从1开始
|
/**
|
||||||
|
* 根据字段序号获取字段值, index从1开始
|
||||||
|
*
|
||||||
|
* @param columnIndex 字段序号
|
||||||
|
* @return 字段值
|
||||||
|
*/
|
||||||
@ClassDepends
|
@ClassDepends
|
||||||
public String getString(int columnIdex);
|
public String getString(int columnIndex);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据字段名获取字段值
|
||||||
|
*
|
||||||
|
* @param columnLabel 字段名
|
||||||
|
* @return 字段值
|
||||||
|
*/
|
||||||
@ClassDepends
|
@ClassDepends
|
||||||
public String getString(String columnLabel);
|
public String getString(String columnLabel);
|
||||||
|
/**
|
||||||
// columnIdex从1开始
|
* 根据字段序号获取字段值, index从1开始
|
||||||
|
*
|
||||||
|
* @param columnIndex 字段序号
|
||||||
|
* @return 字段值
|
||||||
|
*/
|
||||||
@ClassDepends
|
@ClassDepends
|
||||||
public byte[] getBytes(int columnIdex);
|
public byte[] getBytes(int columnIndex);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据字段名获取字段值
|
||||||
|
*
|
||||||
|
* @param columnLabel 字段名
|
||||||
|
* @return 字段值
|
||||||
|
*/
|
||||||
@ClassDepends
|
@ClassDepends
|
||||||
public byte[] getBytes(String columnLabel);
|
public byte[] getBytes(String columnLabel);
|
||||||
|
|
||||||
// columnIdex从1开始
|
/**
|
||||||
|
* 根据字段序号获取字段值, index从1开始
|
||||||
|
*
|
||||||
|
* @param columnIndex 字段序号
|
||||||
|
* @return 字段值
|
||||||
|
*/
|
||||||
@ClassDepends
|
@ClassDepends
|
||||||
public BigDecimal getBigDecimal(int columnIdex);
|
public BigDecimal getBigDecimal(int columnIndex);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据字段名获取字段值
|
||||||
|
*
|
||||||
|
* @param columnLabel 字段名
|
||||||
|
* @return 字段值
|
||||||
|
*/
|
||||||
@ClassDepends
|
@ClassDepends
|
||||||
public BigDecimal getBigDecimal(String columnLabel);
|
public BigDecimal getBigDecimal(String columnLabel);
|
||||||
|
|
||||||
// columnIdex从1开始
|
/**
|
||||||
|
* 根据字段序号获取字段值, index从1开始
|
||||||
|
*
|
||||||
|
* @param columnIndex 字段序号
|
||||||
|
* @return 字段值
|
||||||
|
*/
|
||||||
@ClassDepends
|
@ClassDepends
|
||||||
public Boolean getBoolean(int columnIdex);
|
public Boolean getBoolean(int columnIndex);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据字段名获取字段值
|
||||||
|
*
|
||||||
|
* @param columnLabel 字段名
|
||||||
|
* @return 字段值
|
||||||
|
*/
|
||||||
@ClassDepends
|
@ClassDepends
|
||||||
public Boolean getBoolean(String columnLabel);
|
public Boolean getBoolean(String columnLabel);
|
||||||
|
|
||||||
// columnIdex从1开始
|
/**
|
||||||
|
* 根据字段序号获取字段值, index从1开始
|
||||||
|
*
|
||||||
|
* @param columnIndex 字段序号
|
||||||
|
* @return 字段值
|
||||||
|
*/
|
||||||
@ClassDepends
|
@ClassDepends
|
||||||
public Short getShort(int columnIdex);
|
public Short getShort(int columnIndex);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据字段名获取字段值
|
||||||
|
*
|
||||||
|
* @param columnLabel 字段名
|
||||||
|
* @return 字段值
|
||||||
|
*/
|
||||||
@ClassDepends
|
@ClassDepends
|
||||||
public Short getShort(String columnLabel);
|
public Short getShort(String columnLabel);
|
||||||
|
|
||||||
// columnIdex从1开始
|
/**
|
||||||
|
* 根据字段序号获取字段值, index从1开始
|
||||||
|
*
|
||||||
|
* @param columnIndex 字段序号
|
||||||
|
* @return 字段值
|
||||||
|
*/
|
||||||
@ClassDepends
|
@ClassDepends
|
||||||
public Integer getInteger(int columnIdex);
|
public Integer getInteger(int columnIndex);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据字段名获取字段值
|
||||||
|
*
|
||||||
|
* @param columnLabel 字段名
|
||||||
|
* @return 字段值
|
||||||
|
*/
|
||||||
@ClassDepends
|
@ClassDepends
|
||||||
public Integer getInteger(String columnLabel);
|
public Integer getInteger(String columnLabel);
|
||||||
|
|
||||||
// columnIdex从1开始
|
/**
|
||||||
|
* 根据字段序号获取字段值, index从1开始
|
||||||
|
*
|
||||||
|
* @param columnIndex 字段序号
|
||||||
|
* @return 字段值
|
||||||
|
*/
|
||||||
@ClassDepends
|
@ClassDepends
|
||||||
public Float getFloat(int columnIdex);
|
public Float getFloat(int columnIndex);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据字段名获取字段值
|
||||||
|
*
|
||||||
|
* @param columnLabel 字段名
|
||||||
|
* @return 字段值
|
||||||
|
*/
|
||||||
@ClassDepends
|
@ClassDepends
|
||||||
public Float getFloat(String columnLabel);
|
public Float getFloat(String columnLabel);
|
||||||
|
|
||||||
// columnIdex从1开始
|
/**
|
||||||
|
* 根据字段序号获取字段值, index从1开始
|
||||||
|
*
|
||||||
|
* @param columnIndex 字段序号
|
||||||
|
* @return 字段值
|
||||||
|
*/
|
||||||
@ClassDepends
|
@ClassDepends
|
||||||
public Long getLong(int columnIdex);
|
public Long getLong(int columnIndex);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据字段名获取字段值
|
||||||
|
*
|
||||||
|
* @param columnLabel 字段名
|
||||||
|
* @return 字段值
|
||||||
|
*/
|
||||||
@ClassDepends
|
@ClassDepends
|
||||||
public Long getLong(String columnLabel);
|
public Long getLong(String columnLabel);
|
||||||
|
|
||||||
// columnIdex从1开始
|
/**
|
||||||
|
* 根据字段序号获取字段值, index从1开始
|
||||||
|
*
|
||||||
|
* @param columnIndex 字段序号
|
||||||
|
* @return 字段值
|
||||||
|
*/
|
||||||
@ClassDepends
|
@ClassDepends
|
||||||
public Double getDouble(int columnIdex);
|
public Double getDouble(int columnIndex);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据字段名获取字段值
|
||||||
|
*
|
||||||
|
* @param columnLabel 字段名
|
||||||
|
* @return 字段值
|
||||||
|
*/
|
||||||
@ClassDepends
|
@ClassDepends
|
||||||
public Double getDouble(String columnLabel);
|
public Double getDouble(String columnLabel);
|
||||||
|
|
||||||
// columnIdex从1开始
|
/**
|
||||||
|
* 根据字段序号获取字段值, index从1开始
|
||||||
|
*
|
||||||
|
* @param columnIndex 字段序号
|
||||||
|
* @param defValue 默认值
|
||||||
|
* @return 字段值
|
||||||
|
*/
|
||||||
@ClassDepends
|
@ClassDepends
|
||||||
default boolean getBoolean(int columnIdex, boolean defValue) {
|
default boolean getBoolean(int columnIndex, boolean defValue) {
|
||||||
Boolean val = getBoolean(columnIdex);
|
Boolean val = getBoolean(columnIndex);
|
||||||
return val == null ? defValue : val;
|
return val == null ? defValue : val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据字段名获取字段值
|
||||||
|
*
|
||||||
|
* @param columnLabel 字段名
|
||||||
|
* @param defValue 默认值
|
||||||
|
* @return 字段值
|
||||||
|
*/
|
||||||
@ClassDepends
|
@ClassDepends
|
||||||
default boolean getBoolean(String columnLabel, boolean defValue) {
|
default boolean getBoolean(String columnLabel, boolean defValue) {
|
||||||
Boolean val = getBoolean(columnLabel);
|
Boolean val = getBoolean(columnLabel);
|
||||||
return val == null ? defValue : val;
|
return val == null ? defValue : val;
|
||||||
}
|
}
|
||||||
|
|
||||||
// columnIdex从1开始
|
/**
|
||||||
|
* 根据字段序号获取字段值, index从1开始
|
||||||
|
*
|
||||||
|
* @param columnIndex 字段序号
|
||||||
|
* @param defValue 默认值
|
||||||
|
* @return 字段值
|
||||||
|
*/
|
||||||
@ClassDepends
|
@ClassDepends
|
||||||
default short getShort(int columnIdex, short defValue) {
|
default short getShort(int columnIndex, short defValue) {
|
||||||
Short val = getShort(columnIdex);
|
Short val = getShort(columnIndex);
|
||||||
return val == null ? defValue : val;
|
return val == null ? defValue : val;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 根据字段名获取字段值
|
||||||
|
*
|
||||||
|
* @param columnLabel 字段名
|
||||||
|
* @param defValue 默认值
|
||||||
|
* @return 字段值
|
||||||
|
*/
|
||||||
@ClassDepends
|
@ClassDepends
|
||||||
default short getShort(String columnLabel, short defValue) {
|
default short getShort(String columnLabel, short defValue) {
|
||||||
Short val = getShort(columnLabel);
|
Short val = getShort(columnLabel);
|
||||||
return val == null ? defValue : val;
|
return val == null ? defValue : val;
|
||||||
}
|
}
|
||||||
|
|
||||||
// columnIdex从1开始
|
/**
|
||||||
|
* 根据字段序号获取字段值, index从1开始
|
||||||
|
*
|
||||||
|
* @param columnIndex 字段序号
|
||||||
|
* @param defValue 默认值
|
||||||
|
* @return 字段值
|
||||||
|
*/
|
||||||
@ClassDepends
|
@ClassDepends
|
||||||
default int getInteger(int columnIdex, int defValue) {
|
default int getInteger(int columnIndex, int defValue) {
|
||||||
Integer val = getInteger(columnIdex);
|
Integer val = getInteger(columnIndex);
|
||||||
return val == null ? defValue : val;
|
return val == null ? defValue : val;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 根据字段名获取字段值
|
||||||
|
*
|
||||||
|
* @param columnLabel 字段名
|
||||||
|
* @param defValue 默认值
|
||||||
|
* @return 字段值
|
||||||
|
*/
|
||||||
@ClassDepends
|
@ClassDepends
|
||||||
default int getInteger(String columnLabel, int defValue) {
|
default int getInteger(String columnLabel, int defValue) {
|
||||||
Integer val = getInteger(columnLabel);
|
Integer val = getInteger(columnLabel);
|
||||||
return val == null ? defValue : val;
|
return val == null ? defValue : val;
|
||||||
}
|
}
|
||||||
|
|
||||||
// columnIdex从1开始
|
/**
|
||||||
|
* 根据字段序号获取字段值, index从1开始
|
||||||
|
*
|
||||||
|
* @param columnIndex 字段序号
|
||||||
|
* @param defValue 默认值
|
||||||
|
* @return 字段值
|
||||||
|
*/
|
||||||
@ClassDepends
|
@ClassDepends
|
||||||
default float getFloat(int columnIdex, float defValue) {
|
default float getFloat(int columnIndex, float defValue) {
|
||||||
Float val = getFloat(columnIdex);
|
Float val = getFloat(columnIndex);
|
||||||
return val == null ? defValue : val;
|
return val == null ? defValue : val;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 根据字段名获取字段值
|
||||||
|
*
|
||||||
|
* @param columnLabel 字段名
|
||||||
|
* @param defValue 默认值
|
||||||
|
* @return 字段值
|
||||||
|
*/
|
||||||
@ClassDepends
|
@ClassDepends
|
||||||
default float getFloat(String columnLabel, float defValue) {
|
default float getFloat(String columnLabel, float defValue) {
|
||||||
Float val = getFloat(columnLabel);
|
Float val = getFloat(columnLabel);
|
||||||
return val == null ? defValue : val;
|
return val == null ? defValue : val;
|
||||||
}
|
}
|
||||||
|
|
||||||
// columnIdex从1开始
|
/**
|
||||||
|
* 根据字段序号获取字段值, index从1开始
|
||||||
|
*
|
||||||
|
* @param columnIndex 字段序号
|
||||||
|
* @param defValue 默认值
|
||||||
|
* @return 字段值
|
||||||
|
*/
|
||||||
@ClassDepends
|
@ClassDepends
|
||||||
default long getLong(int columnIdex, long defValue) {
|
default long getLong(int columnIndex, long defValue) {
|
||||||
Long val = getLong(columnIdex);
|
Long val = getLong(columnIndex);
|
||||||
return val == null ? defValue : val;
|
return val == null ? defValue : val;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 根据字段名获取字段值
|
||||||
|
*
|
||||||
|
* @param columnLabel 字段名
|
||||||
|
* @param defValue 默认值
|
||||||
|
* @return 字段值
|
||||||
|
*/
|
||||||
@ClassDepends
|
@ClassDepends
|
||||||
default long getLong(String columnLabel, long defValue) {
|
default long getLong(String columnLabel, long defValue) {
|
||||||
Long val = getLong(columnLabel);
|
Long val = getLong(columnLabel);
|
||||||
return val == null ? defValue : val;
|
return val == null ? defValue : val;
|
||||||
}
|
}
|
||||||
|
|
||||||
// columnIdex从1开始
|
/**
|
||||||
|
* 根据字段序号获取字段值, index从1开始
|
||||||
|
*
|
||||||
|
* @param columnIndex 字段序号
|
||||||
|
* @param defValue 默认值
|
||||||
|
* @return 字段值
|
||||||
|
*/
|
||||||
@ClassDepends
|
@ClassDepends
|
||||||
default double getDouble(int columnIdex, double defValue) {
|
default double getDouble(int columnIndex, double defValue) {
|
||||||
Double val = getDouble(columnIdex);
|
Double val = getDouble(columnIndex);
|
||||||
return val == null ? defValue : val;
|
return val == null ? defValue : val;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 根据字段名获取字段值
|
||||||
|
*
|
||||||
|
* @param columnLabel 字段名
|
||||||
|
* @param defValue 默认值
|
||||||
|
* @return 字段值
|
||||||
|
*/
|
||||||
@ClassDepends
|
@ClassDepends
|
||||||
default double getDouble(String columnLabel, double defValue) {
|
default double getDouble(String columnLabel, double defValue) {
|
||||||
Double val = getDouble(columnLabel);
|
Double val = getDouble(columnLabel);
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ public abstract class EntityFullFunc<T> {
|
|||||||
mv.visitVarInsn(ASTORE, 2);
|
mv.visitVarInsn(ASTORE, 2);
|
||||||
|
|
||||||
for (int i = 0; i < attrs.length; i++) {
|
for (int i = 0; i < attrs.length; i++) {
|
||||||
final int attrIndex = i;
|
final int colIndex = i + 1;
|
||||||
final Attribute<T, Serializable> attr = attrs[i];
|
final Attribute<T, Serializable> attr = attrs[i];
|
||||||
java.lang.reflect.Method setter = null;
|
java.lang.reflect.Method setter = null;
|
||||||
java.lang.reflect.Field field = null;
|
java.lang.reflect.Field field = null;
|
||||||
@@ -170,7 +170,7 @@ public abstract class EntityFullFunc<T> {
|
|||||||
String desc = Type.getMethodDescriptor(setter);
|
String desc = Type.getMethodDescriptor(setter);
|
||||||
mv.visitVarInsn(ALOAD, 2); // obj
|
mv.visitVarInsn(ALOAD, 2); // obj
|
||||||
mv.visitVarInsn(ALOAD, 1); // row
|
mv.visitVarInsn(ALOAD, 1); // row
|
||||||
Asms.visitInsn(mv, attrIndex);
|
Asms.visitInsn(mv, colIndex);
|
||||||
mv.visitInsn(ICONST_0);
|
mv.visitInsn(ICONST_0);
|
||||||
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getBoolean", "(IZ)Z", true);
|
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getBoolean", "(IZ)Z", true);
|
||||||
mv.visitMethodInsn(INVOKEVIRTUAL, entityName, setter.getName(), desc, false);
|
mv.visitMethodInsn(INVOKEVIRTUAL, entityName, setter.getName(), desc, false);
|
||||||
@@ -178,7 +178,7 @@ public abstract class EntityFullFunc<T> {
|
|||||||
} else if (field != null) {
|
} else if (field != null) {
|
||||||
mv.visitVarInsn(ALOAD, 2); // obj
|
mv.visitVarInsn(ALOAD, 2); // obj
|
||||||
mv.visitVarInsn(ALOAD, 1); // row
|
mv.visitVarInsn(ALOAD, 1); // row
|
||||||
Asms.visitInsn(mv, attrIndex);
|
Asms.visitInsn(mv, colIndex);
|
||||||
mv.visitInsn(ICONST_0);
|
mv.visitInsn(ICONST_0);
|
||||||
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getBoolean", "(IZ)Z", true);
|
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getBoolean", "(IZ)Z", true);
|
||||||
mv.visitFieldInsn(PUTFIELD, entityName, field.getName(), "Z");
|
mv.visitFieldInsn(PUTFIELD, entityName, field.getName(), "Z");
|
||||||
@@ -189,7 +189,7 @@ public abstract class EntityFullFunc<T> {
|
|||||||
String desc = Type.getMethodDescriptor(setter);
|
String desc = Type.getMethodDescriptor(setter);
|
||||||
mv.visitVarInsn(ALOAD, 2); // obj
|
mv.visitVarInsn(ALOAD, 2); // obj
|
||||||
mv.visitVarInsn(ALOAD, 1); // row
|
mv.visitVarInsn(ALOAD, 1); // row
|
||||||
Asms.visitInsn(mv, attrIndex);
|
Asms.visitInsn(mv, colIndex);
|
||||||
mv.visitInsn(ICONST_0);
|
mv.visitInsn(ICONST_0);
|
||||||
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getShort", "(IS)S", true);
|
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getShort", "(IS)S", true);
|
||||||
mv.visitMethodInsn(INVOKEVIRTUAL, entityName, setter.getName(), desc, false);
|
mv.visitMethodInsn(INVOKEVIRTUAL, entityName, setter.getName(), desc, false);
|
||||||
@@ -197,7 +197,7 @@ public abstract class EntityFullFunc<T> {
|
|||||||
} else if (field != null) {
|
} else if (field != null) {
|
||||||
mv.visitVarInsn(ALOAD, 2); // obj
|
mv.visitVarInsn(ALOAD, 2); // obj
|
||||||
mv.visitVarInsn(ALOAD, 1); // row
|
mv.visitVarInsn(ALOAD, 1); // row
|
||||||
Asms.visitInsn(mv, attrIndex);
|
Asms.visitInsn(mv, colIndex);
|
||||||
mv.visitInsn(ICONST_0);
|
mv.visitInsn(ICONST_0);
|
||||||
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getShort", "(IS)S", true);
|
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getShort", "(IS)S", true);
|
||||||
mv.visitFieldInsn(PUTFIELD, entityName, field.getName(), "S");
|
mv.visitFieldInsn(PUTFIELD, entityName, field.getName(), "S");
|
||||||
@@ -208,7 +208,7 @@ public abstract class EntityFullFunc<T> {
|
|||||||
String desc = Type.getMethodDescriptor(setter);
|
String desc = Type.getMethodDescriptor(setter);
|
||||||
mv.visitVarInsn(ALOAD, 2); // obj
|
mv.visitVarInsn(ALOAD, 2); // obj
|
||||||
mv.visitVarInsn(ALOAD, 1); // row
|
mv.visitVarInsn(ALOAD, 1); // row
|
||||||
Asms.visitInsn(mv, attrIndex);
|
Asms.visitInsn(mv, colIndex);
|
||||||
mv.visitInsn(ICONST_0);
|
mv.visitInsn(ICONST_0);
|
||||||
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getInteger", "(II)I", true);
|
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getInteger", "(II)I", true);
|
||||||
mv.visitMethodInsn(INVOKEVIRTUAL, entityName, setter.getName(), desc, false);
|
mv.visitMethodInsn(INVOKEVIRTUAL, entityName, setter.getName(), desc, false);
|
||||||
@@ -216,7 +216,7 @@ public abstract class EntityFullFunc<T> {
|
|||||||
} else if (field != null) {
|
} else if (field != null) {
|
||||||
mv.visitVarInsn(ALOAD, 2); // obj
|
mv.visitVarInsn(ALOAD, 2); // obj
|
||||||
mv.visitVarInsn(ALOAD, 1); // row
|
mv.visitVarInsn(ALOAD, 1); // row
|
||||||
Asms.visitInsn(mv, attrIndex);
|
Asms.visitInsn(mv, colIndex);
|
||||||
mv.visitInsn(ICONST_0);
|
mv.visitInsn(ICONST_0);
|
||||||
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getInteger", "(II)I", true);
|
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getInteger", "(II)I", true);
|
||||||
mv.visitFieldInsn(PUTFIELD, entityName, field.getName(), "I");
|
mv.visitFieldInsn(PUTFIELD, entityName, field.getName(), "I");
|
||||||
@@ -227,7 +227,7 @@ public abstract class EntityFullFunc<T> {
|
|||||||
String desc = Type.getMethodDescriptor(setter);
|
String desc = Type.getMethodDescriptor(setter);
|
||||||
mv.visitVarInsn(ALOAD, 2); // obj
|
mv.visitVarInsn(ALOAD, 2); // obj
|
||||||
mv.visitVarInsn(ALOAD, 1); // row
|
mv.visitVarInsn(ALOAD, 1); // row
|
||||||
Asms.visitInsn(mv, attrIndex);
|
Asms.visitInsn(mv, colIndex);
|
||||||
mv.visitInsn(FCONST_0);
|
mv.visitInsn(FCONST_0);
|
||||||
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getFloat", "(IF)F", true);
|
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getFloat", "(IF)F", true);
|
||||||
mv.visitMethodInsn(INVOKEVIRTUAL, entityName, setter.getName(), desc, false);
|
mv.visitMethodInsn(INVOKEVIRTUAL, entityName, setter.getName(), desc, false);
|
||||||
@@ -235,7 +235,7 @@ public abstract class EntityFullFunc<T> {
|
|||||||
} else if (field != null) {
|
} else if (field != null) {
|
||||||
mv.visitVarInsn(ALOAD, 2); // obj
|
mv.visitVarInsn(ALOAD, 2); // obj
|
||||||
mv.visitVarInsn(ALOAD, 1); // row
|
mv.visitVarInsn(ALOAD, 1); // row
|
||||||
Asms.visitInsn(mv, attrIndex);
|
Asms.visitInsn(mv, colIndex);
|
||||||
mv.visitInsn(FCONST_0);
|
mv.visitInsn(FCONST_0);
|
||||||
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getFloat", "(IF)F", true);
|
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getFloat", "(IF)F", true);
|
||||||
mv.visitFieldInsn(PUTFIELD, entityName, field.getName(), "F");
|
mv.visitFieldInsn(PUTFIELD, entityName, field.getName(), "F");
|
||||||
@@ -246,7 +246,7 @@ public abstract class EntityFullFunc<T> {
|
|||||||
String desc = Type.getMethodDescriptor(setter);
|
String desc = Type.getMethodDescriptor(setter);
|
||||||
mv.visitVarInsn(ALOAD, 2); // obj
|
mv.visitVarInsn(ALOAD, 2); // obj
|
||||||
mv.visitVarInsn(ALOAD, 1); // row
|
mv.visitVarInsn(ALOAD, 1); // row
|
||||||
Asms.visitInsn(mv, attrIndex);
|
Asms.visitInsn(mv, colIndex);
|
||||||
mv.visitInsn(LCONST_0);
|
mv.visitInsn(LCONST_0);
|
||||||
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getLong", "(IJ)J", true);
|
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getLong", "(IJ)J", true);
|
||||||
mv.visitMethodInsn(INVOKEVIRTUAL, entityName, setter.getName(), desc, false);
|
mv.visitMethodInsn(INVOKEVIRTUAL, entityName, setter.getName(), desc, false);
|
||||||
@@ -254,7 +254,7 @@ public abstract class EntityFullFunc<T> {
|
|||||||
} else if (field != null) {
|
} else if (field != null) {
|
||||||
mv.visitVarInsn(ALOAD, 2); // obj
|
mv.visitVarInsn(ALOAD, 2); // obj
|
||||||
mv.visitVarInsn(ALOAD, 1); // row
|
mv.visitVarInsn(ALOAD, 1); // row
|
||||||
Asms.visitInsn(mv, attrIndex);
|
Asms.visitInsn(mv, colIndex);
|
||||||
mv.visitInsn(LCONST_0);
|
mv.visitInsn(LCONST_0);
|
||||||
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getLong", "(IJ)J", true);
|
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getLong", "(IJ)J", true);
|
||||||
mv.visitFieldInsn(PUTFIELD, entityName, field.getName(), "J");
|
mv.visitFieldInsn(PUTFIELD, entityName, field.getName(), "J");
|
||||||
@@ -265,7 +265,7 @@ public abstract class EntityFullFunc<T> {
|
|||||||
String desc = Type.getMethodDescriptor(setter);
|
String desc = Type.getMethodDescriptor(setter);
|
||||||
mv.visitVarInsn(ALOAD, 2); // obj
|
mv.visitVarInsn(ALOAD, 2); // obj
|
||||||
mv.visitVarInsn(ALOAD, 1); // row
|
mv.visitVarInsn(ALOAD, 1); // row
|
||||||
Asms.visitInsn(mv, attrIndex);
|
Asms.visitInsn(mv, colIndex);
|
||||||
mv.visitInsn(DCONST_0);
|
mv.visitInsn(DCONST_0);
|
||||||
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getDouble", "(ID)D", true);
|
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getDouble", "(ID)D", true);
|
||||||
mv.visitMethodInsn(INVOKEVIRTUAL, entityName, setter.getName(), desc, false);
|
mv.visitMethodInsn(INVOKEVIRTUAL, entityName, setter.getName(), desc, false);
|
||||||
@@ -273,7 +273,7 @@ public abstract class EntityFullFunc<T> {
|
|||||||
} else if (field != null) {
|
} else if (field != null) {
|
||||||
mv.visitVarInsn(ALOAD, 2); // obj
|
mv.visitVarInsn(ALOAD, 2); // obj
|
||||||
mv.visitVarInsn(ALOAD, 1); // row
|
mv.visitVarInsn(ALOAD, 1); // row
|
||||||
Asms.visitInsn(mv, attrIndex);
|
Asms.visitInsn(mv, colIndex);
|
||||||
mv.visitInsn(DCONST_0);
|
mv.visitInsn(DCONST_0);
|
||||||
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getDouble", "(ID)D", true);
|
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getDouble", "(ID)D", true);
|
||||||
mv.visitFieldInsn(PUTFIELD, entityName, field.getName(), "D");
|
mv.visitFieldInsn(PUTFIELD, entityName, field.getName(), "D");
|
||||||
@@ -284,14 +284,14 @@ public abstract class EntityFullFunc<T> {
|
|||||||
String desc = Type.getMethodDescriptor(setter);
|
String desc = Type.getMethodDescriptor(setter);
|
||||||
mv.visitVarInsn(ALOAD, 2); // obj
|
mv.visitVarInsn(ALOAD, 2); // obj
|
||||||
mv.visitVarInsn(ALOAD, 1); // row
|
mv.visitVarInsn(ALOAD, 1); // row
|
||||||
Asms.visitInsn(mv, attrIndex);
|
Asms.visitInsn(mv, colIndex);
|
||||||
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getBoolean", "(I)Ljava/lang/Boolean;", true);
|
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getBoolean", "(I)Ljava/lang/Boolean;", true);
|
||||||
mv.visitMethodInsn(INVOKEVIRTUAL, entityName, setter.getName(), desc, false);
|
mv.visitMethodInsn(INVOKEVIRTUAL, entityName, setter.getName(), desc, false);
|
||||||
continue;
|
continue;
|
||||||
} else if (field != null) {
|
} else if (field != null) {
|
||||||
mv.visitVarInsn(ALOAD, 2); // obj
|
mv.visitVarInsn(ALOAD, 2); // obj
|
||||||
mv.visitVarInsn(ALOAD, 1); // row
|
mv.visitVarInsn(ALOAD, 1); // row
|
||||||
Asms.visitInsn(mv, attrIndex);
|
Asms.visitInsn(mv, colIndex);
|
||||||
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getBoolean", "(I)Ljava/lang/Boolean;", true);
|
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getBoolean", "(I)Ljava/lang/Boolean;", true);
|
||||||
mv.visitFieldInsn(PUTFIELD, entityName, field.getName(), "Ljava/lang/Boolean;");
|
mv.visitFieldInsn(PUTFIELD, entityName, field.getName(), "Ljava/lang/Boolean;");
|
||||||
continue;
|
continue;
|
||||||
@@ -301,14 +301,14 @@ public abstract class EntityFullFunc<T> {
|
|||||||
String desc = Type.getMethodDescriptor(setter);
|
String desc = Type.getMethodDescriptor(setter);
|
||||||
mv.visitVarInsn(ALOAD, 2); // obj
|
mv.visitVarInsn(ALOAD, 2); // obj
|
||||||
mv.visitVarInsn(ALOAD, 1); // row
|
mv.visitVarInsn(ALOAD, 1); // row
|
||||||
Asms.visitInsn(mv, attrIndex);
|
Asms.visitInsn(mv, colIndex);
|
||||||
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getShort", "(I)Ljava/lang/Short;", true);
|
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getShort", "(I)Ljava/lang/Short;", true);
|
||||||
mv.visitMethodInsn(INVOKEVIRTUAL, entityName, setter.getName(), desc, false);
|
mv.visitMethodInsn(INVOKEVIRTUAL, entityName, setter.getName(), desc, false);
|
||||||
continue;
|
continue;
|
||||||
} else if (field != null) {
|
} else if (field != null) {
|
||||||
mv.visitVarInsn(ALOAD, 2); // obj
|
mv.visitVarInsn(ALOAD, 2); // obj
|
||||||
mv.visitVarInsn(ALOAD, 1); // row
|
mv.visitVarInsn(ALOAD, 1); // row
|
||||||
Asms.visitInsn(mv, attrIndex);
|
Asms.visitInsn(mv, colIndex);
|
||||||
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getShort", "(I)Ljava/lang/Short;", true);
|
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getShort", "(I)Ljava/lang/Short;", true);
|
||||||
mv.visitFieldInsn(PUTFIELD, entityName, field.getName(), "Ljava/lang/Short;");
|
mv.visitFieldInsn(PUTFIELD, entityName, field.getName(), "Ljava/lang/Short;");
|
||||||
continue;
|
continue;
|
||||||
@@ -318,14 +318,14 @@ public abstract class EntityFullFunc<T> {
|
|||||||
String desc = Type.getMethodDescriptor(setter);
|
String desc = Type.getMethodDescriptor(setter);
|
||||||
mv.visitVarInsn(ALOAD, 2); // obj
|
mv.visitVarInsn(ALOAD, 2); // obj
|
||||||
mv.visitVarInsn(ALOAD, 1); // row
|
mv.visitVarInsn(ALOAD, 1); // row
|
||||||
Asms.visitInsn(mv, attrIndex);
|
Asms.visitInsn(mv, colIndex);
|
||||||
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getInteger", "(I)Ljava/lang/Integer;", true);
|
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getInteger", "(I)Ljava/lang/Integer;", true);
|
||||||
mv.visitMethodInsn(INVOKEVIRTUAL, entityName, setter.getName(), desc, false);
|
mv.visitMethodInsn(INVOKEVIRTUAL, entityName, setter.getName(), desc, false);
|
||||||
continue;
|
continue;
|
||||||
} else if (field != null) {
|
} else if (field != null) {
|
||||||
mv.visitVarInsn(ALOAD, 2); // obj
|
mv.visitVarInsn(ALOAD, 2); // obj
|
||||||
mv.visitVarInsn(ALOAD, 1); // row
|
mv.visitVarInsn(ALOAD, 1); // row
|
||||||
Asms.visitInsn(mv, attrIndex);
|
Asms.visitInsn(mv, colIndex);
|
||||||
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getInteger", "(I)Ljava/lang/Integer;", true);
|
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getInteger", "(I)Ljava/lang/Integer;", true);
|
||||||
mv.visitFieldInsn(PUTFIELD, entityName, field.getName(), "Ljava/lang/Integer;");
|
mv.visitFieldInsn(PUTFIELD, entityName, field.getName(), "Ljava/lang/Integer;");
|
||||||
continue;
|
continue;
|
||||||
@@ -335,14 +335,14 @@ public abstract class EntityFullFunc<T> {
|
|||||||
String desc = Type.getMethodDescriptor(setter);
|
String desc = Type.getMethodDescriptor(setter);
|
||||||
mv.visitVarInsn(ALOAD, 2); // obj
|
mv.visitVarInsn(ALOAD, 2); // obj
|
||||||
mv.visitVarInsn(ALOAD, 1); // row
|
mv.visitVarInsn(ALOAD, 1); // row
|
||||||
Asms.visitInsn(mv, attrIndex);
|
Asms.visitInsn(mv, colIndex);
|
||||||
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getFloat", "(I)Ljava/lang/Float;", true);
|
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getFloat", "(I)Ljava/lang/Float;", true);
|
||||||
mv.visitMethodInsn(INVOKEVIRTUAL, entityName, setter.getName(), desc, false);
|
mv.visitMethodInsn(INVOKEVIRTUAL, entityName, setter.getName(), desc, false);
|
||||||
continue;
|
continue;
|
||||||
} else if (field != null) {
|
} else if (field != null) {
|
||||||
mv.visitVarInsn(ALOAD, 2); // obj
|
mv.visitVarInsn(ALOAD, 2); // obj
|
||||||
mv.visitVarInsn(ALOAD, 1); // row
|
mv.visitVarInsn(ALOAD, 1); // row
|
||||||
Asms.visitInsn(mv, attrIndex);
|
Asms.visitInsn(mv, colIndex);
|
||||||
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getFloat", "(I)Ljava/lang/Float;", true);
|
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getFloat", "(I)Ljava/lang/Float;", true);
|
||||||
mv.visitFieldInsn(PUTFIELD, entityName, field.getName(), "Ljava/lang/Float;");
|
mv.visitFieldInsn(PUTFIELD, entityName, field.getName(), "Ljava/lang/Float;");
|
||||||
continue;
|
continue;
|
||||||
@@ -352,14 +352,14 @@ public abstract class EntityFullFunc<T> {
|
|||||||
String desc = Type.getMethodDescriptor(setter);
|
String desc = Type.getMethodDescriptor(setter);
|
||||||
mv.visitVarInsn(ALOAD, 2); // obj
|
mv.visitVarInsn(ALOAD, 2); // obj
|
||||||
mv.visitVarInsn(ALOAD, 1); // row
|
mv.visitVarInsn(ALOAD, 1); // row
|
||||||
Asms.visitInsn(mv, attrIndex);
|
Asms.visitInsn(mv, colIndex);
|
||||||
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getLong", "(I)Ljava/lang/Long;", true);
|
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getLong", "(I)Ljava/lang/Long;", true);
|
||||||
mv.visitMethodInsn(INVOKEVIRTUAL, entityName, setter.getName(), desc, false);
|
mv.visitMethodInsn(INVOKEVIRTUAL, entityName, setter.getName(), desc, false);
|
||||||
continue;
|
continue;
|
||||||
} else if (field != null) {
|
} else if (field != null) {
|
||||||
mv.visitVarInsn(ALOAD, 2); // obj
|
mv.visitVarInsn(ALOAD, 2); // obj
|
||||||
mv.visitVarInsn(ALOAD, 1); // row
|
mv.visitVarInsn(ALOAD, 1); // row
|
||||||
Asms.visitInsn(mv, attrIndex);
|
Asms.visitInsn(mv, colIndex);
|
||||||
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getLong", "(I)Ljava/lang/Long;", true);
|
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getLong", "(I)Ljava/lang/Long;", true);
|
||||||
mv.visitFieldInsn(PUTFIELD, entityName, field.getName(), "Ljava/lang/Long;");
|
mv.visitFieldInsn(PUTFIELD, entityName, field.getName(), "Ljava/lang/Long;");
|
||||||
continue;
|
continue;
|
||||||
@@ -369,14 +369,14 @@ public abstract class EntityFullFunc<T> {
|
|||||||
String desc = Type.getMethodDescriptor(setter);
|
String desc = Type.getMethodDescriptor(setter);
|
||||||
mv.visitVarInsn(ALOAD, 2); // obj
|
mv.visitVarInsn(ALOAD, 2); // obj
|
||||||
mv.visitVarInsn(ALOAD, 1); // row
|
mv.visitVarInsn(ALOAD, 1); // row
|
||||||
Asms.visitInsn(mv, attrIndex);
|
Asms.visitInsn(mv, colIndex);
|
||||||
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getDouble", "(I)Ljava/lang/Double;", true);
|
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getDouble", "(I)Ljava/lang/Double;", true);
|
||||||
mv.visitMethodInsn(INVOKEVIRTUAL, entityName, setter.getName(), desc, false);
|
mv.visitMethodInsn(INVOKEVIRTUAL, entityName, setter.getName(), desc, false);
|
||||||
continue;
|
continue;
|
||||||
} else if (field != null) {
|
} else if (field != null) {
|
||||||
mv.visitVarInsn(ALOAD, 2); // obj
|
mv.visitVarInsn(ALOAD, 2); // obj
|
||||||
mv.visitVarInsn(ALOAD, 1); // row
|
mv.visitVarInsn(ALOAD, 1); // row
|
||||||
Asms.visitInsn(mv, attrIndex);
|
Asms.visitInsn(mv, colIndex);
|
||||||
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getDouble", "(I)Ljava/lang/Double;", true);
|
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getDouble", "(I)Ljava/lang/Double;", true);
|
||||||
mv.visitFieldInsn(PUTFIELD, entityName, field.getName(), "Ljava/lang/Double;");
|
mv.visitFieldInsn(PUTFIELD, entityName, field.getName(), "Ljava/lang/Double;");
|
||||||
continue;
|
continue;
|
||||||
@@ -386,14 +386,14 @@ public abstract class EntityFullFunc<T> {
|
|||||||
String desc = Type.getMethodDescriptor(setter);
|
String desc = Type.getMethodDescriptor(setter);
|
||||||
mv.visitVarInsn(ALOAD, 2); // obj
|
mv.visitVarInsn(ALOAD, 2); // obj
|
||||||
mv.visitVarInsn(ALOAD, 1); // row
|
mv.visitVarInsn(ALOAD, 1); // row
|
||||||
Asms.visitInsn(mv, attrIndex);
|
Asms.visitInsn(mv, colIndex);
|
||||||
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getString", "(I)Ljava/lang/String;", true);
|
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getString", "(I)Ljava/lang/String;", true);
|
||||||
mv.visitMethodInsn(INVOKEVIRTUAL, entityName, setter.getName(), desc, false);
|
mv.visitMethodInsn(INVOKEVIRTUAL, entityName, setter.getName(), desc, false);
|
||||||
continue;
|
continue;
|
||||||
} else if (field != null) {
|
} else if (field != null) {
|
||||||
mv.visitVarInsn(ALOAD, 2); // obj
|
mv.visitVarInsn(ALOAD, 2); // obj
|
||||||
mv.visitVarInsn(ALOAD, 1); // row
|
mv.visitVarInsn(ALOAD, 1); // row
|
||||||
Asms.visitInsn(mv, attrIndex);
|
Asms.visitInsn(mv, colIndex);
|
||||||
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getString", "(I)Ljava/lang/String;", true);
|
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getString", "(I)Ljava/lang/String;", true);
|
||||||
mv.visitFieldInsn(PUTFIELD, entityName, field.getName(), "Ljava/lang/String;");
|
mv.visitFieldInsn(PUTFIELD, entityName, field.getName(), "Ljava/lang/String;");
|
||||||
continue;
|
continue;
|
||||||
@@ -403,14 +403,14 @@ public abstract class EntityFullFunc<T> {
|
|||||||
String desc = Type.getMethodDescriptor(setter);
|
String desc = Type.getMethodDescriptor(setter);
|
||||||
mv.visitVarInsn(ALOAD, 2); // obj
|
mv.visitVarInsn(ALOAD, 2); // obj
|
||||||
mv.visitVarInsn(ALOAD, 1); // row
|
mv.visitVarInsn(ALOAD, 1); // row
|
||||||
Asms.visitInsn(mv, attrIndex);
|
Asms.visitInsn(mv, colIndex);
|
||||||
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getBytes", "(I)[B", true);
|
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getBytes", "(I)[B", true);
|
||||||
mv.visitMethodInsn(INVOKEVIRTUAL, entityName, setter.getName(), desc, false);
|
mv.visitMethodInsn(INVOKEVIRTUAL, entityName, setter.getName(), desc, false);
|
||||||
continue;
|
continue;
|
||||||
} else if (field != null) {
|
} else if (field != null) {
|
||||||
mv.visitVarInsn(ALOAD, 2); // obj
|
mv.visitVarInsn(ALOAD, 2); // obj
|
||||||
mv.visitVarInsn(ALOAD, 1); // row
|
mv.visitVarInsn(ALOAD, 1); // row
|
||||||
Asms.visitInsn(mv, attrIndex);
|
Asms.visitInsn(mv, colIndex);
|
||||||
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getBytes", "(I)[B", true);
|
mv.visitMethodInsn(INVOKEINTERFACE, rowName, "getBytes", "(I)[B", true);
|
||||||
mv.visitFieldInsn(PUTFIELD, entityName, field.getName(), "[B");
|
mv.visitFieldInsn(PUTFIELD, entityName, field.getName(), "[B");
|
||||||
continue;
|
continue;
|
||||||
@@ -420,7 +420,7 @@ public abstract class EntityFullFunc<T> {
|
|||||||
String desc = Type.getMethodDescriptor(setter);
|
String desc = Type.getMethodDescriptor(setter);
|
||||||
mv.visitVarInsn(ALOAD, 2); // obj
|
mv.visitVarInsn(ALOAD, 2); // obj
|
||||||
mv.visitVarInsn(ALOAD, 1); // row
|
mv.visitVarInsn(ALOAD, 1); // row
|
||||||
Asms.visitInsn(mv, attrIndex);
|
Asms.visitInsn(mv, colIndex);
|
||||||
mv.visitMethodInsn(
|
mv.visitMethodInsn(
|
||||||
INVOKEINTERFACE, rowName, "getBigDecimal", "(I)Ljava/math/BigDecimal;", true);
|
INVOKEINTERFACE, rowName, "getBigDecimal", "(I)Ljava/math/BigDecimal;", true);
|
||||||
mv.visitMethodInsn(INVOKEVIRTUAL, entityName, setter.getName(), desc, false);
|
mv.visitMethodInsn(INVOKEVIRTUAL, entityName, setter.getName(), desc, false);
|
||||||
@@ -428,7 +428,7 @@ public abstract class EntityFullFunc<T> {
|
|||||||
} else if (field != null) {
|
} else if (field != null) {
|
||||||
mv.visitVarInsn(ALOAD, 2); // obj
|
mv.visitVarInsn(ALOAD, 2); // obj
|
||||||
mv.visitVarInsn(ALOAD, 1); // row
|
mv.visitVarInsn(ALOAD, 1); // row
|
||||||
Asms.visitInsn(mv, attrIndex);
|
Asms.visitInsn(mv, colIndex);
|
||||||
mv.visitMethodInsn(
|
mv.visitMethodInsn(
|
||||||
INVOKEINTERFACE, rowName, "getBigDecimal", "(I)Ljava/math/BigDecimal;", true);
|
INVOKEINTERFACE, rowName, "getBigDecimal", "(I)Ljava/math/BigDecimal;", true);
|
||||||
mv.visitFieldInsn(PUTFIELD, entityName, field.getName(), "Ljava/math/BigDecimal;");
|
mv.visitFieldInsn(PUTFIELD, entityName, field.getName(), "Ljava/math/BigDecimal;");
|
||||||
@@ -436,7 +436,7 @@ public abstract class EntityFullFunc<T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
mv.visitVarInsn(ALOAD, 0);
|
mv.visitVarInsn(ALOAD, 0);
|
||||||
Asms.visitInsn(mv, attrIndex);
|
Asms.visitInsn(mv, colIndex - 1);
|
||||||
mv.visitVarInsn(ALOAD, 1); // row
|
mv.visitVarInsn(ALOAD, 1); // row
|
||||||
mv.visitVarInsn(ALOAD, 2); // obj
|
mv.visitVarInsn(ALOAD, 2); // obj
|
||||||
mv.visitMethodInsn(
|
mv.visitMethodInsn(
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* Copyright (c) 2016-2116 Redkale
|
* Copyright (c) 2016-2116 Redkale
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*/
|
*/
|
||||||
package org.redkale.test.source;
|
package org.redkale.test.source.func;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -50,7 +50,8 @@ public class EntityFullFuncTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Object getObject(int columnIdex) {
|
public Object getObject(int columnIndex) {
|
||||||
|
if (columnIndex < 1) throw new IllegalArgumentException();
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -60,7 +61,8 @@ public class EntityFullFuncTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getString(int columnIdex) {
|
public String getString(int columnIndex) {
|
||||||
|
if (columnIndex < 1) throw new IllegalArgumentException();
|
||||||
return "mystring";
|
return "mystring";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -70,7 +72,8 @@ public class EntityFullFuncTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public byte[] getBytes(int columnIdex) {
|
public byte[] getBytes(int columnIndex) {
|
||||||
|
if (columnIndex < 1) throw new IllegalArgumentException();
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,7 +83,8 @@ public class EntityFullFuncTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BigDecimal getBigDecimal(int columnIdex) {
|
public BigDecimal getBigDecimal(int columnIndex) {
|
||||||
|
if (columnIndex < 1) throw new IllegalArgumentException();
|
||||||
return BigDecimal.ZERO;
|
return BigDecimal.ZERO;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -90,7 +94,8 @@ public class EntityFullFuncTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean getBoolean(int columnIdex) {
|
public Boolean getBoolean(int columnIndex) {
|
||||||
|
if (columnIndex < 1) throw new IllegalArgumentException();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -100,7 +105,8 @@ public class EntityFullFuncTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Short getShort(int columnIdex) {
|
public Short getShort(int columnIndex) {
|
||||||
|
if (columnIndex < 1) throw new IllegalArgumentException();
|
||||||
return 111;
|
return 111;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -110,7 +116,8 @@ public class EntityFullFuncTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer getInteger(int columnIdex) {
|
public Integer getInteger(int columnIndex) {
|
||||||
|
if (columnIndex < 1) throw new IllegalArgumentException();
|
||||||
return 222;
|
return 222;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -120,7 +127,8 @@ public class EntityFullFuncTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Float getFloat(int columnIdex) {
|
public Float getFloat(int columnIndex) {
|
||||||
|
if (columnIndex < 1) throw new IllegalArgumentException();
|
||||||
return 333.f;
|
return 333.f;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -130,7 +138,8 @@ public class EntityFullFuncTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Long getLong(int columnIdex) {
|
public Long getLong(int columnIndex) {
|
||||||
|
if (columnIndex < 1) throw new IllegalArgumentException();
|
||||||
return 444L;
|
return 444L;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -140,7 +149,8 @@ public class EntityFullFuncTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Double getDouble(int columnIdex) {
|
public Double getDouble(int columnIndex) {
|
||||||
|
if (columnIndex < 1) throw new IllegalArgumentException();
|
||||||
return 555.d;
|
return 555.d;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
* Copyright (c) 2016-2116 Redkale
|
* Copyright (c) 2016-2116 Redkale
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*/
|
*/
|
||||||
package org.redkale.test.source;
|
package org.redkale.test.source.func;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
* Copyright (c) 2016-2116 Redkale
|
* Copyright (c) 2016-2116 Redkale
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*/
|
*/
|
||||||
package org.redkale.test.source;
|
package org.redkale.test.source.func;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
* Copyright (c) 2016-2116 Redkale
|
* Copyright (c) 2016-2116 Redkale
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*/
|
*/
|
||||||
package org.redkale.test.source;
|
package org.redkale.test.source.func;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
Reference in New Issue
Block a user