Merge branch 'master' into develop
This commit is contained in:
@@ -1903,16 +1903,16 @@ public abstract class EntityBase implements Serializable, Cloneable, EntityInter
|
|||||||
if (excludedColumns != null && excludedColumns.contains(SqlFieldHolder.getSqlValue(sqlField.value(), field)))
|
if (excludedColumns != null && excludedColumns.contains(SqlFieldHolder.getSqlValue(sqlField.value(), field)))
|
||||||
continue;
|
continue;
|
||||||
if (field.getAnnotation(it.integry.ems_model.annotation.Clob.class) != null) {
|
if (field.getAnnotation(it.integry.ems_model.annotation.Clob.class) != null) {
|
||||||
setupClobData(counter, map, obj);
|
Clob clobData = setupClobData(counter, map, obj);
|
||||||
valori.add("?");
|
valori.add("?");
|
||||||
originalValues.add(obj);
|
originalValues.add(clobData);
|
||||||
campi.add(SqlFieldHolder.getSqlValue(sqlField.value(), field));
|
campi.add(SqlFieldHolder.getSqlValue(sqlField.value(), field));
|
||||||
|
|
||||||
counter++;
|
counter++;
|
||||||
} else if (field.getAnnotation(it.integry.ems_model.annotation.Blob.class) != null) {
|
} else if (field.getAnnotation(it.integry.ems_model.annotation.Blob.class) != null) {
|
||||||
setupBlobData(counter, map, obj);
|
Blob blobData = setupBlobData(counter, map, obj);
|
||||||
valori.add("?");
|
valori.add("?");
|
||||||
originalValues.add(obj);
|
originalValues.add(blobData);
|
||||||
campi.add(SqlFieldHolder.getSqlValue(sqlField.value(), field));
|
campi.add(SqlFieldHolder.getSqlValue(sqlField.value(), field));
|
||||||
|
|
||||||
counter++;
|
counter++;
|
||||||
@@ -2011,7 +2011,7 @@ public abstract class EntityBase implements Serializable, Cloneable, EntityInter
|
|||||||
return mapLob;
|
return mapLob;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setupBlobData(Integer counter, Map<Integer, Object> mapLob, Object obj) throws SQLException {
|
private Blob setupBlobData(Integer counter, Map<Integer, Object> mapLob, Object obj) throws SQLException {
|
||||||
Blob blobData = connection.createBlob();
|
Blob blobData = connection.createBlob();
|
||||||
|
|
||||||
byte[] blob;
|
byte[] blob;
|
||||||
@@ -2022,10 +2022,12 @@ public abstract class EntityBase implements Serializable, Cloneable, EntityInter
|
|||||||
|
|
||||||
blobData.setBytes(1, blob);
|
blobData.setBytes(1, blob);
|
||||||
mapLob.put(counter, blobData);
|
mapLob.put(counter, blobData);
|
||||||
|
|
||||||
|
return blobData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void setupClobData(Integer counter, Map<Integer, Object> mapLob, Object obj) throws SQLException {
|
private Clob setupClobData(Integer counter, Map<Integer, Object> mapLob, Object obj) throws SQLException {
|
||||||
Clob clobData = connection.createClob();
|
Clob clobData = connection.createClob();
|
||||||
|
|
||||||
String clob;
|
String clob;
|
||||||
@@ -2036,6 +2038,7 @@ public abstract class EntityBase implements Serializable, Cloneable, EntityInter
|
|||||||
|
|
||||||
clobData.setString(1, clob);
|
clobData.setString(1, clob);
|
||||||
mapLob.put(counter, clobData);
|
mapLob.put(counter, clobData);
|
||||||
|
return clobData;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user