Attached Files | vector-object-platform.diff [^] (16,098 bytes) 2017-07-06 13:44 [Show Content] [Hide Content]diff -r f3b0864cfcb5 src-core/src/org/openbravo/data/Sqlc.java
--- a/src-core/src/org/openbravo/data/Sqlc.java Tue Jun 27 12:20:36 2017 +0000
+++ b/src-core/src/org/openbravo/data/Sqlc.java Thu Jul 06 13:40:51 2017 +0200
@@ -1111,7 +1111,7 @@
}
if (sql.sqlReturn.equalsIgnoreCase("MULTIPLE")) {
importJavaUtil = true;
- out2.append(" Vector<java.lang.Object> vector = new Vector<java.lang.Object>(0);\n");
+ out2.append(" Vector<" + sqlcName + "> vector = new Vector<" + sqlcName + ">(0);\n");
} else if (sql.sqlReturn.equalsIgnoreCase("SINGLE")) {
out2.append(" " + sqlcName + " object" + sqlcName + " = new " + sqlcName + "();\n");
} else if (sql.sqlReturn.equalsIgnoreCase("STRING")) {
diff -r f3b0864cfcb5 src/org/openbravo/erpCommon/ad_actionButton/ActionButtonUtility.java
--- a/src/org/openbravo/erpCommon/ad_actionButton/ActionButtonUtility.java Tue Jun 27 12:20:36 2017 +0000
+++ b/src/org/openbravo/erpCommon/ad_actionButton/ActionButtonUtility.java Thu Jul 06 13:40:51 2017 +0200
@@ -11,7 +11,7 @@
* under the License.
* The Original Code is Openbravo ERP.
* The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2001-2014 Openbravo SLU
+ * All portions are Copyright (C) 2001-2017 Openbravo SLU
* All Rights Reserved.
* Contributor(s): ______________________________________.
************************************************************************
@@ -85,7 +85,7 @@
}
SQLReturnObject[] data = null;
if (ld != null) {
- Vector<Object> v = new Vector<Object>();
+ Vector<SQLReturnObject> v = new Vector<>();
SQLReturnObject data1 = new SQLReturnObject();
if (!strProcessing.equals("") && strProcessing.equals("Y")) {
data1.setData("ID", "XL");
@@ -164,7 +164,7 @@
int ind1 = 0, ind2 = 0;
while (ind1 < ld.length && ind2 < v.size()) {
for (int j = 0; j < v.size(); j++) {
- SQLReturnObject sqlro = (SQLReturnObject) v.get(j);
+ SQLReturnObject sqlro = v.get(j);
if (sqlro.getField("ID").equals(ld[ind1].getField("ID"))) {
if (log4j.isDebugEnabled())
log4j.debug("DocAction - Element: " + ind1 + " - ID: " + sqlro.getField("ID"));
@@ -206,7 +206,7 @@
}
SQLReturnObject[] data = null;
if (ld != null) {
- Vector<Object> v = new Vector<Object>();
+ Vector<SQLReturnObject> v = new Vector<>();
SQLReturnObject data1 = new SQLReturnObject();
if (strProjectStatus.equals("NF") || strProjectStatus.equals("OP")) {
data1.setData("ID", "OR");
diff -r f3b0864cfcb5 src/org/openbravo/erpCommon/ad_forms/SQLExecutor_Query.java
--- a/src/org/openbravo/erpCommon/ad_forms/SQLExecutor_Query.java Tue Jun 27 12:20:36 2017 +0000
+++ b/src/org/openbravo/erpCommon/ad_forms/SQLExecutor_Query.java Thu Jul 06 13:40:51 2017 +0200
@@ -11,7 +11,7 @@
* under the License.
* The Original Code is Openbravo ERP.
* The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2001-2010 Openbravo SLU
+ * All portions are Copyright (C) 2001-2017 Openbravo SLU
* All Rights Reserved.
* Contributor(s): ______________________________________.
************************************************************************
@@ -58,7 +58,7 @@
PreparedStatement st = null;
ResultSet result;
- Vector<Object> vector = new Vector<Object>(0);
+ Vector<SQLExecutor_Query> vector = new Vector<>(0);
try {
if (log4j.isDebugEnabled())
diff -r f3b0864cfcb5 src/org/openbravo/erpCommon/ad_forms/ShowSessionVariables.java
--- a/src/org/openbravo/erpCommon/ad_forms/ShowSessionVariables.java Tue Jun 27 12:20:36 2017 +0000
+++ b/src/org/openbravo/erpCommon/ad_forms/ShowSessionVariables.java Thu Jul 06 13:40:51 2017 +0200
@@ -11,7 +11,7 @@
* under the License.
* The Original Code is Openbravo ERP.
* The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2001-2010 Openbravo S.L.U.
+ * All portions are Copyright (C) 2001-2017 Openbravo S.L.U.
* All Rights Reserved.
* Contributor(s): ______________________________________.
************************************************************************
@@ -94,11 +94,11 @@
}
}
- private boolean existsWindow(Vector<Object> windows, String windowId) {
+ private boolean existsWindow(Vector<String> windows, String windowId) {
if (windows.size() == 0)
return false;
for (int i = 0; i < windows.size(); i++) {
- String aux = (String) windows.elementAt(i);
+ String aux = windows.elementAt(i);
if (aux.equals(windowId))
return true;
}
@@ -120,7 +120,7 @@
boolean preferences, boolean global, boolean accounting, boolean windowGlobal, String window) {
ShowSessionVariablesStructureData[] resData = null;
try {
- Vector<Object> vecPreferences = new Vector<Object>();
+ Vector<ShowSessionVariablesStructureData> vecPreferences = new Vector<>();
if (preferences && (window.equals("") || window.equals("0"))) {
for (int i = 0; i < data.length; i++) {
if (data[i].isPreference && (data[i].window == null || data[i].window.equals(""))) {
@@ -128,8 +128,7 @@
data[i].window = "";
data[i].windowName = "";
for (int j = 0; j < vecPreferences.size() && !insertado; j++) {
- ShowSessionVariablesStructureData element = (ShowSessionVariablesStructureData) vecPreferences
- .elementAt(j);
+ ShowSessionVariablesStructureData element = vecPreferences.elementAt(j);
if (element.name.compareTo(data[i].name) >= 0) {
vecPreferences.insertElementAt(data[i], j);
insertado = true;
@@ -141,7 +140,7 @@
}
}
}
- Vector<Object> vecPreferencesW = new Vector<Object>();
+ Vector<ShowSessionVariablesStructureData> vecPreferencesW = new Vector<>();
if (preferences && !window.equals("")) {
for (int i = 0; i < data.length; i++) {
if (data[i].isPreference
@@ -150,8 +149,7 @@
boolean insertado = false;
data[i].windowName = windowName(windows, data[i].window);
for (int j = 0; j < vecPreferencesW.size() && !insertado; j++) {
- ShowSessionVariablesStructureData element = (ShowSessionVariablesStructureData) vecPreferencesW
- .elementAt(j);
+ ShowSessionVariablesStructureData element = vecPreferencesW.elementAt(j);
if (element.windowName.compareTo(data[i].windowName) > 0) {
vecPreferencesW.insertElementAt(data[i], j);
insertado = true;
@@ -169,7 +167,7 @@
}
}
- Vector<Object> vecGlobal = new Vector<Object>();
+ Vector<ShowSessionVariablesStructureData> vecGlobal = new Vector<>();
if (global) {
for (int i = 0; i < data.length; i++) {
if (data[i].isGlobal) {
@@ -177,8 +175,7 @@
data[i].window = "";
data[i].windowName = "";
for (int j = 0; j < vecGlobal.size() && !insertado; j++) {
- ShowSessionVariablesStructureData element = (ShowSessionVariablesStructureData) vecGlobal
- .elementAt(j);
+ ShowSessionVariablesStructureData element = vecGlobal.elementAt(j);
if (element.name.compareTo(data[i].name) >= 0) {
vecGlobal.insertElementAt(data[i], j);
insertado = true;
@@ -191,7 +188,7 @@
}
}
- Vector<Object> vecAccounting = new Vector<Object>();
+ Vector<ShowSessionVariablesStructureData> vecAccounting = new Vector<>();
if (accounting) {
for (int i = 0; i < data.length; i++) {
if (data[i].isAccounting) {
@@ -199,8 +196,7 @@
data[i].window = "";
data[i].windowName = "";
for (int j = 0; j < vecAccounting.size() && !insertado; j++) {
- ShowSessionVariablesStructureData element = (ShowSessionVariablesStructureData) vecAccounting
- .elementAt(j);
+ ShowSessionVariablesStructureData element = vecAccounting.elementAt(j);
if (element.name.compareTo(data[i].name) >= 0) {
vecAccounting.insertElementAt(data[i], j);
insertado = true;
@@ -213,7 +209,7 @@
}
}
- Vector<Object> vecWindowG = new Vector<Object>();
+ Vector<ShowSessionVariablesStructureData> vecWindowG = new Vector<>();
if (windowGlobal) {
for (int i = 0; i < data.length; i++) {
if (!data[i].isAccounting && !data[i].isGlobal && !data[i].isPreference
@@ -222,8 +218,7 @@
data[i].window = "";
data[i].windowName = "";
for (int j = 0; j < vecWindowG.size() && !insertado; j++) {
- ShowSessionVariablesStructureData element = (ShowSessionVariablesStructureData) vecWindowG
- .elementAt(j);
+ ShowSessionVariablesStructureData element = vecWindowG.elementAt(j);
if (element.name.compareTo(data[i].name) >= 0) {
vecWindowG.insertElementAt(data[i], j);
insertado = true;
@@ -236,7 +231,7 @@
}
}
- Vector<Object> vecWindow = new Vector<Object>();
+ Vector<ShowSessionVariablesStructureData> vecWindow = new Vector<>();
if (!window.equals("")) {
for (int i = 0; i < data.length; i++) {
if (!data[i].isAccounting
@@ -247,8 +242,7 @@
boolean insertado = false;
data[i].windowName = windowName(windows, data[i].window);
for (int j = 0; j < vecWindow.size() && !insertado; j++) {
- ShowSessionVariablesStructureData element = (ShowSessionVariablesStructureData) vecWindow
- .elementAt(j);
+ ShowSessionVariablesStructureData element = vecWindow.elementAt(j);
if (element.windowName.compareTo(data[i].windowName) > 0) {
vecWindow.insertElementAt(data[i], j);
insertado = true;
@@ -266,7 +260,7 @@
}
}
- Vector<Object> vecCompleto = new Vector<Object>();
+ Vector<ShowSessionVariablesStructureData> vecCompleto = new Vector<>();
for (int i = 0; i < vecPreferences.size(); i++) {
vecCompleto.addElement(vecPreferences.elementAt(i));
}
@@ -302,12 +296,12 @@
}
private ShowSessionVariablesStructureData[] compoundSession(HttpServletRequest request,
- VariablesSecureApp vars, Vector<Object> windows) {
+ VariablesSecureApp vars, Vector<String> windows) {
if (log4j.isDebugEnabled())
log4j.debug("ShowSession - compoundSession - view session");
ShowSessionVariablesStructureData[] data = null;
HttpSession session = request.getSession(true);
- Vector<Object> texto = new Vector<Object>();
+ Vector<ShowSessionVariablesStructureData> texto = new Vector<>();
try {
String sessionName;
Enumeration<?> e = session.getAttributeNames();
@@ -357,7 +351,7 @@
log4j.debug("ShowSession - printPageDataSheet - Output: data sheet");
response.setContentType("text/html; charset=UTF-8");
PrintWriter out = response.getWriter();
- Vector<Object> windows = new Vector<Object>();
+ Vector<String> windows = new Vector<>();
ShowSessionVariablesStructureData[] data = compoundSession(request, vars, windows);
XmlDocument xmlDocument;
if (data == null || data.length == 0) {
@@ -369,11 +363,11 @@
"org/openbravo/erpCommon/ad_forms/ShowSessionVariables").createXmlDocument();
}
StringBuffer strWindows = new StringBuffer();
- Vector<Object> vecWindows = new Vector<Object>();
+ Vector<ShowSessionVariablesData> vecWindows = new Vector<>();
if (windows.size() != 0) {
strWindows.append("(");
for (int i = 0; i < windows.size(); i++) {
- String aux = (String) windows.elementAt(i);
+ String aux = windows.elementAt(i);
try {
if (i > 0)
strWindows.append(", ");
@@ -424,7 +418,7 @@
.select(this, strWindows.toString()) : ShowSessionVariablesData.selectTrl(this,
strWindows.toString(), vars.getLanguage()));
{
- Vector<Object> v = new Vector<Object>();
+ Vector<ShowSessionVariablesData> v = new Vector<>();
ShowSessionVariablesData d = new ShowSessionVariablesData();
d.id = "0";
d.name = "All";
diff -r f3b0864cfcb5 src/org/openbravo/erpCommon/ad_process/AlertProcess.java
--- a/src/org/openbravo/erpCommon/ad_process/AlertProcess.java Tue Jun 27 12:20:36 2017 +0000
+++ b/src/org/openbravo/erpCommon/ad_process/AlertProcess.java Thu Jul 06 13:40:51 2017 +0200
@@ -11,7 +11,7 @@
* under the License.
* The Original Code is Openbravo ERP.
* The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2008-2014 Openbravo SLU
+ * All portions are Copyright (C) 2008-2017 Openbravo SLU
* All Rights Reserved.
* Contributor(s): ______________________________________.
************************************************************************
@@ -112,7 +112,7 @@
.getProperty("dateTimeFormat.java");
ResultSet result;
- Vector<java.lang.Object> vector = new Vector<java.lang.Object>(0);
+ Vector<AlertProcessData> vector = new Vector<>(0);
PreparedStatement st = null;
try {
diff -r f3b0864cfcb5 src/org/openbravo/erpCommon/businessUtility/Buscador.java
--- a/src/org/openbravo/erpCommon/businessUtility/Buscador.java Tue Jun 27 12:20:36 2017 +0000
+++ b/src/org/openbravo/erpCommon/businessUtility/Buscador.java Thu Jul 06 13:40:51 2017 +0200
@@ -123,7 +123,7 @@
return data;
if (parentColumn.equals(""))
return data;
- Vector<Object> vec = new Vector<Object>();
+ Vector<BuscadorData> vec = new Vector<>();
BuscadorData[] result = null;
for (int i = 0; i < data.length; i++) {
if (!parentColumn.equalsIgnoreCase(data[i].columnname)
diff -r f3b0864cfcb5 src/org/openbravo/erpCommon/businessUtility/TabFilter.java
--- a/src/org/openbravo/erpCommon/businessUtility/TabFilter.java Tue Jun 27 12:20:36 2017 +0000
+++ b/src/org/openbravo/erpCommon/businessUtility/TabFilter.java Thu Jul 06 13:40:51 2017 +0200
@@ -11,7 +11,7 @@
* under the License.
* The Original Code is Openbravo ERP.
* The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2001-2010 Openbravo SLU
+ * All portions are Copyright (C) 2001-2017 Openbravo SLU
* All Rights Reserved.
* Contributor(s): ______________________________________.
************************************************************************
@@ -146,7 +146,7 @@
private TabFilterData[] getShownFieldsData(TabFilterData[] data) {
int contador = 1;
- Vector<Object> fields = new Vector<Object>();
+ Vector<TabFilterData> fields = new Vector<>();
for (int i = 0; i < data.length; i++) {
if (mustBeCount(data[i].columnname)) {
if (isHasDescriptionReference(data[i].adReferenceId) && data[i].isdisplayed.equals("Y"))
@@ -181,7 +181,7 @@
if (log4j.isDebugEnabled())
log4j.debug("TabFilter - getOrderByFields() - String to parse: " + localStrOrderBy);
StringTokenizer orderBy = new StringTokenizer(localStrOrderBy, ",");
- Vector<Object> fields = new Vector<Object>();
+ Vector<TabFilterData> fields = new Vector<>();
boolean isnegative = false;
while (orderBy.hasMoreTokens()) {
String token = orderBy.nextToken();
@@ -215,7 +215,7 @@
private TabFilterData[] getShownFieldsDataWithoutOrderBy(TabFilterData[] data,
TabFilterData[] dataOrderBy) {
- Vector<Object> fields = new Vector<Object>();
+ Vector<TabFilterData> fields = new Vector<>();
boolean exists = false;
for (int i = 0; i < data.length; i++) {
for (int j = 0; j < dataOrderBy.length; j++) {
|