ISCC
This commit is contained in:
@@ -12,6 +12,10 @@ public class ApplicationInfoDTO {
|
||||
private String loadMenuPvm;
|
||||
private List<String> salvataggiSoap;
|
||||
|
||||
private boolean delimitedIdentifier;
|
||||
private boolean ansiPadding;
|
||||
private boolean concatNullYieldNulls;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
@@ -74,4 +78,31 @@ public class ApplicationInfoDTO {
|
||||
this.salvataggiSoap = salvataggiSoap;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isConcatNullYieldNulls() {
|
||||
return concatNullYieldNulls;
|
||||
}
|
||||
|
||||
public ApplicationInfoDTO setConcatNullYieldNulls(boolean concatNullYieldNulls) {
|
||||
this.concatNullYieldNulls = concatNullYieldNulls;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isAnsiPadding() {
|
||||
return ansiPadding;
|
||||
}
|
||||
|
||||
public ApplicationInfoDTO setAnsiPadding(boolean ansiPadding) {
|
||||
this.ansiPadding = ansiPadding;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isDelimitedIdentifier() {
|
||||
return delimitedIdentifier;
|
||||
}
|
||||
|
||||
public ApplicationInfoDTO setDelimitedIdentifier(boolean delimitedIdentifier) {
|
||||
this.delimitedIdentifier = delimitedIdentifier;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -840,6 +840,8 @@ public class EmsServices {
|
||||
"SELECT gest_name + ' : ' + SECTION FROM DBO.getImportProperties(NULL, NULL) WHERE attivo = 's' and import_rest = 'n'";
|
||||
List<String> soap = UtilityDB.executeSimpleQueryOnlyFirstColumn(dataSource.getConnection(), sqlSoap);
|
||||
|
||||
final HashMap<String, String> setupSection = setupGest.getSetupSection(multiDBTransactionManager.getPrimaryConnection(), "DATI_AZIENDA", "SETUP");
|
||||
|
||||
ApplicationInfoDTO applicationInfoDTO = new ApplicationInfoDTO()
|
||||
.setName(UtilityHashMap.getValueIfExists(resultDbInfo, "databaseName"))
|
||||
.setNewUpdProgMaga(UtilityHashMap.getValueIfExists(resultDbInfo, "UpdProgMagaNew"))
|
||||
@@ -847,7 +849,10 @@ public class EmsServices {
|
||||
.setAnnoMagaz(UtilityHashMap.getValueIfExists(resultDbInfo, "annoMagaz"))
|
||||
.setAnnoContab(UtilityHashMap.getValueIfExists(resultDbInfo, "annoContab"))
|
||||
.setLoadMenuPvm(UtilityHashMap.getValueIfExists(resultDbInfo, "loadMenuPvm"))
|
||||
.setSalvataggiSoap(soap);
|
||||
.setSalvataggiSoap(soap)
|
||||
.setAnsiPadding(UtilityHashMap.<String>getValueIfExists(setupSection, "FLAG_ANSI_PADDING").equals("S"))
|
||||
.setDelimitedIdentifier(UtilityHashMap.<String>getValueIfExists(setupSection, "DELIMITED_IDENTIFIER").equals("1"))
|
||||
.setDelimitedIdentifier(UtilityHashMap.<String>getValueIfExists(setupSection, "FLAG_CONCAT_NULL_YIELDS_NULL").equals("S"));
|
||||
|
||||
applicationInfoDTOList.add(applicationInfoDTO);
|
||||
|
||||
|
||||
@@ -5,22 +5,22 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class UtilityHashMap {
|
||||
public static boolean isPresent(HashMap map) {
|
||||
return map != null && map.size() > 0;
|
||||
public static boolean isPresent(HashMap<?, ?> map) {
|
||||
return map != null && !map.isEmpty();
|
||||
}
|
||||
|
||||
public static <T> T getValueIfExists(HashMap map, String key, T defaultValue) {
|
||||
public static <T> T getValueIfExists(HashMap<?, ?> map, String key, T defaultValue) {
|
||||
T value = defaultValue;
|
||||
if (map != null && map.containsKey(key)) value = (T) map.get(key);
|
||||
return value;
|
||||
}
|
||||
|
||||
public static <T> T getValueIfExists(Map map, String key) {
|
||||
public static <T> T getValueIfExists(HashMap<?, ?> map, String key) {
|
||||
return getValueIfExists(map, key, null);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static <T> T getValueIfExists(@Nullable Map map, String key, T defaultValue) {
|
||||
public static <T> T getValueIfExists(@Nullable Map<?, ?> map, String key, T defaultValue) {
|
||||
T value = defaultValue;
|
||||
if (map != null && map.containsKey(key)) value = (T) map.get(key);
|
||||
return value;
|
||||
|
||||
Reference in New Issue
Block a user