IDEMPIERE-308 Performance: Replace use of StringBuffer and String concatenation with StringBuilder
This commit is contained in:
parent
680bb2090c
commit
455ed28e92
|
@ -197,7 +197,7 @@ public class Export extends SvrProcess
|
||||||
|
|
||||||
outbandProcessor.process(getCtx(), ediProcessor, result.toString(), "C_Invoice-"+p_Record_ID+".txt", Trx.get( get_TrxName(), false ));
|
outbandProcessor.process(getCtx(), ediProcessor, result.toString(), "C_Invoice-"+p_Record_ID+".txt", Trx.get( get_TrxName(), false ));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
result = new StringBuffer( e.toString() );
|
result = new StringBuilder( e.toString() );
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
addLog(0, null, null, Msg.getMsg (getCtx(), "ExportProcessResult") + "\n" + outDocument.toString());
|
addLog(0, null, null, Msg.getMsg (getCtx(), "ExportProcessResult") + "\n" + outDocument.toString());
|
||||||
|
|
|
@ -183,7 +183,7 @@ public class ImportPriceList extends SvrProcess
|
||||||
|
|
||||||
/* UOM For Future USE
|
/* UOM For Future USE
|
||||||
// Set UOM (System/own)
|
// Set UOM (System/own)
|
||||||
sql = new StringBuffer ("UPDATE I_PriceList "
|
sql = new StringBuilder ("UPDATE I_PriceList "
|
||||||
+ "SET X12DE355 = "
|
+ "SET X12DE355 = "
|
||||||
+ "(SELECT MAX(X12DE355) FROM C_UOM u WHERE u.IsDefault='Y' AND u.AD_Client_ID IN (0,I_PriceList.AD_Client_ID)) "
|
+ "(SELECT MAX(X12DE355) FROM C_UOM u WHERE u.IsDefault='Y' AND u.AD_Client_ID IN (0,I_PriceList.AD_Client_ID)) "
|
||||||
+ "WHERE X12DE355 IS NULL AND C_UOM_ID IS NULL"
|
+ "WHERE X12DE355 IS NULL AND C_UOM_ID IS NULL"
|
||||||
|
@ -191,14 +191,14 @@ public class ImportPriceList extends SvrProcess
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.fine("Set UOM Default=" + no);
|
log.fine("Set UOM Default=" + no);
|
||||||
//
|
//
|
||||||
sql = new StringBuffer ("UPDATE I_PriceList "
|
sql = new StringBuilder ("UPDATE I_PriceList "
|
||||||
+ "SET C_UOM_ID = (SELECT C_UOM_ID FROM C_UOM u WHERE u.X12DE355=I_PriceList.X12DE355 AND u.AD_Client_ID IN (0,I_PriceList.AD_Client_ID)) "
|
+ "SET C_UOM_ID = (SELECT C_UOM_ID FROM C_UOM u WHERE u.X12DE355=I_PriceList.X12DE355 AND u.AD_Client_ID IN (0,I_PriceList.AD_Client_ID)) "
|
||||||
+ "WHERE C_UOM_ID IS NULL"
|
+ "WHERE C_UOM_ID IS NULL"
|
||||||
+ " AND I_IsImported<>'Y'").append(clientCheck);
|
+ " AND I_IsImported<>'Y'").append(clientCheck);
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
log.info("Set UOM=" + no);
|
log.info("Set UOM=" + no);
|
||||||
//
|
//
|
||||||
sql = new StringBuffer ("UPDATE I_PriceList "
|
sql = new StringBuilder ("UPDATE I_PriceList "
|
||||||
+ "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid UOM, ' "
|
+ "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Invalid UOM, ' "
|
||||||
+ "WHERE C_UOM_ID IS NULL"
|
+ "WHERE C_UOM_ID IS NULL"
|
||||||
+ " AND I_IsImported<>'Y'").append(clientCheck);
|
+ " AND I_IsImported<>'Y'").append(clientCheck);
|
||||||
|
|
|
@ -249,7 +249,7 @@ public class InOutGenerateRMA extends SvrProcess
|
||||||
log.log(Level.WARNING, msglog.toString());
|
log.log(Level.WARNING, msglog.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
StringBuffer processMsg = new StringBuffer().append(shipment.getDocumentNo());
|
StringBuilder processMsg = new StringBuilder().append(shipment.getDocumentNo());
|
||||||
|
|
||||||
if (!shipment.processIt(p_docAction))
|
if (!shipment.processIt(p_docAction))
|
||||||
{
|
{
|
||||||
|
|
|
@ -330,7 +330,7 @@ public class CommissionCalc extends SvrProcess
|
||||||
|
|
||||||
/**
|
/**
|
||||||
String sd = DB.TO_DATE(p_StartDate, true);
|
String sd = DB.TO_DATE(p_StartDate, true);
|
||||||
StringBuffer sql = new StringBuffer ("SELECT ");
|
StringBuilder sql = new StringBuilder ("SELECT ");
|
||||||
if (MCommission.FREQUENCYTYPE_Quarterly.equals(m_com.getFrequencyType()))
|
if (MCommission.FREQUENCYTYPE_Quarterly.equals(m_com.getFrequencyType()))
|
||||||
sql.append("TRUNC(").append(sd).append(", 'Q'), TRUNC(").append(sd).append("+92, 'Q')-1");
|
sql.append("TRUNC(").append(sd).append(", 'Q'), TRUNC(").append(sd).append("+92, 'Q')-1");
|
||||||
else if (MCommission.FREQUENCYTYPE_Weekly.equals(m_com.getFrequencyType()))
|
else if (MCommission.FREQUENCYTYPE_Weekly.equals(m_com.getFrequencyType()))
|
||||||
|
|
|
@ -149,7 +149,7 @@ implements ImportProcess
|
||||||
|
|
||||||
// Set Country
|
// Set Country
|
||||||
/**
|
/**
|
||||||
sql = new StringBuffer ("UPDATE I_BPartner i "
|
sql = new StringBuilder ("UPDATE I_BPartner i "
|
||||||
+ "SET CountryCode=(SELECT CountryCode FROM C_Country c WHERE c.IsDefault='Y'"
|
+ "SET CountryCode=(SELECT CountryCode FROM C_Country c WHERE c.IsDefault='Y'"
|
||||||
+ " AND c.AD_Client_ID IN (0, i.AD_Client_ID) AND ROWNUM=1) "
|
+ " AND c.AD_Client_ID IN (0, i.AD_Client_ID) AND ROWNUM=1) "
|
||||||
+ "WHERE CountryCode IS NULL AND C_Country_ID IS NULL"
|
+ "WHERE CountryCode IS NULL AND C_Country_ID IS NULL"
|
||||||
|
|
|
@ -220,7 +220,7 @@ public class ImportConversionRate extends SvrProcess
|
||||||
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
no = DB.executeUpdate(sql.toString(), get_TrxName());
|
||||||
if (no != 0)
|
if (no != 0)
|
||||||
log.warning ("Invalid Rates =" + no);
|
log.warning ("Invalid Rates =" + no);
|
||||||
// sql = new StringBuffer ("UPDATE I_Conversion_Rate i " // Rate diff > 10%
|
// sql = new StringBuilder ("UPDATE I_Conversion_Rate i " // Rate diff > 10%
|
||||||
// + "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Inconsistent Rates='||(MultiplyRate - (1/DivideRate)) "
|
// + "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Inconsistent Rates='||(MultiplyRate - (1/DivideRate)) "
|
||||||
// + "WHERE ((MultiplyRate - (1/DivideRate)) > (MultiplyRate * .1))"
|
// + "WHERE ((MultiplyRate - (1/DivideRate)) > (MultiplyRate * .1))"
|
||||||
// + " AND I_IsImported<>'Y'").append (clientCheck);
|
// + " AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
|
|
|
@ -572,7 +572,7 @@ public class ImportGLJournal extends SvrProcess
|
||||||
//AZ Goodwill
|
//AZ Goodwill
|
||||||
//BF: 2391401 Remove account balance limitation in Import GL Journal
|
//BF: 2391401 Remove account balance limitation in Import GL Journal
|
||||||
/*
|
/*
|
||||||
sql = new StringBuffer ("UPDATE I_GLJournal i "
|
sql = new StringBuilder ("UPDATE I_GLJournal i "
|
||||||
+ "SET I_ErrorMsg=I_ErrorMsg||'WARN=Check Acct Balance, ' "
|
+ "SET I_ErrorMsg=I_ErrorMsg||'WARN=Check Acct Balance, ' "
|
||||||
+ "WHERE ABS(AmtAcctDr-AmtAcctCr)>100000000" // 100 mio
|
+ "WHERE ABS(AmtAcctDr-AmtAcctCr)>100000000" // 100 mio
|
||||||
+ " AND I_IsImported<>'Y'").append (clientCheck);
|
+ " AND I_IsImported<>'Y'").append (clientCheck);
|
||||||
|
|
|
@ -368,7 +368,7 @@ public class ImportInvoice extends SvrProcess
|
||||||
|
|
||||||
// Set Country
|
// Set Country
|
||||||
/**
|
/**
|
||||||
sql = new StringBuffer ("UPDATE I_Invoice o "
|
sql = new StringBuilder ("UPDATE I_Invoice o "
|
||||||
+ "SET CountryCode=(SELECT MAX(CountryCode) FROM C_Country c WHERE c.IsDefault='Y'"
|
+ "SET CountryCode=(SELECT MAX(CountryCode) FROM C_Country c WHERE c.IsDefault='Y'"
|
||||||
+ " AND c.AD_Client_ID IN (0, o.AD_Client_ID)) "
|
+ " AND c.AD_Client_ID IN (0, o.AD_Client_ID)) "
|
||||||
+ "WHERE C_BPartner_ID IS NULL AND CountryCode IS NULL AND C_Country_ID IS NULL"
|
+ "WHERE C_BPartner_ID IS NULL AND CountryCode IS NULL AND C_Country_ID IS NULL"
|
||||||
|
|
|
@ -369,7 +369,7 @@ public class ImportOrder extends SvrProcess
|
||||||
|
|
||||||
// Set Country
|
// Set Country
|
||||||
/**
|
/**
|
||||||
sql = new StringBuffer ("UPDATE I_Order o "
|
sql = new StringBuilder ("UPDATE I_Order o "
|
||||||
+ "SET CountryCode=(SELECT MAX(CountryCode) FROM C_Country c WHERE c.IsDefault='Y'"
|
+ "SET CountryCode=(SELECT MAX(CountryCode) FROM C_Country c WHERE c.IsDefault='Y'"
|
||||||
+ " AND c.AD_Client_ID IN (0, o.AD_Client_ID)) "
|
+ " AND c.AD_Client_ID IN (0, o.AD_Client_ID)) "
|
||||||
+ "WHERE C_BPartner_ID IS NULL AND CountryCode IS NULL AND C_Country_ID IS NULL"
|
+ "WHERE C_BPartner_ID IS NULL AND CountryCode IS NULL AND C_Country_ID IS NULL"
|
||||||
|
|
|
@ -359,7 +359,7 @@ public class ImportProduct extends SvrProcess implements ImportProcess
|
||||||
log.warning("No Mandatory Value=" + no);
|
log.warning("No Mandatory Value=" + no);
|
||||||
|
|
||||||
// Vendor Product No
|
// Vendor Product No
|
||||||
// sql = new StringBuffer ("UPDATE I_Product i "
|
// sql = new StringBuilder ("UPDATE I_Product i "
|
||||||
// + "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No Mandatory VendorProductNo,' "
|
// + "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No Mandatory VendorProductNo,' "
|
||||||
// + "WHERE I_IsImported<>'Y'"
|
// + "WHERE I_IsImported<>'Y'"
|
||||||
// + " AND VendorProductNo IS NULL AND (C_BPartner_ID IS NOT NULL OR BPartner_Value IS NOT NULL)").append(clientCheck);
|
// + " AND VendorProductNo IS NULL AND (C_BPartner_ID IS NOT NULL OR BPartner_Value IS NOT NULL)").append(clientCheck);
|
||||||
|
|
|
@ -634,7 +634,7 @@ public class ReplenishReport extends SvrProcess
|
||||||
|
|
||||||
order = new MDDOrder (getCtx(), 0, get_TrxName());
|
order = new MDDOrder (getCtx(), 0, get_TrxName());
|
||||||
order.setC_DocType_ID(p_C_DocType_ID);
|
order.setC_DocType_ID(p_C_DocType_ID);
|
||||||
StringBuffer msgsd = new StringBuffer(Msg.getMsg(getCtx(), "Replenishment"))
|
StringBuilder msgsd = new StringBuilder(Msg.getMsg(getCtx(), "Replenishment"))
|
||||||
.append(": ").append(whSource.getName()).append("->").append(wh.getName());
|
.append(": ").append(whSource.getName()).append("->").append(wh.getName());
|
||||||
order.setDescription(msgsd.toString());
|
order.setDescription(msgsd.toString());
|
||||||
// Set Org
|
// Set Org
|
||||||
|
|
|
@ -97,7 +97,7 @@ public class RecurringRun extends SvrProcess
|
||||||
+ ", Cut_Date=" + p_Cut_Date + ", DocAction=" + p_DocAction);
|
+ ", Cut_Date=" + p_Cut_Date + ", DocAction=" + p_DocAction);
|
||||||
|
|
||||||
ArrayList<Object> parameters = new ArrayList<Object>();
|
ArrayList<Object> parameters = new ArrayList<Object>();
|
||||||
StringBuffer whereClause = new StringBuffer("RunsMax>(SELECT COUNT(*) FROM C_Recurring_Run WHERE C_Recurring_Run.C_Recurring_ID=C_Recurring.C_Recurring_ID)");
|
StringBuilder whereClause = new StringBuilder("RunsMax>(SELECT COUNT(*) FROM C_Recurring_Run WHERE C_Recurring_Run.C_Recurring_ID=C_Recurring.C_Recurring_ID)");
|
||||||
if (p_C_RecurringGroup_ID > 0) {
|
if (p_C_RecurringGroup_ID > 0) {
|
||||||
whereClause.append(" AND C_RecurringGroup_ID=?");
|
whereClause.append(" AND C_RecurringGroup_ID=?");
|
||||||
parameters.add(p_C_RecurringGroup_ID);
|
parameters.add(p_C_RecurringGroup_ID);
|
||||||
|
|
|
@ -118,7 +118,7 @@ public class AddressLookup implements AddressLookupInterface {
|
||||||
*/
|
*/
|
||||||
private URL buildUrl(String postcode) {
|
private URL buildUrl(String postcode) {
|
||||||
try {
|
try {
|
||||||
StringBuffer urlStr = new StringBuffer();
|
StringBuilder urlStr = new StringBuilder();
|
||||||
urlStr.append(serverUrl);
|
urlStr.append(serverUrl);
|
||||||
urlStr.append(serverUrl.endsWith("/") ? "" : "/");
|
urlStr.append(serverUrl.endsWith("/") ? "" : "/");
|
||||||
urlStr.append("/query?op=query&");
|
urlStr.append("/query?op=query&");
|
||||||
|
|
|
@ -41,7 +41,7 @@ public class DefaultDocumentFactory implements IDocFactory {
|
||||||
String tableName = MTable.getTableName(Env.getCtx(), AD_Table_ID);
|
String tableName = MTable.getTableName(Env.getCtx(), AD_Table_ID);
|
||||||
//
|
//
|
||||||
Doc doc = null;
|
Doc doc = null;
|
||||||
StringBuffer sql = new StringBuffer("SELECT * FROM ")
|
StringBuilder sql = new StringBuilder("SELECT * FROM ")
|
||||||
.append(tableName)
|
.append(tableName)
|
||||||
.append(" WHERE ").append(tableName).append("_ID=? AND Processed='Y'");
|
.append(" WHERE ").append(tableName).append("_ID=? AND Processed='Y'");
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
|
|
|
@ -165,7 +165,7 @@ public class DefaultModelFactory implements IModelFactory {
|
||||||
// Search packages
|
// Search packages
|
||||||
for (int i = 0; i < s_packages.length; i++)
|
for (int i = 0; i < s_packages.length; i++)
|
||||||
{
|
{
|
||||||
StringBuffer name = new StringBuffer(s_packages[i]).append(".M").append(className);
|
StringBuilder name = new StringBuilder(s_packages[i]).append(".M").append(className);
|
||||||
Class<?> clazz = getPOclass(name.toString(), tableName);
|
Class<?> clazz = getPOclass(name.toString(), tableName);
|
||||||
if (clazz != null)
|
if (clazz != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -412,7 +412,7 @@ public class RequestEventHandler extends AbstractEventHandler implements Managed
|
||||||
*/
|
*/
|
||||||
private String getMailTrailer(MRequest r, String serverAddress)
|
private String getMailTrailer(MRequest r, String serverAddress)
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer("\n").append(MRequest.SEPARATOR)
|
StringBuilder sb = new StringBuilder("\n").append(MRequest.SEPARATOR)
|
||||||
.append(Msg.translate(r.getCtx(), "R_Request_ID"))
|
.append(Msg.translate(r.getCtx(), "R_Request_ID"))
|
||||||
.append(": ").append(r.getDocumentNo())
|
.append(": ").append(r.getDocumentNo())
|
||||||
.append(" ").append(r.getMailTag())
|
.append(" ").append(r.getMailTag())
|
||||||
|
|
|
@ -35,7 +35,7 @@ public class TaxCriteriaNotFoundException extends AdempiereException
|
||||||
|
|
||||||
private static final String buildMessage (String criteriaName, int criteria_ID)
|
private static final String buildMessage (String criteriaName, int criteria_ID)
|
||||||
{
|
{
|
||||||
StringBuffer msg = new StringBuffer("@").append(AD_Message).append("@");
|
StringBuilder msg = new StringBuilder("@").append(AD_Message).append("@");
|
||||||
msg.append(" @").append(criteriaName).append("@");
|
msg.append(" @").append(criteriaName).append("@");
|
||||||
msg.append(" (ID ").append(criteria_ID).append(")");
|
msg.append(" (ID ").append(criteria_ID).append(")");
|
||||||
return msg.toString();
|
return msg.toString();
|
||||||
|
|
|
@ -40,7 +40,7 @@ public class TaxForChangeNotFoundException extends AdempiereException
|
||||||
private static final String buildMessage(int C_Charge_ID, int AD_Org_ID, int M_Warehouse_ID,
|
private static final String buildMessage(int C_Charge_ID, int AD_Org_ID, int M_Warehouse_ID,
|
||||||
int billC_BPartner_Location_ID, int shipC_BPartner_Location_ID, String additionalMsg)
|
int billC_BPartner_Location_ID, int shipC_BPartner_Location_ID, String additionalMsg)
|
||||||
{
|
{
|
||||||
StringBuffer msg = new StringBuffer("@").append(AD_Message).append("@");
|
StringBuilder msg = new StringBuilder("@").append(AD_Message).append("@");
|
||||||
if (!Util.isEmpty(additionalMsg, true))
|
if (!Util.isEmpty(additionalMsg, true))
|
||||||
{
|
{
|
||||||
msg.append(" ").append(additionalMsg).append(" - ");
|
msg.append(" ").append(additionalMsg).append(" - ");
|
||||||
|
|
|
@ -37,7 +37,7 @@ public class TaxNoExemptFoundException extends AdempiereException
|
||||||
|
|
||||||
private static final String buildMessage (int AD_Org_ID)
|
private static final String buildMessage (int AD_Org_ID)
|
||||||
{
|
{
|
||||||
StringBuffer msg = new StringBuffer("@").append(AD_Message).append("@");
|
StringBuilder msg = new StringBuilder("@").append(AD_Message).append("@");
|
||||||
msg.append("@AD_Org_ID@:").append(getOrgString(AD_Org_ID));
|
msg.append("@AD_Org_ID@:").append(getOrgString(AD_Org_ID));
|
||||||
//
|
//
|
||||||
return msg.toString();
|
return msg.toString();
|
||||||
|
|
|
@ -50,7 +50,7 @@ public class TaxNotFoundException extends AdempiereException
|
||||||
Timestamp billDate, int billFromC_Location_ID, int billToC_Location_ID)
|
Timestamp billDate, int billFromC_Location_ID, int billToC_Location_ID)
|
||||||
{
|
{
|
||||||
final DateFormat df = DisplayType.getDateFormat();
|
final DateFormat df = DisplayType.getDateFormat();
|
||||||
StringBuffer msg = new StringBuffer("@").append(AD_Message).append("@");
|
StringBuilder msg = new StringBuilder("@").append(AD_Message).append("@");
|
||||||
//
|
//
|
||||||
msg.append(" - @C_TaxCategory_ID@:").append(getTaxCategoryString(C_TaxCategory_ID));
|
msg.append(" - @C_TaxCategory_ID@:").append(getTaxCategoryString(C_TaxCategory_ID));
|
||||||
msg.append(", @IsSOTrx@:@").append(IsSOTrx ? "Y":"N").append("@");
|
msg.append(", @IsSOTrx@:@").append(IsSOTrx ? "Y":"N").append("@");
|
||||||
|
|
|
@ -203,7 +203,7 @@ public abstract class AbstractExcelExporter
|
||||||
* @return number excel format string
|
* @return number excel format string
|
||||||
*/
|
*/
|
||||||
private String getFormatString(NumberFormat df, boolean isHighlightNegativeNumbers) {
|
private String getFormatString(NumberFormat df, boolean isHighlightNegativeNumbers) {
|
||||||
StringBuffer format = new StringBuffer();
|
StringBuilder format = new StringBuilder();
|
||||||
int integerDigitsMin = df.getMinimumIntegerDigits();
|
int integerDigitsMin = df.getMinimumIntegerDigits();
|
||||||
int integerDigitsMax = df.getMaximumIntegerDigits();
|
int integerDigitsMax = df.getMaximumIntegerDigits();
|
||||||
for (int i = 0; i < integerDigitsMax; i++) {
|
for (int i = 0; i < integerDigitsMax; i++) {
|
||||||
|
@ -227,7 +227,7 @@ public abstract class AbstractExcelExporter
|
||||||
}
|
}
|
||||||
if (isHighlightNegativeNumbers) {
|
if (isHighlightNegativeNumbers) {
|
||||||
String f = format.toString();
|
String f = format.toString();
|
||||||
format = new StringBuffer(f).append(";[RED]-").append(f);
|
format = new StringBuilder(f).append(";[RED]-").append(f);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
if (log.isLoggable(Level.FINEST)) log.finest("NumberFormat: "+format);
|
if (log.isLoggable(Level.FINEST)) log.finest("NumberFormat: "+format);
|
||||||
|
|
|
@ -225,7 +225,7 @@ public abstract class AbstractXLSXExporter
|
||||||
*/
|
*/
|
||||||
private String getFormatString(NumberFormat df, boolean isHighlightNegativeNumbers)
|
private String getFormatString(NumberFormat df, boolean isHighlightNegativeNumbers)
|
||||||
{
|
{
|
||||||
StringBuffer format = new StringBuffer();
|
StringBuilder format = new StringBuilder();
|
||||||
int integerDigitsMin = df.getMinimumIntegerDigits();
|
int integerDigitsMin = df.getMinimumIntegerDigits();
|
||||||
int integerDigitsMax = df.getMaximumIntegerDigits();
|
int integerDigitsMax = df.getMaximumIntegerDigits();
|
||||||
for (int i = 0; i < integerDigitsMax; i++)
|
for (int i = 0; i < integerDigitsMax; i++)
|
||||||
|
@ -253,7 +253,7 @@ public abstract class AbstractXLSXExporter
|
||||||
if (isHighlightNegativeNumbers)
|
if (isHighlightNegativeNumbers)
|
||||||
{
|
{
|
||||||
String f = format.toString();
|
String f = format.toString();
|
||||||
format = new StringBuffer(f).append(";[RED]-").append(f);
|
format = new StringBuilder(f).append(";[RED]-").append(f);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
if (log.isLoggable(Level.FINEST))
|
if (log.isLoggable(Level.FINEST))
|
||||||
|
|
|
@ -100,7 +100,7 @@ public class GenericPO extends PO {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuffer sb = new StringBuffer("GenericPO[Table=").append(
|
StringBuilder sb = new StringBuilder("GenericPO[Table=").append(
|
||||||
"" + tableID + ",ID=").append(get_ID()).append("]");
|
"" + tableID + ",ID=").append(get_ID()).append("]");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,8 +14,6 @@
|
||||||
package org.adempiere.model;
|
package org.adempiere.model;
|
||||||
|
|
||||||
import static org.compiere.model.I_AD_Ref_Table.COLUMNNAME_AD_Reference_ID;
|
import static org.compiere.model.I_AD_Ref_Table.COLUMNNAME_AD_Reference_ID;
|
||||||
import static org.compiere.model.I_AD_Ref_Table.COLUMNNAME_OrderByClause;
|
|
||||||
import static org.compiere.model.I_AD_Ref_Table.COLUMNNAME_WhereClause;
|
|
||||||
|
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
|
@ -64,32 +62,32 @@ public class MRelationType extends X_AD_RelationType implements IZoomProvider {
|
||||||
* <b>Warning:</b> Doesn't support POs with more or less than one key
|
* <b>Warning:</b> Doesn't support POs with more or less than one key
|
||||||
* column.
|
* column.
|
||||||
*/
|
*/
|
||||||
static StringBuffer SQL = //
|
final static String SQL =
|
||||||
new StringBuffer(" SELECT " )//
|
" SELECT "
|
||||||
.append(" rt.AD_RelationType_ID AS ").append(COLUMNNAME_AD_RelationType_ID) //
|
+ " rt.AD_RelationType_ID"
|
||||||
.append(", rt.Name AS ").append(COLUMNNAME_Name )//
|
+ ", rt.Name"
|
||||||
.append(", rt.IsDirected AS ").append(COLUMNNAME_IsDirected) //
|
+ ", rt.IsDirected"
|
||||||
.append(", ref.AD_Reference_ID AS ").append(COLUMNNAME_AD_Reference_ID) //
|
+ ", ref.AD_Reference_ID"
|
||||||
.append(", tab.WhereClause AS ").append(COLUMNNAME_WhereClause) //
|
+ ", tab.WhereClause"
|
||||||
.append(", tab.OrderByClause AS ").append(COLUMNNAME_OrderByClause) //
|
+ ", tab.OrderByClause"
|
||||||
.append(" FROM") //
|
+ " FROM"
|
||||||
.append(" AD_RelationType rt, AD_Reference ref, AD_Ref_Table tab") //
|
+ " AD_RelationType rt, AD_Reference ref, AD_Ref_Table tab"
|
||||||
.append(" WHERE ") //
|
+ " WHERE "
|
||||||
.append(" rt.IsActive='Y'") //
|
+ " rt.IsActive='Y'"
|
||||||
.append(" AND ref.IsActive='Y'") //
|
+ " AND ref.IsActive='Y'"
|
||||||
.append(" AND ref.ValidationType='T'") // must have table validation
|
+ " AND ref.ValidationType='T'" // must have table validation
|
||||||
.append(" AND (") // join the source AD_Reference
|
+ " AND (" // join the source AD_Reference
|
||||||
.append(" rt.AD_Reference_Source_ID=ref.AD_Reference_ID") //
|
+ " rt.AD_Reference_Source_ID=ref.AD_Reference_ID" //
|
||||||
.append(" OR (") // not directed? -> also join the target AD_Reference
|
+ " OR (" // not directed? -> also join the target AD_Reference
|
||||||
.append(" rt.IsDirected='N' ") //
|
+ " rt.IsDirected='N' "
|
||||||
.append(" AND rt.AD_Reference_Target_ID=ref.AD_Reference_ID") //
|
+ " AND rt.AD_Reference_Target_ID=ref.AD_Reference_ID"
|
||||||
.append(" )") //
|
+ " )"
|
||||||
.append(" )") //
|
+ " )"
|
||||||
.append(" AND tab.IsActive='Y'") // Join the AD_Reference's AD_Ref_Table
|
+ " AND tab.IsActive='Y'" // Join the AD_Reference's AD_Ref_Table
|
||||||
.append(" AND tab.AD_Reference_ID=ref.AD_Reference_ID") //
|
+ " AND tab.AD_Reference_ID=ref.AD_Reference_ID"
|
||||||
.append(" AND tab.AD_Table_ID=?") //
|
+ " AND tab.AD_Table_ID=?"
|
||||||
.append(" AND tab.AD_Key=?") //
|
+ " AND tab.AD_Key=?"
|
||||||
.append(" ORDER BY rt.Name");
|
+ " ORDER BY rt.Name";
|
||||||
|
|
||||||
final static String SQL_WINDOW_NAME = "SELECT Name FROM AD_Window WHERE AD_WINDOW_ID=?";
|
final static String SQL_WINDOW_NAME = "SELECT Name FROM AD_Window WHERE AD_WINDOW_ID=?";
|
||||||
|
|
||||||
|
@ -132,7 +130,7 @@ public class MRelationType extends X_AD_RelationType implements IZoomProvider {
|
||||||
|
|
||||||
final int colId = MColumn.getColumn_ID(po.get_TableName(), keyColumn);
|
final int colId = MColumn.getColumn_ID(po.get_TableName(), keyColumn);
|
||||||
|
|
||||||
final PreparedStatement pstmt = DB.prepareStatement(SQL.toString(), po
|
final PreparedStatement pstmt = DB.prepareStatement(SQL, po
|
||||||
.get_TrxName());
|
.get_TrxName());
|
||||||
|
|
||||||
ResultSet rs = null;
|
ResultSet rs = null;
|
||||||
|
|
|
@ -356,7 +356,7 @@ public class UUIDGenerator extends SvrProcess {
|
||||||
public static void updateAllUUID(MColumn column) {
|
public static void updateAllUUID(MColumn column) {
|
||||||
MTable table = (MTable) column.getAD_Table();
|
MTable table = (MTable) column.getAD_Table();
|
||||||
int AD_Column_ID = DB.getSQLValue(null, "SELECT AD_Column_ID FROM AD_Column WHERE AD_Table_ID=? AND ColumnName=?", table.getAD_Table_ID(), table.getTableName()+"_ID");
|
int AD_Column_ID = DB.getSQLValue(null, "SELECT AD_Column_ID FROM AD_Column WHERE AD_Table_ID=? AND ColumnName=?", table.getAD_Table_ID(), table.getTableName()+"_ID");
|
||||||
StringBuffer sql = new StringBuffer("SELECT ");
|
StringBuilder sql = new StringBuilder("SELECT ");
|
||||||
String keyColumn = null;
|
String keyColumn = null;
|
||||||
|
|
||||||
// second script - just generate for tables with _ID primary key
|
// second script - just generate for tables with _ID primary key
|
||||||
|
|
|
@ -51,7 +51,7 @@ public class GenerateModel
|
||||||
*/
|
*/
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer ("GenerateModel[").append("]");
|
StringBuilder sb = new StringBuilder ("GenerateModel[").append("]");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ public class GenerateModel
|
||||||
System.err.println("No EntityType");
|
System.err.println("No EntityType");
|
||||||
System.exit(1);
|
System.exit(1);
|
||||||
}
|
}
|
||||||
StringBuffer sql = new StringBuffer("EntityType IN (")
|
StringBuilder sql = new StringBuilder("EntityType IN (")
|
||||||
.append(entityType).append(")");
|
.append(entityType).append(")");
|
||||||
log.info(sql.toString());
|
log.info(sql.toString());
|
||||||
log.info("----------------------------------");
|
log.info("----------------------------------");
|
||||||
|
|
|
@ -131,7 +131,7 @@ public class GenerateModelJPA
|
||||||
//String className = "X_" + tableName;
|
//String className = "X_" + tableName;
|
||||||
String className = "" + tableName;
|
String className = "" + tableName;
|
||||||
//
|
//
|
||||||
StringBuffer start = new StringBuffer ()
|
StringBuilder start = new StringBuilder ()
|
||||||
.append (COPY)
|
.append (COPY)
|
||||||
.append ("package " + packageName + ";\n"
|
.append ("package " + packageName + ";\n"
|
||||||
+ "/** Generated Model JPA - DO NOT CHANGE */\n");
|
+ "/** Generated Model JPA - DO NOT CHANGE */\n");
|
||||||
|
@ -200,12 +200,12 @@ public class GenerateModelJPA
|
||||||
+ "/** Info\n@return info\n*/\n"
|
+ "/** Info\n@return info\n*/\n"
|
||||||
+ "public String toString()"
|
+ "public String toString()"
|
||||||
+ "{"
|
+ "{"
|
||||||
+ "StringBuffer sb = new StringBuffer (\"").append(className).append("[\")"
|
+ "StringBuilder sb = new StringBuilder (\"").append(className).append("[\")"
|
||||||
+ ".append(get_ID()).append(\"]\");"
|
+ ".append(get_ID()).append(\"]\");"
|
||||||
+ "return sb.toString();"
|
+ "return sb.toString();"
|
||||||
+ "}");
|
+ "}");
|
||||||
|
|
||||||
StringBuffer end = new StringBuffer ("}");
|
StringBuilder end = new StringBuilder ("}");
|
||||||
//
|
//
|
||||||
sb.insert(0, start);
|
sb.insert(0, start);
|
||||||
sb.append(end);
|
sb.append(end);
|
||||||
|
@ -538,9 +538,9 @@ public class GenerateModelJPA
|
||||||
.append("_AD_Reference_ID=").append(AD_Reference_ID).append(";");
|
.append("_AD_Reference_ID=").append(AD_Reference_ID).append(";");
|
||||||
//
|
//
|
||||||
boolean found = false;
|
boolean found = false;
|
||||||
StringBuffer values = new StringBuffer("Reference_ID=")
|
StringBuilder values = new StringBuilder("Reference_ID=")
|
||||||
.append(AD_Reference_ID);
|
.append(AD_Reference_ID);
|
||||||
StringBuffer statement = new StringBuffer();
|
StringBuilder statement = new StringBuilder();
|
||||||
if (nullable)
|
if (nullable)
|
||||||
statement.append("if (").append(columnName).append(" == null");
|
statement.append("if (").append(columnName).append(" == null");
|
||||||
//
|
//
|
||||||
|
@ -573,7 +573,7 @@ public class GenerateModelJPA
|
||||||
// Name (SmallTalkNotation)
|
// Name (SmallTalkNotation)
|
||||||
String name = rs.getString(2);
|
String name = rs.getString(2);
|
||||||
char[] nameArray = name.toCharArray();
|
char[] nameArray = name.toCharArray();
|
||||||
StringBuffer nameClean = new StringBuffer();
|
StringBuilder nameClean = new StringBuilder();
|
||||||
boolean initCap = true;
|
boolean initCap = true;
|
||||||
for (int i = 0; i < nameArray.length; i++)
|
for (int i = 0; i < nameArray.length; i++)
|
||||||
{
|
{
|
||||||
|
@ -708,7 +708,7 @@ public class GenerateModelJPA
|
||||||
*/
|
*/
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer ("GenerateModel[")
|
StringBuilder sb = new StringBuilder ("GenerateModel[")
|
||||||
.append("]");
|
.append("]");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
} // toString
|
} // toString
|
||||||
|
@ -766,7 +766,7 @@ public class GenerateModelJPA
|
||||||
System.err.println("No EntityType");
|
System.err.println("No EntityType");
|
||||||
System.exit(1);
|
System.exit(1);
|
||||||
}
|
}
|
||||||
StringBuffer sql = new StringBuffer("EntityType IN (")
|
StringBuilder sql = new StringBuilder("EntityType IN (")
|
||||||
.append(entityType).append(")");
|
.append(entityType).append(")");
|
||||||
if (log.isLoggable(Level.INFO)) log.info(sql.toString());
|
if (log.isLoggable(Level.INFO)) log.info(sql.toString());
|
||||||
log.info("----------------------------------");
|
log.info("----------------------------------");
|
||||||
|
|
|
@ -901,7 +901,7 @@ public class Doc_MatchInv extends Doc
|
||||||
+ "WHERE C_InvoiceLine_ID IN (SELECT C_InvoiceLine_ID FROM C_InvoiceLine WHERE C_Invoice_ID=?) "
|
+ "WHERE C_InvoiceLine_ID IN (SELECT C_InvoiceLine_ID FROM C_InvoiceLine WHERE C_Invoice_ID=?) "
|
||||||
+ "AND COALESCE(Reversal_ID,0)=0";
|
+ "AND COALESCE(Reversal_ID,0)=0";
|
||||||
List<List<Object>> list = DB.getSQLArrayObjectsEx(getTrxName(), matchInvLineSql, invoice.get_ID());
|
List<List<Object>> list = DB.getSQLArrayObjectsEx(getTrxName(), matchInvLineSql, invoice.get_ID());
|
||||||
StringBuffer s = new StringBuffer();
|
StringBuilder s = new StringBuilder();
|
||||||
|
|
||||||
if (list == null)
|
if (list == null)
|
||||||
return null;
|
return null;
|
||||||
|
@ -1084,7 +1084,7 @@ public class Doc_MatchInv extends Doc
|
||||||
+ "WHERE M_InOutLine_ID IN (SELECT M_InOutLine_ID FROM M_InOutLine WHERE M_InOut_ID=?) "
|
+ "WHERE M_InOutLine_ID IN (SELECT M_InOutLine_ID FROM M_InOutLine WHERE M_InOut_ID=?) "
|
||||||
+ "AND COALESCE(Reversal_ID,0)=0";
|
+ "AND COALESCE(Reversal_ID,0)=0";
|
||||||
List<List<Object>> list = DB.getSQLArrayObjectsEx(getTrxName(), matchInvLineSql, receipt.get_ID());
|
List<List<Object>> list = DB.getSQLArrayObjectsEx(getTrxName(), matchInvLineSql, receipt.get_ID());
|
||||||
StringBuffer s = new StringBuffer();
|
StringBuilder s = new StringBuilder();
|
||||||
|
|
||||||
if (list == null)
|
if (list == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -406,10 +406,10 @@ public interface AdempiereDatabase
|
||||||
*/
|
*/
|
||||||
public default String getSQLCreate(MTable table)
|
public default String getSQLCreate(MTable table)
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer("CREATE TABLE ")
|
StringBuilder sb = new StringBuilder("CREATE TABLE ")
|
||||||
.append(table.getTableName()).append(" (");
|
.append(table.getTableName()).append(" (");
|
||||||
//
|
//
|
||||||
StringBuffer constraints = new StringBuffer();
|
StringBuilder constraints = new StringBuilder();
|
||||||
MColumn[] columns = table.getColumns(true);
|
MColumn[] columns = table.getColumns(true);
|
||||||
boolean columnAdded = false;
|
boolean columnAdded = false;
|
||||||
for (int i = 0; i < columns.length; i++)
|
for (int i = 0; i < columns.length; i++)
|
||||||
|
|
|
@ -565,9 +565,9 @@ public class CreateAdempiere
|
||||||
*/
|
*/
|
||||||
private boolean createTableDataRow (ResultSet rs, MTable mTable)
|
private boolean createTableDataRow (ResultSet rs, MTable mTable)
|
||||||
{
|
{
|
||||||
StringBuffer insert = new StringBuffer ("INSERT INTO ")
|
StringBuilder insert = new StringBuilder ("INSERT INTO ")
|
||||||
.append(mTable.getTableName()).append(" (");
|
.append(mTable.getTableName()).append(" (");
|
||||||
StringBuffer values = new StringBuffer ();
|
StringBuilder values = new StringBuilder ();
|
||||||
//
|
//
|
||||||
MColumn[] columns = mTable.getColumns(false);
|
MColumn[] columns = mTable.getColumns(false);
|
||||||
for (int i = 0; i < columns.length; i++)
|
for (int i = 0; i < columns.length; i++)
|
||||||
|
|
|
@ -53,11 +53,11 @@ public class LDAP
|
||||||
// ldap://dc.compiere.org
|
// ldap://dc.compiere.org
|
||||||
env.put(Context.PROVIDER_URL, ldapURL);
|
env.put(Context.PROVIDER_URL, ldapURL);
|
||||||
env.put(Context.SECURITY_AUTHENTICATION, "simple");
|
env.put(Context.SECURITY_AUTHENTICATION, "simple");
|
||||||
StringBuffer principal;
|
StringBuilder principal;
|
||||||
if ("openldap".equals(MSysConfig.getValue(MSysConfig.LDAP_TYPE))) {
|
if ("openldap".equals(MSysConfig.getValue(MSysConfig.LDAP_TYPE))) {
|
||||||
principal = new StringBuffer("uid=").append(userName).append(",").append(domain);
|
principal = new StringBuilder("uid=").append(userName).append(",").append(domain);
|
||||||
} else {
|
} else {
|
||||||
principal = new StringBuffer(userName).append("@").append(domain);
|
principal = new StringBuilder(userName).append("@").append(domain);
|
||||||
}
|
}
|
||||||
env.put(Context.SECURITY_PRINCIPAL, principal.toString());
|
env.put(Context.SECURITY_PRINCIPAL, principal.toString());
|
||||||
env.put(Context.SECURITY_CREDENTIALS, password);
|
env.put(Context.SECURITY_CREDENTIALS, password);
|
||||||
|
|
|
@ -306,7 +306,7 @@ public abstract class Convert
|
||||||
Pattern p = Pattern.compile("'[[^']*]*'");
|
Pattern p = Pattern.compile("'[[^']*]*'");
|
||||||
Matcher m = p.matcher(inputValue);
|
Matcher m = p.matcher(inputValue);
|
||||||
int i = 0;
|
int i = 0;
|
||||||
StringBuffer retValue = new StringBuffer(inputValue.length());
|
StringBuilder retValue = new StringBuilder(inputValue.length());
|
||||||
while (m.find()) {
|
while (m.find()) {
|
||||||
String var = inputValue.substring(m.start(), m.end()).replace(quoteMarker, "''"); // Put back quotes, if any
|
String var = inputValue.substring(m.start(), m.end()).replace(quoteMarker, "''"); // Put back quotes, if any
|
||||||
retVars.addElement(var);
|
retVars.addElement(var);
|
||||||
|
|
|
@ -188,7 +188,7 @@ public abstract class Convert_SQL92 extends Convert {
|
||||||
WHERE tn.AD_Tree_ID=10
|
WHERE tn.AD_Tree_ID=10
|
||||||
|
|
||||||
*/
|
*/
|
||||||
StringBuffer newFrom = new StringBuffer ();
|
StringBuilder newFrom = new StringBuilder ();
|
||||||
for (int i = 0; i < joins.size(); i++)
|
for (int i = 0; i < joins.size(); i++)
|
||||||
{
|
{
|
||||||
Join first = new Join ((String)joins.get(i));
|
Join first = new Join ((String)joins.get(i));
|
||||||
|
|
|
@ -196,7 +196,7 @@ public class Translation implements IApplication
|
||||||
String uuidColumn = MTable.getUUIDColumnName(Base_Table);
|
String uuidColumn = MTable.getUUIDColumnName(Base_Table);
|
||||||
String[] trlColumns = getTrlColumns (Base_Table);
|
String[] trlColumns = getTrlColumns (Base_Table);
|
||||||
//
|
//
|
||||||
StringBuffer sql = null;
|
StringBuilder sql = null;
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
ResultSet rs = null;
|
ResultSet rs = null;
|
||||||
try
|
try
|
||||||
|
@ -216,7 +216,7 @@ public class Translation implements IApplication
|
||||||
root.setAttribute(XML_ATTRIBUTE_TABLE, Base_Table);
|
root.setAttribute(XML_ATTRIBUTE_TABLE, Base_Table);
|
||||||
document.appendChild(root);
|
document.appendChild(root);
|
||||||
//
|
//
|
||||||
sql = new StringBuffer ("SELECT ");
|
sql = new StringBuilder ("SELECT ");
|
||||||
if (isBaseLanguage)
|
if (isBaseLanguage)
|
||||||
sql.append("'Y',"); // 1
|
sql.append("'Y',"); // 1
|
||||||
else
|
else
|
||||||
|
|
|
@ -82,7 +82,7 @@ public class CalloutEngine implements Callout
|
||||||
|
|
||||||
//
|
//
|
||||||
String retValue = "";
|
String retValue = "";
|
||||||
StringBuffer msg = new StringBuffer(methodName).append(" - ")
|
StringBuilder msg = new StringBuilder(methodName).append(" - ")
|
||||||
.append(mField.getColumnName())
|
.append(mField.getColumnName())
|
||||||
.append("=").append(value)
|
.append("=").append(value)
|
||||||
.append(" (old=").append(oldValue)
|
.append(" (old=").append(oldValue)
|
||||||
|
@ -143,7 +143,7 @@ public class CalloutEngine implements Callout
|
||||||
throw new IllegalArgumentException ("No Method Name");
|
throw new IllegalArgumentException ("No Method Name");
|
||||||
//
|
//
|
||||||
String retValue = null;
|
String retValue = null;
|
||||||
StringBuffer msg = new StringBuffer(methodName).append(" - ").append(value);
|
StringBuilder msg = new StringBuilder(methodName).append(" - ").append(value);
|
||||||
if (log.isLoggable(Level.INFO)) log.info (msg.toString());
|
if (log.isLoggable(Level.INFO)) log.info (msg.toString());
|
||||||
//
|
//
|
||||||
// Find Method
|
// Find Method
|
||||||
|
|
|
@ -2218,7 +2218,7 @@ public class GridField
|
||||||
*/
|
*/
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer("GridField[")
|
StringBuilder sb = new StringBuilder("GridField[")
|
||||||
.append(m_vo.ColumnName).append("=").append(m_value);
|
.append(m_vo.ColumnName).append("=").append(m_value);
|
||||||
if (isKey())
|
if (isKey())
|
||||||
sb.append("(Key)");
|
sb.append("(Key)");
|
||||||
|
|
|
@ -636,7 +636,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
||||||
* Set Where Clause
|
* Set Where Clause
|
||||||
*/
|
*/
|
||||||
// Tab Where Clause
|
// Tab Where Clause
|
||||||
StringBuffer where = new StringBuffer(m_vo.WhereClause);
|
StringBuilder where = new StringBuilder(m_vo.WhereClause);
|
||||||
if (m_vo.onlyCurrentDays > 0)
|
if (m_vo.onlyCurrentDays > 0)
|
||||||
{
|
{
|
||||||
if (where.length() > 0)
|
if (where.length() > 0)
|
||||||
|
@ -739,9 +739,9 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
||||||
public void resetDetailForNewParentRecord() {
|
public void resetDetailForNewParentRecord() {
|
||||||
if (m_mTable.isOpen())
|
if (m_mTable.isOpen())
|
||||||
{
|
{
|
||||||
StringBuffer where = new StringBuffer("2=3");
|
String where = "2=3";
|
||||||
m_extendedWhere = where.toString();
|
m_extendedWhere = where;
|
||||||
m_oldQuery = where.toString();
|
m_oldQuery = where;
|
||||||
m_parentNeedSave = true;
|
m_parentNeedSave = true;
|
||||||
|
|
||||||
m_currentRow = -1;
|
m_currentRow = -1;
|
||||||
|
@ -749,7 +749,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
||||||
* Query
|
* Query
|
||||||
*/
|
*/
|
||||||
if (log.isLoggable(Level.FINE)) log.fine("#" + m_vo.TabNo + " - " + where);
|
if (log.isLoggable(Level.FINE)) log.fine("#" + m_vo.TabNo + " - " + where);
|
||||||
m_mTable.dataRequery(where.toString(), m_vo.onlyCurrentRows && !isDetail(), 0);
|
m_mTable.dataRequery(where, m_vo.onlyCurrentRows && !isDetail(), 0);
|
||||||
|
|
||||||
// Go to Record 0
|
// Go to Record 0
|
||||||
setCurrentRow(0, true);
|
setCurrentRow(0, true);
|
||||||
|
@ -888,7 +888,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
||||||
|
|
||||||
query.setTableName("xx");
|
query.setTableName("xx");
|
||||||
// use IN instead of EXISTS as subquery should be highly selective
|
// use IN instead of EXISTS as subquery should be highly selective
|
||||||
StringBuffer result = new StringBuffer (getTableName()).append(".").append(tabKeyColumn)
|
StringBuilder result = new StringBuilder (getTableName()).append(".").append(tabKeyColumn)
|
||||||
.append(" IN (SELECT xx.").append(tabKeyColumn)
|
.append(" IN (SELECT xx.").append(tabKeyColumn)
|
||||||
.append(" FROM ")
|
.append(" FROM ")
|
||||||
.append(tableName).append(" xx WHERE ")
|
.append(tableName).append(" xx WHERE ")
|
||||||
|
@ -1855,7 +1855,7 @@ public class GridTab implements DataStatusListener, Evaluatee, Serializable
|
||||||
int Record_ID;
|
int Record_ID;
|
||||||
boolean isOrder = m_vo.TableName.startsWith("C_Order");
|
boolean isOrder = m_vo.TableName.startsWith("C_Order");
|
||||||
//
|
//
|
||||||
StringBuffer sql = new StringBuffer("SELECT COUNT(*) AS Lines,c.ISO_Code,o.TotalLines,o.GrandTotal,"
|
StringBuilder sql = new StringBuilder("SELECT COUNT(*) AS Lines,c.ISO_Code,o.TotalLines,o.GrandTotal,"
|
||||||
+ "currencyBase(o.GrandTotal,o.C_Currency_ID,o.DateAcct, o.AD_Client_ID,o.AD_Org_ID) AS ConvAmt ");
|
+ "currencyBase(o.GrandTotal,o.C_Currency_ID,o.DateAcct, o.AD_Client_ID,o.AD_Org_ID) AS ConvAmt ");
|
||||||
if (isOrder)
|
if (isOrder)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2077,7 +2077,7 @@ public class GridTable extends AbstractTableModel
|
||||||
|
|
||||||
// Need to re-read row to get ROWID, Key, DocumentNo, Trigger, virtual columns
|
// Need to re-read row to get ROWID, Key, DocumentNo, Trigger, virtual columns
|
||||||
if (log.isLoggable(Level.FINE)) log.fine("Reading ... " + whereClause);
|
if (log.isLoggable(Level.FINE)) log.fine("Reading ... " + whereClause);
|
||||||
StringBuffer refreshSQL = new StringBuffer(m_SQL_Select)
|
StringBuilder refreshSQL = new StringBuilder(m_SQL_Select)
|
||||||
.append(" WHERE ").append(whereClause);
|
.append(" WHERE ").append(whereClause);
|
||||||
pstmt = DB.prepareStatement(refreshSQL.toString(), null);
|
pstmt = DB.prepareStatement(refreshSQL.toString(), null);
|
||||||
rs = pstmt.executeQuery();
|
rs = pstmt.executeQuery();
|
||||||
|
@ -2279,7 +2279,7 @@ public class GridTable extends AbstractTableModel
|
||||||
// Refresh - update buffer
|
// Refresh - update buffer
|
||||||
String whereClause = po.get_WhereClause(true);
|
String whereClause = po.get_WhereClause(true);
|
||||||
if (log.isLoggable(Level.FINE)) log.fine("Reading ... " + whereClause);
|
if (log.isLoggable(Level.FINE)) log.fine("Reading ... " + whereClause);
|
||||||
StringBuffer refreshSQL = new StringBuffer(m_SQL_Select)
|
StringBuilder refreshSQL = new StringBuilder(m_SQL_Select)
|
||||||
.append(" WHERE ").append(whereClause);
|
.append(" WHERE ").append(whereClause);
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
ResultSet rs = null;
|
ResultSet rs = null;
|
||||||
|
@ -2349,8 +2349,8 @@ public class GridTable extends AbstractTableModel
|
||||||
private String getWhereClause (Object[] rowData)
|
private String getWhereClause (Object[] rowData)
|
||||||
{
|
{
|
||||||
int size = m_fields.size();
|
int size = m_fields.size();
|
||||||
StringBuffer singleRowWHERE = null;
|
StringBuilder singleRowWHERE = null;
|
||||||
StringBuffer multiRowWHERE = null;
|
StringBuilder multiRowWHERE = null;
|
||||||
String tableName = getTableName();
|
String tableName = getTableName();
|
||||||
for (int col = 0; col < size; col++)
|
for (int col = 0; col < size; col++)
|
||||||
{
|
{
|
||||||
|
@ -2365,10 +2365,10 @@ public class GridTable extends AbstractTableModel
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (columnName.endsWith ("_ID"))
|
if (columnName.endsWith ("_ID"))
|
||||||
singleRowWHERE = new StringBuffer(tableName).append(".").append(columnName)
|
singleRowWHERE = new StringBuilder(tableName).append(".").append(columnName)
|
||||||
.append ("=").append (value);
|
.append ("=").append (value);
|
||||||
else
|
else
|
||||||
singleRowWHERE = new StringBuffer(tableName).append(".").append(columnName)
|
singleRowWHERE = new StringBuilder(tableName).append(".").append(columnName)
|
||||||
.append ("=").append (DB.TO_STRING(value.toString()));
|
.append ("=").append (DB.TO_STRING(value.toString()));
|
||||||
}
|
}
|
||||||
else if (field.isParentColumn())
|
else if (field.isParentColumn())
|
||||||
|
@ -2381,7 +2381,7 @@ public class GridTable extends AbstractTableModel
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (multiRowWHERE == null)
|
if (multiRowWHERE == null)
|
||||||
multiRowWHERE = new StringBuffer();
|
multiRowWHERE = new StringBuilder();
|
||||||
else
|
else
|
||||||
multiRowWHERE.append(" AND ");
|
multiRowWHERE.append(" AND ");
|
||||||
if (columnName.endsWith ("_ID"))
|
if (columnName.endsWith ("_ID"))
|
||||||
|
@ -3486,7 +3486,7 @@ public class GridTable extends AbstractTableModel
|
||||||
*/
|
*/
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
return new StringBuffer("MTable[").append(m_tableName)
|
return new StringBuilder("MTable[").append(m_tableName)
|
||||||
.append(",WindowNo=").append(m_WindowNo)
|
.append(",WindowNo=").append(m_WindowNo)
|
||||||
.append(",Tab=").append(m_TabNo).append("]").toString();
|
.append(",Tab=").append(m_TabNo).append("]").toString();
|
||||||
} // toString
|
} // toString
|
||||||
|
|
|
@ -109,7 +109,7 @@ public class GridWindowVO implements Serializable
|
||||||
|
|
||||||
// -- Get Window
|
// -- Get Window
|
||||||
|
|
||||||
StringBuffer sql = new StringBuffer("SELECT Name,Description,Help,WindowType, "
|
StringBuilder sql = new StringBuilder("SELECT Name,Description,Help,WindowType, "
|
||||||
+ "AD_Color_ID,AD_Image_ID,WinHeight,WinWidth, "
|
+ "AD_Color_ID,AD_Image_ID,WinHeight,WinWidth, "
|
||||||
+ "IsSOTrx, AD_Window_UU ");
|
+ "IsSOTrx, AD_Window_UU ");
|
||||||
|
|
||||||
|
|
|
@ -288,7 +288,7 @@ implements DocAction
|
||||||
|
|
||||||
public String getSummary()
|
public String getSummary()
|
||||||
{
|
{
|
||||||
return new StringBuffer()
|
return new StringBuilder()
|
||||||
.append(getDocumentNo()).append("/").append(getDateDoc())
|
.append(getDocumentNo()).append("/").append(getDateDoc())
|
||||||
.toString();
|
.toString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,7 @@ public class MBankAccountProcessor extends X_C_BankAccount_Processor {
|
||||||
int AD_Client_ID, int C_Currency_ID, BigDecimal Amt, String trxName)
|
int AD_Client_ID, int C_Currency_ID, BigDecimal Amt, String trxName)
|
||||||
{
|
{
|
||||||
ArrayList<MBankAccountProcessor> list = new ArrayList<MBankAccountProcessor>();
|
ArrayList<MBankAccountProcessor> list = new ArrayList<MBankAccountProcessor>();
|
||||||
StringBuffer sql = new StringBuffer("SELECT bap.* "
|
StringBuilder sql = new StringBuilder("SELECT bap.* "
|
||||||
+ "FROM C_BankAccount_Processor bap, C_PaymentProcessor pp, C_BankAccount ba "
|
+ "FROM C_BankAccount_Processor bap, C_PaymentProcessor pp, C_BankAccount ba "
|
||||||
+ "WHERE pp.C_PaymentProcessor_ID = bap.C_PaymentProcessor_ID"
|
+ "WHERE pp.C_PaymentProcessor_ID = bap.C_PaymentProcessor_ID"
|
||||||
+ " AND ba.C_BankAccount_ID = bap.C_BankAccount_ID"
|
+ " AND ba.C_BankAccount_ID = bap.C_BankAccount_ID"
|
||||||
|
|
|
@ -88,7 +88,7 @@ public class MChartDatasource extends X_AD_ChartDatasource {
|
||||||
sql += " GROUP BY " + series + ", " + category + "," + getKeyColumn()
|
sql += " GROUP BY " + series + ", " + category + "," + getKeyColumn()
|
||||||
+ " ORDER BY " + series + ", " + category + "," + getKeyColumn();
|
+ " ORDER BY " + series + ", " + category + "," + getKeyColumn();
|
||||||
|
|
||||||
StringBuffer includedIds = new StringBuffer();
|
StringBuilder includedIds = new StringBuilder();
|
||||||
// Execute
|
// Execute
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
ResultSet rs = null;
|
ResultSet rs = null;
|
||||||
|
|
|
@ -53,7 +53,7 @@ public class MDashboardContentAccess extends X_PA_DashboardContent_Access {
|
||||||
parameters.add(AD_Client_ID);
|
parameters.add(AD_Client_ID);
|
||||||
parameters.add(AD_Client_ID);
|
parameters.add(AD_Client_ID);
|
||||||
|
|
||||||
StringBuffer sql= new StringBuffer();
|
StringBuilder sql= new StringBuilder();
|
||||||
// First part : dashboards not configured in access and flagged to be shown in login (this is intended to show new dashboards, otherwise new dashboards won't be shown unless the user go and configure them)
|
// First part : dashboards not configured in access and flagged to be shown in login (this is intended to show new dashboards, otherwise new dashboards won't be shown unless the user go and configure them)
|
||||||
sql.append("SELECT PA_DashboardContent_ID,ColumnNo ")
|
sql.append("SELECT PA_DashboardContent_ID,ColumnNo ")
|
||||||
.append(" FROM PA_DashboardContent ")
|
.append(" FROM PA_DashboardContent ")
|
||||||
|
|
|
@ -182,7 +182,7 @@ public class MDepositBatch extends X_C_DepositBatch
|
||||||
*/
|
*/
|
||||||
public String toString ()
|
public String toString ()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer ("MDepositBatch[");
|
StringBuilder sb = new StringBuilder ("MDepositBatch[");
|
||||||
sb.append(get_ID()).append(",").append(getDescription())
|
sb.append(get_ID()).append(",").append(getDescription())
|
||||||
.append(",Amount=").append(getDepositAmt())
|
.append(",Amount=").append(getDepositAmt())
|
||||||
.append ("]");
|
.append ("]");
|
||||||
|
|
|
@ -91,7 +91,7 @@ public class MDocumentStatus extends X_PA_DocumentStatus {
|
||||||
} // getDocumentStatusIndicators
|
} // getDocumentStatusIndicators
|
||||||
|
|
||||||
public static int evaluate(MDocumentStatus documentStatus) {
|
public static int evaluate(MDocumentStatus documentStatus) {
|
||||||
StringBuffer sql = new StringBuffer("SELECT COUNT(*) FROM ");
|
StringBuilder sql = new StringBuilder("SELECT COUNT(*) FROM ");
|
||||||
String tableName = MTable.getTableName(Env.getCtx(), documentStatus.getAD_Table_ID());
|
String tableName = MTable.getTableName(Env.getCtx(), documentStatus.getAD_Table_ID());
|
||||||
sql.append(tableName);
|
sql.append(tableName);
|
||||||
String where = getWhereClause(documentStatus);
|
String where = getWhereClause(documentStatus);
|
||||||
|
@ -102,7 +102,7 @@ public class MDocumentStatus extends X_PA_DocumentStatus {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getWhereClause(MDocumentStatus documentStatus) {
|
public static String getWhereClause(MDocumentStatus documentStatus) {
|
||||||
StringBuffer where = new StringBuffer(" AD_Client_ID=" + Env.getAD_Client_ID(Env.getCtx()) );
|
StringBuilder where = new StringBuilder(" AD_Client_ID=" + Env.getAD_Client_ID(Env.getCtx()) );
|
||||||
if (documentStatus.getC_Project_ID() > 0)
|
if (documentStatus.getC_Project_ID() > 0)
|
||||||
{
|
{
|
||||||
where.append(" AND C_Project_ID=").append(documentStatus.getC_Project_ID());
|
where.append(" AND C_Project_ID=").append(documentStatus.getC_Project_ID());
|
||||||
|
|
|
@ -57,7 +57,7 @@ public class MIFixedAsset extends X_I_FixedAsset
|
||||||
|
|
||||||
int M_Product_ID = getM_Product_ID();
|
int M_Product_ID = getM_Product_ID();
|
||||||
if (M_Product_ID <= 0) {
|
if (M_Product_ID <= 0) {
|
||||||
StringBuffer whereClause = new StringBuffer();
|
StringBuilder whereClause = new StringBuilder();
|
||||||
String key = getProductValue();
|
String key = getProductValue();
|
||||||
if (key == null || key.trim().length() == 0) {
|
if (key == null || key.trim().length() == 0) {
|
||||||
key = getName();
|
key = getName();
|
||||||
|
|
|
@ -197,7 +197,7 @@ public class MNote extends X_AD_Note
|
||||||
*/
|
*/
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer ("MNote[")
|
StringBuilder sb = new StringBuilder ("MNote[")
|
||||||
.append(get_ID()).append(",AD_Message_ID=").append(getAD_Message_ID())
|
.append(get_ID()).append(",AD_Message_ID=").append(getAD_Message_ID())
|
||||||
.append(",").append(getReference())
|
.append(",").append(getReference())
|
||||||
.append(",Processed=").append(isProcessed())
|
.append(",Processed=").append(isProcessed())
|
||||||
|
|
|
@ -578,7 +578,7 @@ public class MOrder extends X_C_Order implements DocAction
|
||||||
*/
|
*/
|
||||||
public String toString ()
|
public String toString ()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer ("MOrder[")
|
StringBuilder sb = new StringBuilder ("MOrder[")
|
||||||
.append(get_ID()).append("-").append(getDocumentNo())
|
.append(get_ID()).append("-").append(getDocumentNo())
|
||||||
.append(",IsSOTrx=").append(isSOTrx())
|
.append(",IsSOTrx=").append(isSOTrx())
|
||||||
.append(",C_DocType_ID=").append(getC_DocType_ID())
|
.append(",C_DocType_ID=").append(getC_DocType_ID())
|
||||||
|
|
|
@ -605,7 +605,7 @@ public class MOrderLine extends X_C_OrderLine
|
||||||
*/
|
*/
|
||||||
public String toString ()
|
public String toString ()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer ("MOrderLine[")
|
StringBuilder sb = new StringBuilder ("MOrderLine[")
|
||||||
.append(get_ID())
|
.append(get_ID())
|
||||||
.append(", Line=").append(getLine())
|
.append(", Line=").append(getLine())
|
||||||
.append(", Ordered=").append(getQtyOrdered())
|
.append(", Ordered=").append(getQtyOrdered())
|
||||||
|
|
|
@ -258,7 +258,7 @@ public class MOrderTax extends X_C_OrderTax
|
||||||
*/
|
*/
|
||||||
public String toString ()
|
public String toString ()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer ("MOrderTax[")
|
StringBuilder sb = new StringBuilder ("MOrderTax[")
|
||||||
.append("C_Order_ID=").append(getC_Order_ID())
|
.append("C_Order_ID=").append(getC_Order_ID())
|
||||||
.append(", C_Tax_ID=").append(getC_Tax_ID())
|
.append(", C_Tax_ID=").append(getC_Tax_ID())
|
||||||
.append(", Base=").append(getTaxBaseAmt())
|
.append(", Base=").append(getTaxBaseAmt())
|
||||||
|
|
|
@ -286,7 +286,7 @@ public class MPInstance extends X_AD_PInstance
|
||||||
*/
|
*/
|
||||||
public String toString ()
|
public String toString ()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer ("MPInstance[")
|
StringBuilder sb = new StringBuilder ("MPInstance[")
|
||||||
.append (get_ID())
|
.append (get_ID())
|
||||||
.append(",OK=").append(isOK());
|
.append(",OK=").append(isOK());
|
||||||
String msg = getErrorMsg();
|
String msg = getErrorMsg();
|
||||||
|
|
|
@ -93,7 +93,7 @@ public class MPInstancePara extends X_AD_PInstance_Para
|
||||||
*/
|
*/
|
||||||
public String toString ()
|
public String toString ()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer ("MPInstancePara[")
|
StringBuilder sb = new StringBuilder ("MPInstancePara[")
|
||||||
.append (get_ID ()).append("-").append(getParameterName());
|
.append (get_ID ()).append("-").append(getParameterName());
|
||||||
if (getP_String() != null)
|
if (getP_String() != null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -85,7 +85,7 @@ public class MPaymentProcessor extends X_C_PaymentProcessor
|
||||||
*/
|
*/
|
||||||
public String toString ()
|
public String toString ()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer ("MPaymentProcessor[")
|
StringBuilder sb = new StringBuilder ("MPaymentProcessor[")
|
||||||
.append(get_ID ()).append("-").append(getName())
|
.append(get_ID ()).append("-").append(getName())
|
||||||
.append ("]");
|
.append ("]");
|
||||||
return sb.toString ();
|
return sb.toString ();
|
||||||
|
|
|
@ -119,7 +119,7 @@ public class MPrivateAccess extends X_AD_Private_Access
|
||||||
if (list.size() == 1)
|
if (list.size() == 1)
|
||||||
return "<>" + list.get(0);
|
return "<>" + list.get(0);
|
||||||
//
|
//
|
||||||
StringBuffer sb = new StringBuffer(" NOT IN(");
|
StringBuilder sb = new StringBuilder(" NOT IN(");
|
||||||
for (int i = 0; i < list.size(); i++)
|
for (int i = 0; i < list.size(); i++)
|
||||||
{
|
{
|
||||||
if (i > 0)
|
if (i > 0)
|
||||||
|
|
|
@ -189,7 +189,7 @@ public class MProcess extends X_AD_Process
|
||||||
*/
|
*/
|
||||||
public String toString ()
|
public String toString ()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer ("MProcess[")
|
StringBuilder sb = new StringBuilder ("MProcess[")
|
||||||
.append (get_ID())
|
.append (get_ID())
|
||||||
.append("-").append(getName())
|
.append("-").append(getName())
|
||||||
.append ("]");
|
.append ("]");
|
||||||
|
|
|
@ -210,7 +210,7 @@ public class MProcessPara extends X_AD_Process_Para
|
||||||
*/
|
*/
|
||||||
public String toString ()
|
public String toString ()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer ("MProcessPara[")
|
StringBuilder sb = new StringBuilder ("MProcessPara[")
|
||||||
.append (get_ID ())
|
.append (get_ID ())
|
||||||
.append ("]");
|
.append ("]");
|
||||||
return sb.toString ();
|
return sb.toString ();
|
||||||
|
|
|
@ -139,7 +139,7 @@ public class MProductDownload extends X_M_ProductDownload
|
||||||
*/
|
*/
|
||||||
public String toString ()
|
public String toString ()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer ("MProductDownload[")
|
StringBuilder sb = new StringBuilder ("MProductDownload[")
|
||||||
.append(get_ID())
|
.append(get_ID())
|
||||||
.append(",M_Product_ID=").append(getM_Product_ID())
|
.append(",M_Product_ID=").append(getM_Product_ID())
|
||||||
.append(",").append(getDownloadURL())
|
.append(",").append(getDownloadURL())
|
||||||
|
|
|
@ -140,7 +140,7 @@ public class MProject extends X_C_Project
|
||||||
*/
|
*/
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer ("MProject[").append(get_ID())
|
StringBuilder sb = new StringBuilder ("MProject[").append(get_ID())
|
||||||
.append("-").append(getValue()).append(",ProjectCategory=").append(getProjectCategory())
|
.append("-").append(getValue()).append(",ProjectCategory=").append(getProjectCategory())
|
||||||
.append("]");
|
.append("]");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
|
|
|
@ -99,7 +99,7 @@ public class MProjectType extends X_C_ProjectType
|
||||||
*/
|
*/
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer ("MProjectType[")
|
StringBuilder sb = new StringBuilder ("MProjectType[")
|
||||||
.append(get_ID())
|
.append(get_ID())
|
||||||
.append("-").append(getName())
|
.append("-").append(getName())
|
||||||
.append("]");
|
.append("]");
|
||||||
|
|
|
@ -250,7 +250,7 @@ public class MRMATax extends X_M_RMATax
|
||||||
*/
|
*/
|
||||||
public String toString ()
|
public String toString ()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer ("MRMATax[")
|
StringBuilder sb = new StringBuilder ("MRMATax[")
|
||||||
.append("M_RMA_ID=").append(getM_RMA_ID())
|
.append("M_RMA_ID=").append(getM_RMA_ID())
|
||||||
.append(", C_Tax_ID=").append(getC_Tax_ID())
|
.append(", C_Tax_ID=").append(getC_Tax_ID())
|
||||||
.append(", Base=").append(getTaxBaseAmt())
|
.append(", Base=").append(getTaxBaseAmt())
|
||||||
|
|
|
@ -197,7 +197,7 @@ public class MRecordAccess extends X_AD_Record_Access
|
||||||
*/
|
*/
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer("MRecordAccess[AD_Role_ID=")
|
StringBuilder sb = new StringBuilder("MRecordAccess[AD_Role_ID=")
|
||||||
.append(getAD_Role_ID())
|
.append(getAD_Role_ID())
|
||||||
.append(",AD_Table_ID=").append(getAD_Table_ID())
|
.append(",AD_Table_ID=").append(getAD_Table_ID())
|
||||||
.append(",Record_ID=").append(getRecord_ID())
|
.append(",Record_ID=").append(getRecord_ID())
|
||||||
|
|
|
@ -64,7 +64,7 @@ public class MRecurring extends X_C_Recurring
|
||||||
*/
|
*/
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer ("MRecurring[")
|
StringBuilder sb = new StringBuilder ("MRecurring[")
|
||||||
.append(get_ID()).append("-").append(getName());
|
.append(get_ID()).append("-").append(getName());
|
||||||
if (getRecurringType().equals(MRecurring.RECURRINGTYPE_Order))
|
if (getRecurringType().equals(MRecurring.RECURRINGTYPE_Order))
|
||||||
sb.append(",C_Order_ID=").append(getC_Order_ID());
|
sb.append(",C_Order_ID=").append(getC_Order_ID());
|
||||||
|
|
|
@ -179,7 +179,7 @@ public class MResource extends X_S_Resource
|
||||||
@Override
|
@Override
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer ("MResource[")
|
StringBuilder sb = new StringBuilder ("MResource[")
|
||||||
.append(get_ID())
|
.append(get_ID())
|
||||||
.append(", Value=").append(getValue())
|
.append(", Value=").append(getValue())
|
||||||
.append(", Name=").append(getName())
|
.append(", Name=").append(getName())
|
||||||
|
|
|
@ -2395,8 +2395,8 @@ public final class MRole extends X_AD_Role
|
||||||
{
|
{
|
||||||
loadRecordAccess(false);
|
loadRecordAccess(false);
|
||||||
//
|
//
|
||||||
StringBuffer sbInclude = new StringBuffer();
|
StringBuilder sbInclude = new StringBuilder();
|
||||||
StringBuffer sbExclude = new StringBuffer();
|
StringBuilder sbExclude = new StringBuilder();
|
||||||
// Role Access
|
// Role Access
|
||||||
for (int i = 0; i < m_recordAccess.length; i++)
|
for (int i = 0; i < m_recordAccess.length; i++)
|
||||||
{
|
{
|
||||||
|
@ -2559,7 +2559,7 @@ public final class MRole extends X_AD_Role
|
||||||
final ArrayList<String> validOptions = new ArrayList<String>();
|
final ArrayList<String> validOptions = new ArrayList<String>();
|
||||||
final List<Object> optionParams = new ArrayList<Object>();
|
final List<Object> optionParams = new ArrayList<Object>();
|
||||||
//
|
//
|
||||||
final StringBuffer sql_values = new StringBuffer();
|
final StringBuilder sql_values = new StringBuilder();
|
||||||
for (int i = 0; i < maxIndex; i++) {
|
for (int i = 0; i < maxIndex; i++) {
|
||||||
if (sql_values.length() > 0)
|
if (sql_values.length() > 0)
|
||||||
sql_values.append(",");
|
sql_values.append(",");
|
||||||
|
|
|
@ -56,7 +56,7 @@ public class MRoleIncluded extends X_AD_Role_Included
|
||||||
List<Integer> trace = new ArrayList<Integer>();
|
List<Integer> trace = new ArrayList<Integer>();
|
||||||
if (hasLoop(Table_Name, COLUMNNAME_Included_Role_ID, COLUMNNAME_AD_Role_ID, getIncluded_Role_ID(), trace, get_TrxName()))
|
if (hasLoop(Table_Name, COLUMNNAME_Included_Role_ID, COLUMNNAME_AD_Role_ID, getIncluded_Role_ID(), trace, get_TrxName()))
|
||||||
{
|
{
|
||||||
StringBuffer roles = new StringBuffer();
|
StringBuilder roles = new StringBuilder();
|
||||||
for (int role_id : trace)
|
for (int role_id : trace)
|
||||||
{
|
{
|
||||||
MRole role = MRole.get(getCtx(), role_id);
|
MRole role = MRole.get(getCtx(), role_id);
|
||||||
|
|
|
@ -1292,7 +1292,7 @@ public class MSequence extends X_AD_Sequence
|
||||||
String website, String prm_USER, String prm_PASSWORD,
|
String website, String prm_USER, String prm_PASSWORD,
|
||||||
String prm_TABLE, String prm_ALTKEY, String prm_COMMENT,
|
String prm_TABLE, String prm_ALTKEY, String prm_COMMENT,
|
||||||
String prm_PROJECT) {
|
String prm_PROJECT) {
|
||||||
StringBuffer read = new StringBuffer();
|
StringBuilder read = new StringBuilder();
|
||||||
int retValue = -1;
|
int retValue = -1;
|
||||||
try {
|
try {
|
||||||
String completeUrl = website + "?" + "USER="
|
String completeUrl = website + "?" + "USER="
|
||||||
|
|
|
@ -221,7 +221,7 @@ public class MSession extends X_AD_Session
|
||||||
*/
|
*/
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer("MSession[")
|
StringBuilder sb = new StringBuilder("MSession[")
|
||||||
.append(getAD_Session_ID())
|
.append(getAD_Session_ID())
|
||||||
.append(",AD_User_ID=").append(getCreatedBy())
|
.append(",AD_User_ID=").append(getCreatedBy())
|
||||||
.append(",").append(getCreated())
|
.append(",").append(getCreated())
|
||||||
|
|
|
@ -427,7 +427,7 @@ public final class MSetup
|
||||||
// Standard variables
|
// Standard variables
|
||||||
m_info = new StringBuffer();
|
m_info = new StringBuffer();
|
||||||
String name = null;
|
String name = null;
|
||||||
StringBuffer sqlCmd = null;
|
StringBuilder sqlCmd = null;
|
||||||
int no = 0;
|
int no = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -595,7 +595,7 @@ public final class MSetup
|
||||||
|
|
||||||
if (IsMandatory != null)
|
if (IsMandatory != null)
|
||||||
{
|
{
|
||||||
sqlCmd = new StringBuffer ("INSERT INTO C_AcctSchema_Element(");
|
sqlCmd = new StringBuilder ("INSERT INTO C_AcctSchema_Element(");
|
||||||
sqlCmd.append(m_stdColumns).append(",C_AcctSchema_Element_ID,C_AcctSchema_ID,")
|
sqlCmd.append(m_stdColumns).append(",C_AcctSchema_Element_ID,C_AcctSchema_ID,")
|
||||||
.append("ElementType,Name,SeqNo,IsMandatory,IsBalanced,C_AcctSchema_Element_UU) VALUES (");
|
.append("ElementType,Name,SeqNo,IsMandatory,IsBalanced,C_AcctSchema_Element_UU) VALUES (");
|
||||||
sqlCmd.append(m_stdValues).append(",").append(C_AcctSchema_Element_ID).append(",").append(m_as.getC_AcctSchema_ID()).append(",")
|
sqlCmd.append(m_stdValues).append(",").append(C_AcctSchema_Element_ID).append(",").append(m_as.getC_AcctSchema_ID()).append(",")
|
||||||
|
@ -608,7 +608,7 @@ public final class MSetup
|
||||||
/** Default value for mandatory elements: OO and AC */
|
/** Default value for mandatory elements: OO and AC */
|
||||||
if (ElementType.equals("OO"))
|
if (ElementType.equals("OO"))
|
||||||
{
|
{
|
||||||
sqlCmd = new StringBuffer ("UPDATE C_AcctSchema_Element SET Org_ID=");
|
sqlCmd = new StringBuilder ("UPDATE C_AcctSchema_Element SET Org_ID=");
|
||||||
sqlCmd.append(getAD_Org_ID()).append(" WHERE C_AcctSchema_Element_ID=").append(C_AcctSchema_Element_ID);
|
sqlCmd.append(getAD_Org_ID()).append(" WHERE C_AcctSchema_Element_ID=").append(C_AcctSchema_Element_ID);
|
||||||
no = DB.executeUpdateEx(sqlCmd.toString(), m_trx.getTrxName());
|
no = DB.executeUpdateEx(sqlCmd.toString(), m_trx.getTrxName());
|
||||||
if (no != 1)
|
if (no != 1)
|
||||||
|
@ -616,7 +616,7 @@ public final class MSetup
|
||||||
}
|
}
|
||||||
if (ElementType.equals("AC"))
|
if (ElementType.equals("AC"))
|
||||||
{
|
{
|
||||||
sqlCmd = new StringBuffer ("UPDATE C_AcctSchema_Element SET C_ElementValue_ID=");
|
sqlCmd = new StringBuilder ("UPDATE C_AcctSchema_Element SET C_ElementValue_ID=");
|
||||||
sqlCmd.append(C_ElementValue_ID).append(", C_Element_ID=").append(C_Element_ID);
|
sqlCmd.append(C_ElementValue_ID).append(", C_Element_ID=").append(C_Element_ID);
|
||||||
sqlCmd.append(" WHERE C_AcctSchema_Element_ID=").append(C_AcctSchema_Element_ID);
|
sqlCmd.append(" WHERE C_AcctSchema_Element_ID=").append(C_AcctSchema_Element_ID);
|
||||||
no = DB.executeUpdateEx(sqlCmd.toString(), m_trx.getTrxName());
|
no = DB.executeUpdateEx(sqlCmd.toString(), m_trx.getTrxName());
|
||||||
|
@ -798,7 +798,7 @@ public final class MSetup
|
||||||
createPreference("C_DocTypeTarget_ID", String.valueOf(DT), 143);
|
createPreference("C_DocTypeTarget_ID", String.valueOf(DT), 143);
|
||||||
|
|
||||||
// Update ClientInfo
|
// Update ClientInfo
|
||||||
sqlCmd = new StringBuffer ("UPDATE AD_ClientInfo SET ");
|
sqlCmd = new StringBuilder ("UPDATE AD_ClientInfo SET ");
|
||||||
sqlCmd.append("C_AcctSchema1_ID=").append(m_as.getC_AcctSchema_ID())
|
sqlCmd.append("C_AcctSchema1_ID=").append(m_as.getC_AcctSchema_ID())
|
||||||
.append(", C_Calendar_ID=").append(m_calendar.getC_Calendar_ID())
|
.append(", C_Calendar_ID=").append(m_calendar.getC_Calendar_ID())
|
||||||
.append(" WHERE AD_Client_ID=").append(m_client.getAD_Client_ID());
|
.append(" WHERE AD_Client_ID=").append(m_client.getAD_Client_ID());
|
||||||
|
@ -1012,12 +1012,12 @@ public final class MSetup
|
||||||
//
|
//
|
||||||
String defaultName = Msg.translate(m_lang, "Standard");
|
String defaultName = Msg.translate(m_lang, "Standard");
|
||||||
String defaultEntry = "'" + defaultName + "',";
|
String defaultEntry = "'" + defaultName + "',";
|
||||||
StringBuffer sqlCmd = null;
|
StringBuilder sqlCmd = null;
|
||||||
int no = 0;
|
int no = 0;
|
||||||
|
|
||||||
// Create Marketing Channel/Campaign
|
// Create Marketing Channel/Campaign
|
||||||
int C_Channel_ID = getNextID(getAD_Client_ID(), "C_Channel");
|
int C_Channel_ID = getNextID(getAD_Client_ID(), "C_Channel");
|
||||||
sqlCmd = new StringBuffer("INSERT INTO C_Channel ");
|
sqlCmd = new StringBuilder("INSERT INTO C_Channel ");
|
||||||
sqlCmd.append("(C_Channel_ID,Name,");
|
sqlCmd.append("(C_Channel_ID,Name,");
|
||||||
sqlCmd.append(m_stdColumns).append(",C_Channel_UU) VALUES (");
|
sqlCmd.append(m_stdColumns).append(",C_Channel_UU) VALUES (");
|
||||||
sqlCmd.append(C_Channel_ID).append(",").append(defaultEntry);
|
sqlCmd.append(C_Channel_ID).append(",").append(defaultEntry);
|
||||||
|
@ -1027,7 +1027,7 @@ public final class MSetup
|
||||||
log.log(Level.SEVERE, "Channel NOT inserted");
|
log.log(Level.SEVERE, "Channel NOT inserted");
|
||||||
|
|
||||||
int C_Campaign_ID = getNextID(getAD_Client_ID(), "C_Campaign");
|
int C_Campaign_ID = getNextID(getAD_Client_ID(), "C_Campaign");
|
||||||
sqlCmd = new StringBuffer("INSERT INTO C_Campaign ");
|
sqlCmd = new StringBuilder("INSERT INTO C_Campaign ");
|
||||||
sqlCmd.append("(C_Campaign_ID,C_Channel_ID,").append(m_stdColumns).append(",");
|
sqlCmd.append("(C_Campaign_ID,C_Channel_ID,").append(m_stdColumns).append(",");
|
||||||
sqlCmd.append(" Value,Name,Costs,C_Campaign_UU) VALUES (");
|
sqlCmd.append(" Value,Name,Costs,C_Campaign_UU) VALUES (");
|
||||||
sqlCmd.append(C_Campaign_ID).append(",").append(C_Channel_ID).append(",").append(m_stdValues).append(",");
|
sqlCmd.append(C_Campaign_ID).append(",").append(C_Channel_ID).append(",").append(m_stdValues).append(",");
|
||||||
|
@ -1040,7 +1040,7 @@ public final class MSetup
|
||||||
if (m_hasMCampaign)
|
if (m_hasMCampaign)
|
||||||
{
|
{
|
||||||
// Default
|
// Default
|
||||||
sqlCmd = new StringBuffer ("UPDATE C_AcctSchema_Element SET ");
|
sqlCmd = new StringBuilder ("UPDATE C_AcctSchema_Element SET ");
|
||||||
sqlCmd.append("C_Campaign_ID=").append(C_Campaign_ID);
|
sqlCmd.append("C_Campaign_ID=").append(C_Campaign_ID);
|
||||||
sqlCmd.append(" WHERE C_AcctSchema_ID=").append(m_as.getC_AcctSchema_ID());
|
sqlCmd.append(" WHERE C_AcctSchema_ID=").append(m_as.getC_AcctSchema_ID());
|
||||||
sqlCmd.append(" AND ElementType='MC'");
|
sqlCmd.append(" AND ElementType='MC'");
|
||||||
|
@ -1049,7 +1049,7 @@ public final class MSetup
|
||||||
log.log(Level.SEVERE, "AcctSchema Element Campaign NOT updated");
|
log.log(Level.SEVERE, "AcctSchema Element Campaign NOT updated");
|
||||||
}
|
}
|
||||||
// Campaign Translation
|
// Campaign Translation
|
||||||
sqlCmd = new StringBuffer ("INSERT INTO C_Campaign_Trl (AD_Language,C_Campaign_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,C_Campaign_Trl_UU)");
|
sqlCmd = new StringBuilder ("INSERT INTO C_Campaign_Trl (AD_Language,C_Campaign_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,C_Campaign_Trl_UU)");
|
||||||
sqlCmd.append(" SELECT l.AD_Language,t.C_Campaign_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy, generate_uuid() FROM AD_Language l, C_Campaign t");
|
sqlCmd.append(" SELECT l.AD_Language,t.C_Campaign_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy, generate_uuid() FROM AD_Language l, C_Campaign t");
|
||||||
sqlCmd.append(" WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.C_Campaign_ID=").append(C_Campaign_ID);
|
sqlCmd.append(" WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.C_Campaign_ID=").append(C_Campaign_ID);
|
||||||
sqlCmd.append(" AND NOT EXISTS (SELECT * FROM C_Campaign_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.C_Campaign_ID=t.C_Campaign_ID)");
|
sqlCmd.append(" AND NOT EXISTS (SELECT * FROM C_Campaign_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.C_Campaign_ID=t.C_Campaign_ID)");
|
||||||
|
@ -1059,7 +1059,7 @@ public final class MSetup
|
||||||
|
|
||||||
// Create Sales Region
|
// Create Sales Region
|
||||||
int C_SalesRegion_ID = getNextID(getAD_Client_ID(), "C_SalesRegion");
|
int C_SalesRegion_ID = getNextID(getAD_Client_ID(), "C_SalesRegion");
|
||||||
sqlCmd = new StringBuffer ("INSERT INTO C_SalesRegion ");
|
sqlCmd = new StringBuilder ("INSERT INTO C_SalesRegion ");
|
||||||
sqlCmd.append("(C_SalesRegion_ID,").append(m_stdColumns).append(",");
|
sqlCmd.append("(C_SalesRegion_ID,").append(m_stdColumns).append(",");
|
||||||
sqlCmd.append(" Value,Name,IsSummary,C_SalesRegion_UU) VALUES (");
|
sqlCmd.append(" Value,Name,IsSummary,C_SalesRegion_UU) VALUES (");
|
||||||
sqlCmd.append(C_SalesRegion_ID).append(",").append(m_stdValues).append(", ");
|
sqlCmd.append(C_SalesRegion_ID).append(",").append(m_stdValues).append(", ");
|
||||||
|
@ -1072,7 +1072,7 @@ public final class MSetup
|
||||||
if (m_hasSRegion)
|
if (m_hasSRegion)
|
||||||
{
|
{
|
||||||
// Default
|
// Default
|
||||||
sqlCmd = new StringBuffer ("UPDATE C_AcctSchema_Element SET ");
|
sqlCmd = new StringBuilder ("UPDATE C_AcctSchema_Element SET ");
|
||||||
sqlCmd.append("C_SalesRegion_ID=").append(C_SalesRegion_ID);
|
sqlCmd.append("C_SalesRegion_ID=").append(C_SalesRegion_ID);
|
||||||
sqlCmd.append(" WHERE C_AcctSchema_ID=").append(m_as.getC_AcctSchema_ID());
|
sqlCmd.append(" WHERE C_AcctSchema_ID=").append(m_as.getC_AcctSchema_ID());
|
||||||
sqlCmd.append(" AND ElementType='SR'");
|
sqlCmd.append(" AND ElementType='SR'");
|
||||||
|
@ -1081,7 +1081,7 @@ public final class MSetup
|
||||||
log.log(Level.SEVERE, "AcctSchema Element SalesRegion NOT updated");
|
log.log(Level.SEVERE, "AcctSchema Element SalesRegion NOT updated");
|
||||||
}
|
}
|
||||||
// Sales Region Translation
|
// Sales Region Translation
|
||||||
sqlCmd = new StringBuffer ("INSERT INTO C_SalesRegion_Trl (AD_Language,C_SalesRegion_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,C_SalesRegion_Trl_UU)");
|
sqlCmd = new StringBuilder ("INSERT INTO C_SalesRegion_Trl (AD_Language,C_SalesRegion_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,C_SalesRegion_Trl_UU)");
|
||||||
sqlCmd.append(" SELECT l.AD_Language,t.C_SalesRegion_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy, generate_uuid() FROM AD_Language l, C_SalesRegion t");
|
sqlCmd.append(" SELECT l.AD_Language,t.C_SalesRegion_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy, generate_uuid() FROM AD_Language l, C_SalesRegion t");
|
||||||
sqlCmd.append(" WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.C_SalesRegion_ID=").append(C_SalesRegion_ID);
|
sqlCmd.append(" WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.C_SalesRegion_ID=").append(C_SalesRegion_ID);
|
||||||
sqlCmd.append(" AND NOT EXISTS (SELECT * FROM C_SalesRegion_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.C_SalesRegion_ID=t.C_SalesRegion_ID)");
|
sqlCmd.append(" AND NOT EXISTS (SELECT * FROM C_SalesRegion_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.C_SalesRegion_ID=t.C_SalesRegion_ID)");
|
||||||
|
@ -1091,7 +1091,7 @@ public final class MSetup
|
||||||
|
|
||||||
// Create Activity
|
// Create Activity
|
||||||
int C_Activity_ID = getNextID(getAD_Client_ID(), "C_Activity");
|
int C_Activity_ID = getNextID(getAD_Client_ID(), "C_Activity");
|
||||||
sqlCmd = new StringBuffer ("INSERT INTO C_Activity ");
|
sqlCmd = new StringBuilder ("INSERT INTO C_Activity ");
|
||||||
sqlCmd.append("(C_Activity_ID,").append(m_stdColumns).append(",");
|
sqlCmd.append("(C_Activity_ID,").append(m_stdColumns).append(",");
|
||||||
sqlCmd.append(" Value,Name,IsSummary,C_Activity_UU) VALUES (");
|
sqlCmd.append(" Value,Name,IsSummary,C_Activity_UU) VALUES (");
|
||||||
sqlCmd.append(C_Activity_ID).append(",").append(m_stdValues).append(", ");
|
sqlCmd.append(C_Activity_ID).append(",").append(m_stdValues).append(", ");
|
||||||
|
@ -1104,7 +1104,7 @@ public final class MSetup
|
||||||
if (m_hasActivity)
|
if (m_hasActivity)
|
||||||
{
|
{
|
||||||
// Default
|
// Default
|
||||||
sqlCmd = new StringBuffer ("UPDATE C_AcctSchema_Element SET ");
|
sqlCmd = new StringBuilder ("UPDATE C_AcctSchema_Element SET ");
|
||||||
sqlCmd.append("C_Activity_ID=").append(C_Activity_ID);
|
sqlCmd.append("C_Activity_ID=").append(C_Activity_ID);
|
||||||
sqlCmd.append(" WHERE C_AcctSchema_ID=").append(m_as.getC_AcctSchema_ID());
|
sqlCmd.append(" WHERE C_AcctSchema_ID=").append(m_as.getC_AcctSchema_ID());
|
||||||
sqlCmd.append(" AND ElementType='AY'");
|
sqlCmd.append(" AND ElementType='AY'");
|
||||||
|
@ -1113,7 +1113,7 @@ public final class MSetup
|
||||||
log.log(Level.SEVERE, "AcctSchema Element Activity NOT updated");
|
log.log(Level.SEVERE, "AcctSchema Element Activity NOT updated");
|
||||||
}
|
}
|
||||||
// Activity Translation
|
// Activity Translation
|
||||||
sqlCmd = new StringBuffer ("INSERT INTO C_Activity_Trl (AD_Language,C_Activity_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,C_Activity_Trl_UU)");
|
sqlCmd = new StringBuilder ("INSERT INTO C_Activity_Trl (AD_Language,C_Activity_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,C_Activity_Trl_UU)");
|
||||||
sqlCmd.append(" SELECT l.AD_Language,t.C_Activity_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy, generate_uuid() FROM AD_Language l, C_Activity t");
|
sqlCmd.append(" SELECT l.AD_Language,t.C_Activity_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy, generate_uuid() FROM AD_Language l, C_Activity t");
|
||||||
sqlCmd.append(" WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.C_Activity_ID=").append(C_Activity_ID);
|
sqlCmd.append(" WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.C_Activity_ID=").append(C_Activity_ID);
|
||||||
sqlCmd.append(" AND NOT EXISTS (SELECT * FROM C_Activity_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.C_Activity_ID=t.C_Activity_ID)");
|
sqlCmd.append(" AND NOT EXISTS (SELECT * FROM C_Activity_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.C_Activity_ID=t.C_Activity_ID)");
|
||||||
|
@ -1151,7 +1151,7 @@ public final class MSetup
|
||||||
if (!bpl.save())
|
if (!bpl.save())
|
||||||
log.log(Level.SEVERE, "BP_Location (Standard) NOT inserted");
|
log.log(Level.SEVERE, "BP_Location (Standard) NOT inserted");
|
||||||
// Default
|
// Default
|
||||||
sqlCmd = new StringBuffer ("UPDATE C_AcctSchema_Element SET ");
|
sqlCmd = new StringBuilder ("UPDATE C_AcctSchema_Element SET ");
|
||||||
sqlCmd.append("C_BPartner_ID=").append(bp.getC_BPartner_ID());
|
sqlCmd.append("C_BPartner_ID=").append(bp.getC_BPartner_ID());
|
||||||
sqlCmd.append(" WHERE C_AcctSchema_ID=").append(m_as.getC_AcctSchema_ID());
|
sqlCmd.append(" WHERE C_AcctSchema_ID=").append(m_as.getC_AcctSchema_ID());
|
||||||
sqlCmd.append(" AND ElementType='BP'");
|
sqlCmd.append(" AND ElementType='BP'");
|
||||||
|
@ -1178,7 +1178,7 @@ public final class MSetup
|
||||||
|
|
||||||
// TaxCategory
|
// TaxCategory
|
||||||
int C_TaxCategory_ID = getNextID(getAD_Client_ID(), "C_TaxCategory");
|
int C_TaxCategory_ID = getNextID(getAD_Client_ID(), "C_TaxCategory");
|
||||||
sqlCmd = new StringBuffer ("INSERT INTO C_TaxCategory ");
|
sqlCmd = new StringBuilder ("INSERT INTO C_TaxCategory ");
|
||||||
sqlCmd.append("(C_TaxCategory_ID,").append(m_stdColumns).append(",");
|
sqlCmd.append("(C_TaxCategory_ID,").append(m_stdColumns).append(",");
|
||||||
sqlCmd.append(" Name,IsDefault,C_TaxCategory_UU) VALUES (");
|
sqlCmd.append(" Name,IsDefault,C_TaxCategory_UU) VALUES (");
|
||||||
sqlCmd.append(C_TaxCategory_ID).append(",").append(m_stdValues).append(", ");
|
sqlCmd.append(C_TaxCategory_ID).append(",").append(m_stdValues).append(", ");
|
||||||
|
@ -1192,7 +1192,7 @@ public final class MSetup
|
||||||
log.log(Level.SEVERE, "TaxCategory NOT inserted");
|
log.log(Level.SEVERE, "TaxCategory NOT inserted");
|
||||||
|
|
||||||
// TaxCategory translation
|
// TaxCategory translation
|
||||||
sqlCmd = new StringBuffer ("INSERT INTO C_TaxCategory_Trl (AD_Language,C_TaxCategory_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,C_TaxCategory_Trl_UU)");
|
sqlCmd = new StringBuilder ("INSERT INTO C_TaxCategory_Trl (AD_Language,C_TaxCategory_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,C_TaxCategory_Trl_UU)");
|
||||||
sqlCmd.append(" SELECT l.AD_Language,t.C_TaxCategory_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy, generate_uuid() FROM AD_Language l, C_TaxCategory t");
|
sqlCmd.append(" SELECT l.AD_Language,t.C_TaxCategory_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy, generate_uuid() FROM AD_Language l, C_TaxCategory t");
|
||||||
sqlCmd.append(" WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.C_TaxCategory_ID=").append(C_TaxCategory_ID);
|
sqlCmd.append(" WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.C_TaxCategory_ID=").append(C_TaxCategory_ID);
|
||||||
sqlCmd.append(" AND NOT EXISTS (SELECT * FROM C_TaxCategory_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.C_TaxCategory_ID=t.C_TaxCategory_ID)");
|
sqlCmd.append(" AND NOT EXISTS (SELECT * FROM C_TaxCategory_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.C_TaxCategory_ID=t.C_TaxCategory_ID)");
|
||||||
|
@ -1221,7 +1221,7 @@ public final class MSetup
|
||||||
else
|
else
|
||||||
log.log(Level.SEVERE, "Product NOT inserted");
|
log.log(Level.SEVERE, "Product NOT inserted");
|
||||||
// Default
|
// Default
|
||||||
sqlCmd = new StringBuffer ("UPDATE C_AcctSchema_Element SET ");
|
sqlCmd = new StringBuilder ("UPDATE C_AcctSchema_Element SET ");
|
||||||
sqlCmd.append("M_Product_ID=").append(product.getM_Product_ID());
|
sqlCmd.append("M_Product_ID=").append(product.getM_Product_ID());
|
||||||
sqlCmd.append(" WHERE C_AcctSchema_ID=").append(m_as.getC_AcctSchema_ID());
|
sqlCmd.append(" WHERE C_AcctSchema_ID=").append(m_as.getC_AcctSchema_ID());
|
||||||
sqlCmd.append(" AND ElementType='PR'");
|
sqlCmd.append(" AND ElementType='PR'");
|
||||||
|
@ -1237,7 +1237,7 @@ public final class MSetup
|
||||||
loc.setAddress1(address1);
|
loc.setAddress1(address1);
|
||||||
loc.setPostal(postal);
|
loc.setPostal(postal);
|
||||||
loc.saveEx();
|
loc.saveEx();
|
||||||
sqlCmd = new StringBuffer ("UPDATE AD_OrgInfo SET C_Location_ID=");
|
sqlCmd = new StringBuilder ("UPDATE AD_OrgInfo SET C_Location_ID=");
|
||||||
sqlCmd.append(loc.getC_Location_ID()).append(" WHERE AD_Org_ID=").append(getAD_Org_ID());
|
sqlCmd.append(loc.getC_Location_ID()).append(" WHERE AD_Org_ID=").append(getAD_Org_ID());
|
||||||
no = DB.executeUpdateEx(sqlCmd.toString(), m_trx.getTrxName());
|
no = DB.executeUpdateEx(sqlCmd.toString(), m_trx.getTrxName());
|
||||||
if (no != 1)
|
if (no != 1)
|
||||||
|
@ -1263,7 +1263,7 @@ public final class MSetup
|
||||||
log.log(Level.SEVERE, "Locator NOT inserted");
|
log.log(Level.SEVERE, "Locator NOT inserted");
|
||||||
|
|
||||||
// Update ClientInfo
|
// Update ClientInfo
|
||||||
sqlCmd = new StringBuffer ("UPDATE AD_ClientInfo SET ");
|
sqlCmd = new StringBuilder ("UPDATE AD_ClientInfo SET ");
|
||||||
sqlCmd.append("C_BPartnerCashTrx_ID=").append(bp.getC_BPartner_ID());
|
sqlCmd.append("C_BPartnerCashTrx_ID=").append(bp.getC_BPartner_ID());
|
||||||
sqlCmd.append(",M_ProductFreight_ID=").append(product.getM_Product_ID());
|
sqlCmd.append(",M_ProductFreight_ID=").append(product.getM_Product_ID());
|
||||||
// sqlCmd.append("C_UOM_Volume_ID=");
|
// sqlCmd.append("C_UOM_Volume_ID=");
|
||||||
|
@ -1328,7 +1328,7 @@ public final class MSetup
|
||||||
if (!bplCU.save())
|
if (!bplCU.save())
|
||||||
log.log(Level.SEVERE, "BP_Location (User) NOT inserted");
|
log.log(Level.SEVERE, "BP_Location (User) NOT inserted");
|
||||||
// Update User
|
// Update User
|
||||||
sqlCmd = new StringBuffer ("UPDATE AD_User SET C_BPartner_ID=");
|
sqlCmd = new StringBuilder ("UPDATE AD_User SET C_BPartner_ID=");
|
||||||
sqlCmd.append(bpCU.getC_BPartner_ID()).append(" WHERE AD_User_ID=").append(AD_User_U_ID);
|
sqlCmd.append(bpCU.getC_BPartner_ID()).append(" WHERE AD_User_ID=").append(AD_User_U_ID);
|
||||||
no = DB.executeUpdateEx(sqlCmd.toString(), m_trx.getTrxName());
|
no = DB.executeUpdateEx(sqlCmd.toString(), m_trx.getTrxName());
|
||||||
if (no != 1)
|
if (no != 1)
|
||||||
|
@ -1354,7 +1354,7 @@ public final class MSetup
|
||||||
if (!bplCA.save())
|
if (!bplCA.save())
|
||||||
log.log(Level.SEVERE, "BP_Location (Admin) NOT inserted");
|
log.log(Level.SEVERE, "BP_Location (Admin) NOT inserted");
|
||||||
// Update User
|
// Update User
|
||||||
sqlCmd = new StringBuffer ("UPDATE AD_User SET C_BPartner_ID=");
|
sqlCmd = new StringBuilder ("UPDATE AD_User SET C_BPartner_ID=");
|
||||||
sqlCmd.append(bpCA.getC_BPartner_ID()).append(" WHERE AD_User_ID=").append(AD_User_ID);
|
sqlCmd.append(bpCA.getC_BPartner_ID()).append(" WHERE AD_User_ID=").append(AD_User_ID);
|
||||||
no = DB.executeUpdateEx(sqlCmd.toString(), m_trx.getTrxName());
|
no = DB.executeUpdateEx(sqlCmd.toString(), m_trx.getTrxName());
|
||||||
if (no != 1)
|
if (no != 1)
|
||||||
|
@ -1363,7 +1363,7 @@ public final class MSetup
|
||||||
|
|
||||||
// Payment Term
|
// Payment Term
|
||||||
int C_PaymentTerm_ID = getNextID(getAD_Client_ID(), "C_PaymentTerm");
|
int C_PaymentTerm_ID = getNextID(getAD_Client_ID(), "C_PaymentTerm");
|
||||||
sqlCmd = new StringBuffer ("INSERT INTO C_PaymentTerm ");
|
sqlCmd = new StringBuilder ("INSERT INTO C_PaymentTerm ");
|
||||||
sqlCmd.append("(C_PaymentTerm_ID,").append(m_stdColumns).append(",");
|
sqlCmd.append("(C_PaymentTerm_ID,").append(m_stdColumns).append(",");
|
||||||
sqlCmd.append("Value,Name,NetDays,GraceDays,DiscountDays,Discount,DiscountDays2,Discount2,IsDefault,C_PaymentTerm_UU) VALUES (");
|
sqlCmd.append("Value,Name,NetDays,GraceDays,DiscountDays,Discount,DiscountDays2,Discount2,IsDefault,C_PaymentTerm_UU) VALUES (");
|
||||||
sqlCmd.append(C_PaymentTerm_ID).append(",").append(m_stdValues).append(",");
|
sqlCmd.append(C_PaymentTerm_ID).append(",").append(m_stdValues).append(",");
|
||||||
|
@ -1372,7 +1372,7 @@ public final class MSetup
|
||||||
if (no != 1)
|
if (no != 1)
|
||||||
log.log(Level.SEVERE, "PaymentTerm NOT inserted");
|
log.log(Level.SEVERE, "PaymentTerm NOT inserted");
|
||||||
// Payment Term Translation
|
// Payment Term Translation
|
||||||
sqlCmd = new StringBuffer ("INSERT INTO C_PaymentTerm_Trl (AD_Language,C_PaymentTerm_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,C_PaymentTerm_Trl_UU)");
|
sqlCmd = new StringBuilder ("INSERT INTO C_PaymentTerm_Trl (AD_Language,C_PaymentTerm_ID, Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,C_PaymentTerm_Trl_UU)");
|
||||||
sqlCmd.append(" SELECT l.AD_Language,t.C_PaymentTerm_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy, generate_uuid() FROM AD_Language l, C_PaymentTerm t");
|
sqlCmd.append(" SELECT l.AD_Language,t.C_PaymentTerm_ID, t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy, generate_uuid() FROM AD_Language l, C_PaymentTerm t");
|
||||||
sqlCmd.append(" WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.C_PaymentTerm_ID=").append(C_PaymentTerm_ID);
|
sqlCmd.append(" WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.C_PaymentTerm_ID=").append(C_PaymentTerm_ID);
|
||||||
sqlCmd.append(" AND NOT EXISTS (SELECT * FROM C_PaymentTerm_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.C_PaymentTerm_ID=t.C_PaymentTerm_ID)");
|
sqlCmd.append(" AND NOT EXISTS (SELECT * FROM C_PaymentTerm_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.C_PaymentTerm_ID=t.C_PaymentTerm_ID)");
|
||||||
|
@ -1382,7 +1382,7 @@ public final class MSetup
|
||||||
|
|
||||||
// Project Cycle
|
// Project Cycle
|
||||||
C_Cycle_ID = getNextID(getAD_Client_ID(), "C_Cycle");
|
C_Cycle_ID = getNextID(getAD_Client_ID(), "C_Cycle");
|
||||||
sqlCmd = new StringBuffer ("INSERT INTO C_Cycle ");
|
sqlCmd = new StringBuilder ("INSERT INTO C_Cycle ");
|
||||||
sqlCmd.append("(C_Cycle_ID,").append(m_stdColumns).append(",");
|
sqlCmd.append("(C_Cycle_ID,").append(m_stdColumns).append(",");
|
||||||
sqlCmd.append(" Name,C_Currency_ID,C_Cycle_UU) VALUES (");
|
sqlCmd.append(" Name,C_Currency_ID,C_Cycle_UU) VALUES (");
|
||||||
sqlCmd.append(C_Cycle_ID).append(",").append(m_stdValues).append(", ");
|
sqlCmd.append(C_Cycle_ID).append(",").append(m_stdValues).append(", ");
|
||||||
|
@ -1397,7 +1397,7 @@ public final class MSetup
|
||||||
|
|
||||||
// Create Default Project
|
// Create Default Project
|
||||||
int C_Project_ID = getNextID(getAD_Client_ID(), "C_Project");
|
int C_Project_ID = getNextID(getAD_Client_ID(), "C_Project");
|
||||||
sqlCmd = new StringBuffer ("INSERT INTO C_Project ");
|
sqlCmd = new StringBuilder ("INSERT INTO C_Project ");
|
||||||
sqlCmd.append("(C_Project_ID,").append(m_stdColumns).append(",");
|
sqlCmd.append("(C_Project_ID,").append(m_stdColumns).append(",");
|
||||||
sqlCmd.append(" Value,Name,C_Currency_ID,IsSummary,C_Project_UU) VALUES (");
|
sqlCmd.append(" Value,Name,C_Currency_ID,IsSummary,C_Project_UU) VALUES (");
|
||||||
sqlCmd.append(C_Project_ID).append(",").append(m_stdValuesOrg).append(", ");
|
sqlCmd.append(C_Project_ID).append(",").append(m_stdValuesOrg).append(", ");
|
||||||
|
@ -1410,7 +1410,7 @@ public final class MSetup
|
||||||
// Default Project
|
// Default Project
|
||||||
if (m_hasProject)
|
if (m_hasProject)
|
||||||
{
|
{
|
||||||
sqlCmd = new StringBuffer ("UPDATE C_AcctSchema_Element SET ");
|
sqlCmd = new StringBuilder ("UPDATE C_AcctSchema_Element SET ");
|
||||||
sqlCmd.append("C_Project_ID=").append(C_Project_ID);
|
sqlCmd.append("C_Project_ID=").append(C_Project_ID);
|
||||||
sqlCmd.append(" WHERE C_AcctSchema_ID=").append(m_as.getC_AcctSchema_ID());
|
sqlCmd.append(" WHERE C_AcctSchema_ID=").append(m_as.getC_AcctSchema_ID());
|
||||||
sqlCmd.append(" AND ElementType='PJ'");
|
sqlCmd.append(" AND ElementType='PJ'");
|
||||||
|
|
|
@ -1017,7 +1017,7 @@ public class MStorageOnHand extends X_M_StorageOnHand
|
||||||
*/
|
*/
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer("MStorageOnHand[")
|
StringBuilder sb = new StringBuilder("MStorageOnHand[")
|
||||||
.append("M_Locator_ID=").append(getM_Locator_ID())
|
.append("M_Locator_ID=").append(getM_Locator_ID())
|
||||||
.append(",M_Product_ID=").append(getM_Product_ID())
|
.append(",M_Product_ID=").append(getM_Product_ID())
|
||||||
.append(",M_AttributeSetInstance_ID=").append(getM_AttributeSetInstance_ID())
|
.append(",M_AttributeSetInstance_ID=").append(getM_AttributeSetInstance_ID())
|
||||||
|
|
|
@ -328,7 +328,7 @@ public class MStorageReservation extends X_M_StorageReservation {
|
||||||
*/
|
*/
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer("MStorageReservation[")
|
StringBuilder sb = new StringBuilder("MStorageReservation[")
|
||||||
.append("M_Warehouse_ID=").append(getM_Warehouse_ID())
|
.append("M_Warehouse_ID=").append(getM_Warehouse_ID())
|
||||||
.append(",M_Product_ID=").append(getM_Product_ID())
|
.append(",M_Product_ID=").append(getM_Product_ID())
|
||||||
.append(",M_AttributeSetInstance_ID=").append(getM_AttributeSetInstance_ID())
|
.append(",M_AttributeSetInstance_ID=").append(getM_AttributeSetInstance_ID())
|
||||||
|
|
|
@ -229,7 +229,7 @@ public class MTax extends X_C_Tax
|
||||||
|
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer("MTax[")
|
StringBuilder sb = new StringBuilder("MTax[")
|
||||||
.append(get_ID())
|
.append(get_ID())
|
||||||
.append(", Name = ").append(getName())
|
.append(", Name = ").append(getName())
|
||||||
.append(", SO/PO=").append(getSOPOType())
|
.append(", SO/PO=").append(getSOPOType())
|
||||||
|
|
|
@ -162,7 +162,7 @@ public class MToolBarButtonRestrict extends X_AD_ToolBarButtonRestrict
|
||||||
*/
|
*/
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer ("MToolBarButtonRestrict[")
|
StringBuilder sb = new StringBuilder ("MToolBarButtonRestrict[")
|
||||||
.append(get_ID()).append(",AD_ToolBarButtonRestrict_ID=").append(getAD_ToolBarButtonRestrict_ID())
|
.append(get_ID()).append(",AD_ToolBarButtonRestrict_ID=").append(getAD_ToolBarButtonRestrict_ID())
|
||||||
.append("]");
|
.append("]");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
|
|
|
@ -237,10 +237,10 @@ public class MTree extends MTree_Base
|
||||||
private void loadNodes (int AD_User_ID, String linkColName, int linkID)
|
private void loadNodes (int AD_User_ID, String linkColName, int linkID)
|
||||||
{
|
{
|
||||||
// SQL for TreeNodes
|
// SQL for TreeNodes
|
||||||
StringBuffer sql = new StringBuffer();
|
StringBuilder sql = new StringBuilder();
|
||||||
if (getTreeType().equals(TREETYPE_Menu)) // specific sql, need to load TreeBar IDEMPIERE 329 - nmicoud
|
if (getTreeType().equals(TREETYPE_Menu)) // specific sql, need to load TreeBar IDEMPIERE 329 - nmicoud
|
||||||
{
|
{
|
||||||
sql = new StringBuffer("SELECT "
|
sql = new StringBuilder("SELECT "
|
||||||
+ "tn.Node_ID,tn.Parent_ID,tn.SeqNo,tb.IsActive "
|
+ "tn.Node_ID,tn.Parent_ID,tn.SeqNo,tb.IsActive "
|
||||||
+ "FROM ").append(getNodeTableName()).append(" tn"
|
+ "FROM ").append(getNodeTableName()).append(" tn"
|
||||||
+ " LEFT OUTER JOIN AD_TreeBar tb ON (tn.AD_Tree_ID=tb.AD_Tree_ID"
|
+ " LEFT OUTER JOIN AD_TreeBar tb ON (tn.AD_Tree_ID=tb.AD_Tree_ID"
|
||||||
|
@ -260,7 +260,7 @@ public class MTree extends MTree_Base
|
||||||
if (getAD_Table_ID() > 0)
|
if (getAD_Table_ID() > 0)
|
||||||
sourceTableName = MTable.getTableName(getCtx(), getAD_Table_ID());
|
sourceTableName = MTable.getTableName(getCtx(), getAD_Table_ID());
|
||||||
}
|
}
|
||||||
sql = new StringBuffer("SELECT "
|
sql = new StringBuilder("SELECT "
|
||||||
+ "tn.Node_ID,tn.Parent_ID,tn.SeqNo,st.IsActive "
|
+ "tn.Node_ID,tn.Parent_ID,tn.SeqNo,st.IsActive "
|
||||||
+ "FROM ").append(sourceTableName).append(" st "
|
+ "FROM ").append(sourceTableName).append(" st "
|
||||||
+ "LEFT OUTER JOIN ").append(getNodeTableName()).append(" tn ON (tn.Node_ID=st."+sourceTableName+"_ID) "
|
+ "LEFT OUTER JOIN ").append(getNodeTableName()).append(" tn ON (tn.Node_ID=st."+sourceTableName+"_ID) "
|
||||||
|
@ -272,7 +272,7 @@ public class MTree extends MTree_Base
|
||||||
sql.append(" ORDER BY COALESCE(tn.Parent_ID, -1), tn.SeqNo");
|
sql.append(" ORDER BY COALESCE(tn.Parent_ID, -1), tn.SeqNo");
|
||||||
//do not check access if allNodes
|
//do not check access if allNodes
|
||||||
if (AD_User_ID != -1)
|
if (AD_User_ID != -1)
|
||||||
sql = new StringBuffer(MRole.getDefault().addAccessSQL(sql.toString(), "st", MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO)); // SQL_RO for Org_ID = 0
|
sql = new StringBuilder(MRole.getDefault().addAccessSQL(sql.toString(), "st", MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO)); // SQL_RO for Org_ID = 0
|
||||||
}
|
}
|
||||||
if (log.isLoggable(Level.FINEST)) log.finest(sql.toString());
|
if (log.isLoggable(Level.FINEST)) log.finest(sql.toString());
|
||||||
// The Node Loop
|
// The Node Loop
|
||||||
|
|
|
@ -531,7 +531,7 @@ public class MUser extends X_AD_User
|
||||||
*/
|
*/
|
||||||
public String toString ()
|
public String toString ()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer ("MUser[")
|
StringBuilder sb = new StringBuilder ("MUser[")
|
||||||
.append(get_ID())
|
.append(get_ID())
|
||||||
.append(",Name=").append(getName())
|
.append(",Name=").append(getName())
|
||||||
.append(",EMailUserID=").append(getEMailUser())
|
.append(",EMailUserID=").append(getEMailUser())
|
||||||
|
@ -989,7 +989,7 @@ public class MUser extends X_AD_User
|
||||||
MUser retValue = null;
|
MUser retValue = null;
|
||||||
int AD_Client_ID = Env.getAD_Client_ID(ctx);
|
int AD_Client_ID = Env.getAD_Client_ID(ctx);
|
||||||
|
|
||||||
StringBuffer sql = new StringBuffer("SELECT DISTINCT u.AD_User_ID ")
|
StringBuilder sql = new StringBuilder("SELECT DISTINCT u.AD_User_ID ")
|
||||||
.append("FROM AD_User u")
|
.append("FROM AD_User u")
|
||||||
.append(" INNER JOIN AD_User_Roles ur ON (u.AD_User_ID=ur.AD_User_ID AND ur.IsActive='Y')")
|
.append(" INNER JOIN AD_User_Roles ur ON (u.AD_User_ID=ur.AD_User_ID AND ur.IsActive='Y')")
|
||||||
.append(" INNER JOIN AD_Role r ON (ur.AD_Role_ID=r.AD_Role_ID AND r.IsActive='Y') ");
|
.append(" INNER JOIN AD_Role r ON (ur.AD_Role_ID=r.AD_Role_ID AND r.IsActive='Y') ");
|
||||||
|
|
|
@ -167,7 +167,7 @@ public class MViewComponent extends X_AD_ViewComponent {
|
||||||
@Override
|
@Override
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer("MViewComponent[")
|
StringBuilder sb = new StringBuilder("MViewComponent[")
|
||||||
.append(get_ID())
|
.append(get_ID())
|
||||||
.append("-").append(getName());
|
.append("-").append(getName());
|
||||||
sb.append("]");
|
sb.append("]");
|
||||||
|
|
|
@ -100,7 +100,7 @@ public class PO_LOB implements Serializable
|
||||||
|| (m_value instanceof byte[] && ((byte[])m_value).length == 0)
|
|| (m_value instanceof byte[] && ((byte[])m_value).length == 0)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
StringBuffer sql = new StringBuffer ("UPDATE ")
|
StringBuilder sql = new StringBuilder ("UPDATE ")
|
||||||
.append(m_tableName)
|
.append(m_tableName)
|
||||||
.append(" SET ").append(m_columnName)
|
.append(" SET ").append(m_columnName)
|
||||||
.append("=null WHERE ").append(m_whereClause);
|
.append("=null WHERE ").append(m_whereClause);
|
||||||
|
@ -111,12 +111,12 @@ public class PO_LOB implements Serializable
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
StringBuffer sql = new StringBuffer ("UPDATE ")
|
StringBuilder sql = new StringBuilder ("UPDATE ")
|
||||||
.append(m_tableName)
|
.append(m_tableName)
|
||||||
.append(" SET ").append(m_columnName)
|
.append(" SET ").append(m_columnName)
|
||||||
.append("=? WHERE ").append(m_whereClause);
|
.append("=? WHERE ").append(m_whereClause);
|
||||||
if (!DB.isPostgreSQL() && !DB.isOracle())
|
if (!DB.isPostgreSQL() && !DB.isOracle())
|
||||||
sql = new StringBuffer(DB.getDatabase().convertStatement(sql.toString()));
|
sql = new StringBuilder(DB.getDatabase().convertStatement(sql.toString()));
|
||||||
//
|
//
|
||||||
|
|
||||||
if (log.isLoggable(Level.FINE)) log.fine("[" + trxName + "] - Local - " + m_value);
|
if (log.isLoggable(Level.FINE)) log.fine("[" + trxName + "] - Local - " + m_value);
|
||||||
|
|
|
@ -110,7 +110,7 @@ public class PO_Record
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
StringBuffer sql = new StringBuffer ("DELETE FROM ")
|
StringBuilder sql = new StringBuilder ("DELETE FROM ")
|
||||||
.append(s_cascadeNames[i])
|
.append(s_cascadeNames[i])
|
||||||
.append(" WHERE AD_Table_ID=? AND Record_ID=?");
|
.append(" WHERE AD_Table_ID=? AND Record_ID=?");
|
||||||
int no = DB.executeUpdate(sql.toString(), params, false, trxName);
|
int no = DB.executeUpdate(sql.toString(), params, false, trxName);
|
||||||
|
@ -134,7 +134,7 @@ public class PO_Record
|
||||||
Object[] params = new Object[]{Integer.valueOf(AD_Table_IDchild), Integer.valueOf(Record_ID)};
|
Object[] params = new Object[]{Integer.valueOf(AD_Table_IDchild), Integer.valueOf(Record_ID)};
|
||||||
for (int i = 0; i < s_cascades.length; i++)
|
for (int i = 0; i < s_cascades.length; i++)
|
||||||
{
|
{
|
||||||
StringBuffer sql = new StringBuffer ("DELETE FROM ")
|
StringBuilder sql = new StringBuilder ("DELETE FROM ")
|
||||||
.append(s_cascadeNames[i])
|
.append(s_cascadeNames[i])
|
||||||
.append(" WHERE AD_Table_ID=? AND Record_ID IN (SELECT ")
|
.append(" WHERE AD_Table_ID=? AND Record_ID IN (SELECT ")
|
||||||
.append(s_parentChildNames[j]).append("_ID FROM ")
|
.append(s_parentChildNames[j]).append("_ID FROM ")
|
||||||
|
@ -204,7 +204,7 @@ public class PO_Record
|
||||||
for (int i = 0; i < s_restricts.length; i++)
|
for (int i = 0; i < s_restricts.length; i++)
|
||||||
{
|
{
|
||||||
// SELECT COUNT(*) FROM table WHERE AD_Table_ID=#1 AND Record_ID=#2
|
// SELECT COUNT(*) FROM table WHERE AD_Table_ID=#1 AND Record_ID=#2
|
||||||
StringBuffer sql = new StringBuffer ("SELECT COUNT(*) FROM ")
|
StringBuilder sql = new StringBuilder ("SELECT COUNT(*) FROM ")
|
||||||
.append(s_restrictNames[i])
|
.append(s_restrictNames[i])
|
||||||
.append(" WHERE AD_Table_ID=? AND Record_ID=?");
|
.append(" WHERE AD_Table_ID=? AND Record_ID=?");
|
||||||
int no = DB.getSQLValue(trxName, sql.toString(), AD_Table_ID, Record_ID);
|
int no = DB.getSQLValue(trxName, sql.toString(), AD_Table_ID, Record_ID);
|
||||||
|
@ -263,7 +263,7 @@ public class PO_Record
|
||||||
{
|
{
|
||||||
for (int i = 0; i < s_cascades.length; i++)
|
for (int i = 0; i < s_cascades.length; i++)
|
||||||
{
|
{
|
||||||
StringBuffer sql = new StringBuffer ("DELETE FROM ")
|
StringBuilder sql = new StringBuilder ("DELETE FROM ")
|
||||||
.append(s_cascadeNames[i])
|
.append(s_cascadeNames[i])
|
||||||
.append(" WHERE AD_Table_ID=").append(AD_Table_ID)
|
.append(" WHERE AD_Table_ID=").append(AD_Table_ID)
|
||||||
.append(" AND Record_ID NOT IN (SELECT ")
|
.append(" AND Record_ID NOT IN (SELECT ")
|
||||||
|
|
|
@ -162,7 +162,7 @@ public class SalesMgmtValidator implements ModelValidator
|
||||||
*/
|
*/
|
||||||
public String toString ()
|
public String toString ()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer ("SalesMgmtValidator");
|
StringBuilder sb = new StringBuilder ("SalesMgmtValidator");
|
||||||
return sb.toString ();
|
return sb.toString ();
|
||||||
} // toString
|
} // toString
|
||||||
|
|
||||||
|
|
|
@ -171,9 +171,9 @@ public class TranslationTable
|
||||||
if (po.get_ID() == 0)
|
if (po.get_ID() == 0)
|
||||||
throw new IllegalArgumentException("PO ID is 0");
|
throw new IllegalArgumentException("PO ID is 0");
|
||||||
//
|
//
|
||||||
StringBuffer sql1 = new StringBuffer();
|
StringBuilder sql1 = new StringBuilder();
|
||||||
sql1.append("INSERT INTO ").append(m_trlTableName).append(" (");
|
sql1.append("INSERT INTO ").append(m_trlTableName).append(" (");
|
||||||
StringBuffer sql2 = new StringBuffer();
|
StringBuilder sql2 = new StringBuilder();
|
||||||
sql2.append(") SELECT ");
|
sql2.append(") SELECT ");
|
||||||
|
|
||||||
// Key Columns
|
// Key Columns
|
||||||
|
|
|
@ -345,7 +345,7 @@ public class MPrintFormat extends X_AD_PrintFormat
|
||||||
*/
|
*/
|
||||||
public void setTranslation()
|
public void setTranslation()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer ("UPDATE AD_PrintFormatItem_Trl t"
|
StringBuilder sb = new StringBuilder ("UPDATE AD_PrintFormatItem_Trl t"
|
||||||
+ " SET (PrintName, PrintNameSuffix)="
|
+ " SET (PrintName, PrintNameSuffix)="
|
||||||
+ " (SELECT PrintName, PrintNameSuffix FROM AD_PrintFormatItem i WHERE i.AD_PrintFormatItem_ID=t.AD_PrintFormatItem_ID) "
|
+ " (SELECT PrintName, PrintNameSuffix FROM AD_PrintFormatItem i WHERE i.AD_PrintFormatItem_ID=t.AD_PrintFormatItem_ID) "
|
||||||
+ "WHERE AD_PrintFormatItem_ID IN"
|
+ "WHERE AD_PrintFormatItem_ID IN"
|
||||||
|
@ -453,7 +453,7 @@ public class MPrintFormat extends X_AD_PrintFormat
|
||||||
*/
|
*/
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer ("MPrintFormat[ID=").append(get_ID())
|
StringBuilder sb = new StringBuilder ("MPrintFormat[ID=").append(get_ID())
|
||||||
.append(",Name=").append(getName())
|
.append(",Name=").append(getName())
|
||||||
.append(",Language=").append(getLanguage())
|
.append(",Language=").append(getLanguage())
|
||||||
.append(",Items=").append(getItemCount())
|
.append(",Items=").append(getItemCount())
|
||||||
|
@ -989,7 +989,7 @@ public class MPrintFormat extends X_AD_PrintFormat
|
||||||
int fromID = fromItems[i].getAD_PrintFormatItem_ID();
|
int fromID = fromItems[i].getAD_PrintFormatItem_ID();
|
||||||
int toID = toItems[i].getAD_PrintFormatItem_ID();
|
int toID = toItems[i].getAD_PrintFormatItem_ID();
|
||||||
|
|
||||||
StringBuffer sql = new StringBuffer("UPDATE AD_PrintFormatItem_Trl new ")
|
StringBuilder sql = new StringBuilder("UPDATE AD_PrintFormatItem_Trl new ")
|
||||||
// Set
|
// Set
|
||||||
.append("SET (PrintName, PrintNameSuffix, IsTranslated) = ")
|
.append("SET (PrintName, PrintNameSuffix, IsTranslated) = ")
|
||||||
.append("(")
|
.append("(")
|
||||||
|
|
|
@ -408,7 +408,7 @@ public class PrintDataElement implements Serializable
|
||||||
*/
|
*/
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer(m_columnName).append("=").append(m_value);
|
StringBuilder sb = new StringBuilder(m_columnName).append("=").append(m_value);
|
||||||
if (m_isPKey)
|
if (m_isPKey)
|
||||||
sb.append("(PK)");
|
sb.append("(PK)");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
|
|
|
@ -174,7 +174,7 @@ public class PrintDataFunction
|
||||||
*/
|
*/
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer("[")
|
StringBuilder sb = new StringBuilder("[")
|
||||||
.append("Count=").append(m_count).append(",").append(m_totalCount)
|
.append("Count=").append(m_count).append(",").append(m_totalCount)
|
||||||
.append(",Sum=").append(m_sum)
|
.append(",Sum=").append(m_sum)
|
||||||
.append(",SumSquare=").append(m_sumSquare)
|
.append(",SumSquare=").append(m_sumSquare)
|
||||||
|
|
|
@ -1125,7 +1125,7 @@ queued-job-count = 0 (class javax.print.attribute.standard.QueuedJobCount)
|
||||||
return;
|
return;
|
||||||
//
|
//
|
||||||
boolean needMask = false;
|
boolean needMask = false;
|
||||||
StringBuffer buff = new StringBuffer();
|
StringBuilder buff = new StringBuilder();
|
||||||
char chars[] = content.toCharArray();
|
char chars[] = content.toCharArray();
|
||||||
for (int i = 0; i < chars.length; i++)
|
for (int i = 0; i < chars.length; i++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -139,7 +139,7 @@ public class StringElement extends PrintElement
|
||||||
int startIndex = 0;
|
int startIndex = 0;
|
||||||
int endOffset = 0;
|
int endOffset = 0;
|
||||||
|
|
||||||
StringBuffer text = new StringBuffer();
|
StringBuilder text = new StringBuilder();
|
||||||
if (label != null && label.length() > 0)
|
if (label != null && label.length() > 0)
|
||||||
{
|
{
|
||||||
text.append(label).append(" ");
|
text.append(label).append(" ");
|
||||||
|
|
|
@ -60,7 +60,7 @@ public class BankRegister extends SvrProcess
|
||||||
*/
|
*/
|
||||||
protected void prepare()
|
protected void prepare()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer ("Record_ID=")
|
StringBuilder sb = new StringBuilder ("Record_ID=")
|
||||||
.append(getRecord_ID());
|
.append(getRecord_ID());
|
||||||
// Parameter
|
// Parameter
|
||||||
ProcessInfoParameter[] para = getParameter();
|
ProcessInfoParameter[] para = getParameter();
|
||||||
|
@ -147,7 +147,7 @@ public class BankRegister extends SvrProcess
|
||||||
*/
|
*/
|
||||||
private void createBalanceLine()
|
private void createBalanceLine()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer ("INSERT INTO T_BankRegister "
|
StringBuilder sb = new StringBuilder ("INSERT INTO T_BankRegister "
|
||||||
+ "(AD_PInstance_ID, AD_Client_ID, AD_Org_ID, "
|
+ "(AD_PInstance_ID, AD_Client_ID, AD_Org_ID, "
|
||||||
+ "DateAcct, C_Bank_ID, BankName, C_BPartner_ID, BPartner, DocumentNo," // Account,
|
+ "DateAcct, C_Bank_ID, BankName, C_BPartner_ID, BPartner, DocumentNo," // Account,
|
||||||
+ "AmtAcctDr, AmtAcctCr, Balance) ");
|
+ "AmtAcctDr, AmtAcctCr, Balance) ");
|
||||||
|
@ -184,7 +184,7 @@ public class BankRegister extends SvrProcess
|
||||||
*/
|
*/
|
||||||
private void createDetailLines()
|
private void createDetailLines()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer ("INSERT INTO T_BankRegister "
|
StringBuilder sb = new StringBuilder ("INSERT INTO T_BankRegister "
|
||||||
+ "(AD_PInstance_ID, AD_Client_ID, AD_Org_ID, "
|
+ "(AD_PInstance_ID, AD_Client_ID, AD_Org_ID, "
|
||||||
+ "DateAcct, C_Bank_ID, BankName, C_BPartner_ID, BPartner, DocumentNo, " //Account,
|
+ "DateAcct, C_Bank_ID, BankName, C_BPartner_ID, BPartner, DocumentNo, " //Account,
|
||||||
+ "AmtAcctDr, AmtAcctCr, Balance) ");
|
+ "AmtAcctDr, AmtAcctCr, Balance) ");
|
||||||
|
|
|
@ -106,7 +106,7 @@ public class FinReport extends SvrProcess
|
||||||
*/
|
*/
|
||||||
protected void prepare()
|
protected void prepare()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer ("Record_ID=")
|
StringBuilder sb = new StringBuilder ("Record_ID=")
|
||||||
.append(getRecord_ID());
|
.append(getRecord_ID());
|
||||||
// Parameter
|
// Parameter
|
||||||
ProcessInfoParameter[] para = getParameter();
|
ProcessInfoParameter[] para = getParameter();
|
||||||
|
@ -311,7 +311,7 @@ public class FinReport extends SvrProcess
|
||||||
// ** Create Temporary and empty Report Lines from PA_ReportLine
|
// ** Create Temporary and empty Report Lines from PA_ReportLine
|
||||||
// - AD_PInstance_ID, PA_ReportLine_ID, 0, 0
|
// - AD_PInstance_ID, PA_ReportLine_ID, 0, 0
|
||||||
int PA_ReportLineSet_ID = m_report.getLineSet().getPA_ReportLineSet_ID();
|
int PA_ReportLineSet_ID = m_report.getLineSet().getPA_ReportLineSet_ID();
|
||||||
StringBuffer sql = new StringBuffer ("INSERT INTO T_Report "
|
StringBuilder sql = new StringBuilder ("INSERT INTO T_Report "
|
||||||
+ "(AD_PInstance_ID, PA_ReportLine_ID, Record_ID,Fact_Acct_ID, SeqNo,LevelNo, Name,Description) "
|
+ "(AD_PInstance_ID, PA_ReportLine_ID, Record_ID,Fact_Acct_ID, SeqNo,LevelNo, Name,Description) "
|
||||||
+ "SELECT ").append(getAD_PInstance_ID()).append(", rl.PA_ReportLine_ID, 0,0, rl.SeqNo,0, NVL(trl.Name, rl.Name) as Name, NVL(trl.Description,rl.Description) as Description "
|
+ "SELECT ").append(getAD_PInstance_ID()).append(", rl.PA_ReportLine_ID, 0,0, rl.SeqNo,0, NVL(trl.Name, rl.Name) as Name, NVL(trl.Description,rl.Description) as Description "
|
||||||
+ "FROM PA_ReportLine rl "
|
+ "FROM PA_ReportLine rl "
|
||||||
|
@ -376,7 +376,7 @@ public class FinReport extends SvrProcess
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
StringBuffer update = new StringBuffer();
|
StringBuilder update = new StringBuilder();
|
||||||
// for all columns
|
// for all columns
|
||||||
for (int col = 0; col < m_columns.length; col++)
|
for (int col = 0; col < m_columns.length; col++)
|
||||||
{
|
{
|
||||||
|
@ -387,7 +387,7 @@ public class FinReport extends SvrProcess
|
||||||
info.append("Line=").append(line).append(",Col=").append(col);
|
info.append("Line=").append(line).append(",Col=").append(col);
|
||||||
|
|
||||||
// SELECT SUM()
|
// SELECT SUM()
|
||||||
StringBuffer select = new StringBuffer ("SELECT ");
|
StringBuilder select = new StringBuilder ("SELECT ");
|
||||||
if (m_lines[line].getPAAmountType() != null) // line amount type overwrites column
|
if (m_lines[line].getPAAmountType() != null) // line amount type overwrites column
|
||||||
{
|
{
|
||||||
String sql = m_lines[line].getSelectClause (true);
|
String sql = m_lines[line].getSelectClause (true);
|
||||||
|
@ -944,7 +944,7 @@ public class FinReport extends SvrProcess
|
||||||
|
|
||||||
// allow opposite sign
|
// allow opposite sign
|
||||||
boolean hasOpposites = false;
|
boolean hasOpposites = false;
|
||||||
StringBuffer sb = new StringBuffer("UPDATE T_Report SET ");
|
StringBuilder sb = new StringBuilder("UPDATE T_Report SET ");
|
||||||
for (int col = 0; col < m_columns.length; col++)
|
for (int col = 0; col < m_columns.length; col++)
|
||||||
{
|
{
|
||||||
if (m_columns[col].isAllowOppositeSign())
|
if (m_columns[col].isAllowOppositeSign())
|
||||||
|
@ -1073,7 +1073,7 @@ public class FinReport extends SvrProcess
|
||||||
for (int i = 0; i < seqlist.size(); i++)
|
for (int i = 0; i < seqlist.size(); i++)
|
||||||
{
|
{
|
||||||
int currentSeq = seqlist.get(i);
|
int currentSeq = seqlist.get(i);
|
||||||
StringBuffer sb = new StringBuffer ("UPDATE T_Report SET ");
|
StringBuilder sb = new StringBuilder ("UPDATE T_Report SET ");
|
||||||
// Column to set
|
// Column to set
|
||||||
sb.append ("Col_").append (col).append("=");
|
sb.append ("Col_").append (col).append("=");
|
||||||
|
|
||||||
|
@ -1333,7 +1333,7 @@ public class FinReport extends SvrProcess
|
||||||
if (log.isLoggable(Level.FINE)) log.fine("Variable=" + variable);
|
if (log.isLoggable(Level.FINE)) log.fine("Variable=" + variable);
|
||||||
|
|
||||||
// Insert
|
// Insert
|
||||||
StringBuffer insert = new StringBuffer("INSERT INTO T_Report "
|
StringBuilder insert = new StringBuilder("INSERT INTO T_Report "
|
||||||
+ "(AD_PInstance_ID, PA_ReportLine_ID, Record_ID,Fact_Acct_ID,LevelNo ");
|
+ "(AD_PInstance_ID, PA_ReportLine_ID, Record_ID,Fact_Acct_ID,LevelNo ");
|
||||||
for (int col = 0; col < m_columns.length; col++)
|
for (int col = 0; col < m_columns.length; col++)
|
||||||
insert.append(",Col_").append(col);
|
insert.append(",Col_").append(col);
|
||||||
|
@ -1345,7 +1345,7 @@ public class FinReport extends SvrProcess
|
||||||
|
|
||||||
boolean listSourceNoTrx = m_report.isListSourcesXTrx() && variable.equalsIgnoreCase(I_C_ValidCombination.COLUMNNAME_Account_ID);
|
boolean listSourceNoTrx = m_report.isListSourcesXTrx() && variable.equalsIgnoreCase(I_C_ValidCombination.COLUMNNAME_Account_ID);
|
||||||
//SQL to get the Account Element which no transaction
|
//SQL to get the Account Element which no transaction
|
||||||
StringBuffer unionInsert = listSourceNoTrx ? new StringBuffer() : null;
|
StringBuilder unionInsert = listSourceNoTrx ? new StringBuilder() : null;
|
||||||
if (listSourceNoTrx) {
|
if (listSourceNoTrx) {
|
||||||
unionInsert.append(" UNION SELECT ")
|
unionInsert.append(" UNION SELECT ")
|
||||||
.append(getAD_PInstance_ID()).append(",")
|
.append(getAD_PInstance_ID()).append(",")
|
||||||
|
@ -1378,7 +1378,7 @@ public class FinReport extends SvrProcess
|
||||||
}
|
}
|
||||||
|
|
||||||
// SELECT SUM()
|
// SELECT SUM()
|
||||||
StringBuffer select = new StringBuffer ("SELECT ");
|
StringBuilder select = new StringBuilder ("SELECT ");
|
||||||
if (m_lines[line].getPAAmountType() != null) // line amount type overwrites column
|
if (m_lines[line].getPAAmountType() != null) // line amount type overwrites column
|
||||||
select.append (m_lines[line].getSelectClause (true));
|
select.append (m_lines[line].getSelectClause (true));
|
||||||
else if (m_columns[col].getPAAmountType() != null)
|
else if (m_columns[col].getPAAmountType() != null)
|
||||||
|
@ -1450,9 +1450,9 @@ public class FinReport extends SvrProcess
|
||||||
insert.append("(").append(select).append(")");
|
insert.append("(").append(select).append(")");
|
||||||
}
|
}
|
||||||
// WHERE (sources, posting type)
|
// WHERE (sources, posting type)
|
||||||
StringBuffer where = new StringBuffer(m_lines[line].getWhereClause(p_PA_Hierarchy_ID));
|
StringBuilder where = new StringBuilder(m_lines[line].getWhereClause(p_PA_Hierarchy_ID));
|
||||||
|
|
||||||
StringBuffer unionWhere = listSourceNoTrx ? new StringBuffer() : null;
|
StringBuilder unionWhere = listSourceNoTrx ? new StringBuilder() : null;
|
||||||
if (listSourceNoTrx && m_lines[line].getSources() != null && m_lines[line].getSources().length > 0){
|
if (listSourceNoTrx && m_lines[line].getSources() != null && m_lines[line].getSources().length > 0){
|
||||||
// Only one
|
// Only one
|
||||||
if (m_lines[line].getSources().length == 1
|
if (m_lines[line].getSources().length == 1
|
||||||
|
@ -1463,7 +1463,7 @@ public class FinReport extends SvrProcess
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Multiple
|
// Multiple
|
||||||
StringBuffer sb = new StringBuffer ("(");
|
StringBuilder sb = new StringBuilder ("(");
|
||||||
for (int i = 0; i < m_lines[line].getSources().length; i++)
|
for (int i = 0; i < m_lines[line].getSources().length; i++)
|
||||||
{
|
{
|
||||||
if ((m_lines[line].getSources()[i]).getElementType().equalsIgnoreCase(MReportSource.ELEMENTTYPE_Account)) {
|
if ((m_lines[line].getSources()[i]).getElementType().equalsIgnoreCase(MReportSource.ELEMENTTYPE_Account)) {
|
||||||
|
@ -1530,7 +1530,7 @@ public class FinReport extends SvrProcess
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Set Name,Description
|
// Set Name,Description
|
||||||
StringBuffer sql = new StringBuffer ("UPDATE T_Report SET (Name,Description)=(")
|
StringBuilder sql = new StringBuilder ("UPDATE T_Report SET (Name,Description)=(")
|
||||||
.append(m_lines[line].getSourceValueQuery()).append("T_Report.Record_ID) "
|
.append(m_lines[line].getSourceValueQuery()).append("T_Report.Record_ID) "
|
||||||
//
|
//
|
||||||
+ "WHERE Record_ID <> 0 AND AD_PInstance_ID=").append(getAD_PInstance_ID())
|
+ "WHERE Record_ID <> 0 AND AD_PInstance_ID=").append(getAD_PInstance_ID())
|
||||||
|
@ -1554,7 +1554,7 @@ public class FinReport extends SvrProcess
|
||||||
if (log.isLoggable(Level.INFO)) log.info("Line=" + line + " - Variable=" + variable);
|
if (log.isLoggable(Level.INFO)) log.info("Line=" + line + " - Variable=" + variable);
|
||||||
|
|
||||||
// Insert
|
// Insert
|
||||||
StringBuffer insert = new StringBuffer("INSERT INTO T_Report "
|
StringBuilder insert = new StringBuilder("INSERT INTO T_Report "
|
||||||
+ "(AD_PInstance_ID, PA_ReportLine_ID, Record_ID,Fact_Acct_ID,LevelNo ");
|
+ "(AD_PInstance_ID, PA_ReportLine_ID, Record_ID,Fact_Acct_ID,LevelNo ");
|
||||||
for (int col = 0; col < m_columns.length; col++)
|
for (int col = 0; col < m_columns.length; col++)
|
||||||
insert.append(",Col_").append(col);
|
insert.append(",Col_").append(col);
|
||||||
|
@ -1580,7 +1580,7 @@ public class FinReport extends SvrProcess
|
||||||
}
|
}
|
||||||
|
|
||||||
// SELECT
|
// SELECT
|
||||||
StringBuffer select = new StringBuffer ("SELECT ");
|
StringBuilder select = new StringBuilder ("SELECT ");
|
||||||
if (m_lines[line].getPAAmountType() != null) // line amount type overwrites column
|
if (m_lines[line].getPAAmountType() != null) // line amount type overwrites column
|
||||||
select.append (m_lines[line].getSelectClause (false));
|
select.append (m_lines[line].getSelectClause (false));
|
||||||
else if (m_columns[col].getPAAmountType() != null)
|
else if (m_columns[col].getPAAmountType() != null)
|
||||||
|
|
|
@ -103,7 +103,7 @@ public class FinStatement extends SvrProcess
|
||||||
*/
|
*/
|
||||||
protected void prepare()
|
protected void prepare()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer ("Record_ID=")
|
StringBuilder sb = new StringBuilder ("Record_ID=")
|
||||||
.append(getRecord_ID());
|
.append(getRecord_ID());
|
||||||
// Parameter
|
// Parameter
|
||||||
ProcessInfoParameter[] para = getParameter();
|
ProcessInfoParameter[] para = getParameter();
|
||||||
|
@ -325,7 +325,7 @@ public class FinStatement extends SvrProcess
|
||||||
*/
|
*/
|
||||||
private void createDetailLines()
|
private void createDetailLines()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer ("INSERT INTO T_ReportStatement "
|
StringBuilder sb = new StringBuilder ("INSERT INTO T_ReportStatement "
|
||||||
+ "(AD_PInstance_ID, Fact_Acct_ID, LevelNo,"
|
+ "(AD_PInstance_ID, Fact_Acct_ID, LevelNo,"
|
||||||
+ "DateAcct, Name, Description,"
|
+ "DateAcct, Name, Description,"
|
||||||
+ "AmtAcctDr, AmtAcctCr, Balance, Qty) ");
|
+ "AmtAcctDr, AmtAcctCr, Balance, Qty) ");
|
||||||
|
@ -359,7 +359,7 @@ public class FinStatement extends SvrProcess
|
||||||
+ "WHERE r.Fact_Acct_ID=fa.Fact_Acct_ID";
|
+ "WHERE r.Fact_Acct_ID=fa.Fact_Acct_ID";
|
||||||
}
|
}
|
||||||
// Translated Version ...
|
// Translated Version ...
|
||||||
sb = new StringBuffer ("UPDATE T_ReportStatement r SET (Name,Description)=(")
|
sb = new StringBuilder ("UPDATE T_ReportStatement r SET (Name,Description)=(")
|
||||||
.append(sql_select).append(") "
|
.append(sql_select).append(") "
|
||||||
+ "WHERE Fact_Acct_ID <> 0 AND AD_PInstance_ID=").append(getAD_PInstance_ID());
|
+ "WHERE Fact_Acct_ID <> 0 AND AD_PInstance_ID=").append(getAD_PInstance_ID());
|
||||||
//
|
//
|
||||||
|
|
|
@ -110,7 +110,7 @@ public class MReport extends X_PA_Report
|
||||||
*/
|
*/
|
||||||
public String toString ()
|
public String toString ()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer ("MReport[")
|
StringBuilder sb = new StringBuilder ("MReport[")
|
||||||
.append(get_ID()).append(" - ").append(getName());
|
.append(get_ID()).append(" - ").append(getName());
|
||||||
if (getDescription() != null)
|
if (getDescription() != null)
|
||||||
sb.append("(").append(getDescription()).append(")");
|
sb.append("(").append(getDescription()).append(")");
|
||||||
|
|
|
@ -343,7 +343,7 @@ public class MReportColumn extends X_PA_ReportColumn
|
||||||
*/
|
*/
|
||||||
public String toString ()
|
public String toString ()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer ("MReportColumn[")
|
StringBuilder sb = new StringBuilder ("MReportColumn[")
|
||||||
.append(get_ID()).append(" - ").append(getName()).append(" - ").append(getDescription())
|
.append(get_ID()).append(" - ").append(getName()).append(" - ").append(getDescription())
|
||||||
.append(", SeqNo=").append(getSeqNo()).append(", AmountType=").append(getPAAmountType())
|
.append(", SeqNo=").append(getSeqNo()).append(", AmountType=").append(getPAAmountType())
|
||||||
.append(", PeriodType=").append(getPAPeriodType())
|
.append(", PeriodType=").append(getPAPeriodType())
|
||||||
|
|
|
@ -126,7 +126,7 @@ public class MReportColumnSet extends X_PA_ReportColumnSet
|
||||||
*/
|
*/
|
||||||
public String toString ()
|
public String toString ()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer ("MReportColumnSet[")
|
StringBuilder sb = new StringBuilder ("MReportColumnSet[")
|
||||||
.append(get_ID()).append(" - ").append(getName())
|
.append(get_ID()).append(" - ").append(getName())
|
||||||
.append ("]");
|
.append ("]");
|
||||||
return sb.toString ();
|
return sb.toString ();
|
||||||
|
|
|
@ -313,7 +313,7 @@ public class MReportLine extends X_PA_ReportLine
|
||||||
*/
|
*/
|
||||||
public String toString ()
|
public String toString ()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer ("MReportLine[")
|
StringBuilder sb = new StringBuilder ("MReportLine[")
|
||||||
.append(get_ID()).append(" - ").append(getName()).append(" - ").append(getDescription())
|
.append(get_ID()).append(" - ").append(getName()).append(" - ").append(getDescription())
|
||||||
.append(", SeqNo=").append(getSeqNo()).append(", AmountType=").append(getPAAmountType())
|
.append(", SeqNo=").append(getSeqNo()).append(", AmountType=").append(getPAAmountType())
|
||||||
.append(", PeriodType=").append(getPAPeriodType())
|
.append(", PeriodType=").append(getPAPeriodType())
|
||||||
|
|
|
@ -126,7 +126,7 @@ public class MReportLineSet extends X_PA_ReportLineSet
|
||||||
*/
|
*/
|
||||||
public String toString ()
|
public String toString ()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer ("MReportLineSet[")
|
StringBuilder sb = new StringBuilder ("MReportLineSet[")
|
||||||
.append(get_ID()).append(" - ").append(getName())
|
.append(get_ID()).append(" - ").append(getName())
|
||||||
.append ("]");
|
.append ("]");
|
||||||
return sb.toString ();
|
return sb.toString ();
|
||||||
|
|
|
@ -252,7 +252,7 @@ public class MReportSource extends X_PA_ReportSource
|
||||||
*/
|
*/
|
||||||
public String toString ()
|
public String toString ()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer ("MReportSource[")
|
StringBuilder sb = new StringBuilder ("MReportSource[")
|
||||||
.append(get_ID()).append(" - ").append(getDescription())
|
.append(get_ID()).append(" - ").append(getDescription())
|
||||||
.append(" - ").append(getElementType());
|
.append(" - ").append(getElementType());
|
||||||
sb.append ("]");
|
sb.append ("]");
|
||||||
|
|
|
@ -249,11 +249,11 @@ public class MReportTree
|
||||||
MTreeNode node = m_tree.getRoot().findNode(ID);
|
MTreeNode node = m_tree.getRoot().findNode(ID);
|
||||||
if (log.isLoggable(Level.FINEST)) log.finest("Root=" + node);
|
if (log.isLoggable(Level.FINEST)) log.finest("Root=" + node);
|
||||||
//
|
//
|
||||||
StringBuffer result = null;
|
StringBuilder result = null;
|
||||||
if (node != null && node.isSummary ())
|
if (node != null && node.isSummary ())
|
||||||
{
|
{
|
||||||
Enumeration<TreeNode> en = node.preorderEnumeration ();
|
Enumeration<TreeNode> en = node.preorderEnumeration ();
|
||||||
StringBuffer sb = new StringBuffer ();
|
StringBuilder sb = new StringBuilder ();
|
||||||
while (en.hasMoreElements ())
|
while (en.hasMoreElements ())
|
||||||
{
|
{
|
||||||
MTreeNode nn = (MTreeNode)en.nextElement ();
|
MTreeNode nn = (MTreeNode)en.nextElement ();
|
||||||
|
@ -271,12 +271,12 @@ public class MReportTree
|
||||||
else
|
else
|
||||||
if (log.isLoggable(Level.FINEST)) log.finest ("- skipped parent (" + nn + ")");
|
if (log.isLoggable(Level.FINEST)) log.finest ("- skipped parent (" + nn + ")");
|
||||||
}
|
}
|
||||||
result = new StringBuffer (" ( ");
|
result = new StringBuilder (" ( ");
|
||||||
result.append (sb);
|
result.append (sb);
|
||||||
result.append (" ) ");
|
result.append (" ) ");
|
||||||
}
|
}
|
||||||
else // not found or not summary
|
else // not found or not summary
|
||||||
result = new StringBuffer (ColumnName).append("=").append(ID);
|
result = new StringBuilder (ColumnName).append("=").append(ID);
|
||||||
//
|
//
|
||||||
if (log.isLoggable(Level.FINEST)) log.finest(result.toString());
|
if (log.isLoggable(Level.FINEST)) log.finest(result.toString());
|
||||||
return result.toString();
|
return result.toString();
|
||||||
|
|
|
@ -107,7 +107,7 @@ public class TrialBalance extends SvrProcess
|
||||||
*/
|
*/
|
||||||
protected void prepare()
|
protected void prepare()
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer ("AD_PInstance_ID=")
|
StringBuilder sb = new StringBuilder ("AD_PInstance_ID=")
|
||||||
.append(getAD_PInstance_ID());
|
.append(getAD_PInstance_ID());
|
||||||
// Parameter
|
// Parameter
|
||||||
ProcessInfoParameter[] para = getParameter();
|
ProcessInfoParameter[] para = getParameter();
|
||||||
|
|
|
@ -269,7 +269,7 @@ public class AmtInWords_PT implements AmtInWords
|
||||||
if (amount == null)
|
if (amount == null)
|
||||||
return amount;
|
return amount;
|
||||||
//
|
//
|
||||||
StringBuffer sb = new StringBuffer ();
|
StringBuilder sb = new StringBuilder ();
|
||||||
int pos = amount.lastIndexOf ('.'); // Old
|
int pos = amount.lastIndexOf ('.'); // Old
|
||||||
// int pos = amount.lastIndexOf (',');
|
// int pos = amount.lastIndexOf (',');
|
||||||
int pos2 = amount.lastIndexOf (','); // Old
|
int pos2 = amount.lastIndexOf (','); // Old
|
||||||
|
|
|
@ -128,7 +128,7 @@ public class AmtInWords_ZH implements AmtInWords
|
||||||
*/
|
*/
|
||||||
private String convert (BigDecimal number)
|
private String convert (BigDecimal number)
|
||||||
{
|
{
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuilder sb = new StringBuilder();
|
||||||
int signum = number.signum(); // positive , 0 , negative
|
int signum = number.signum(); // positive , 0 , negative
|
||||||
int numUnit = 0; // each number character
|
int numUnit = 0; // each number character
|
||||||
int numIndex = 0; // each number position
|
int numIndex = 0; // each number position
|
||||||
|
|
|
@ -157,7 +157,7 @@ public class CLogFormatter extends Formatter
|
||||||
int index = className.lastIndexOf('.');
|
int index = className.lastIndexOf('.');
|
||||||
if (index != -1)
|
if (index != -1)
|
||||||
className = className.substring(index+1);
|
className = className.substring(index+1);
|
||||||
StringBuffer sb = new StringBuffer()
|
StringBuilder sb = new StringBuilder()
|
||||||
.append("*** ")
|
.append("*** ")
|
||||||
.append(new Timestamp(System.currentTimeMillis()))
|
.append(new Timestamp(System.currentTimeMillis()))
|
||||||
.append(" idempiere Log (").append(className)
|
.append(" idempiere Log (").append(className)
|
||||||
|
|
|
@ -223,7 +223,7 @@ public final class DB
|
||||||
// if (mailPassword == null || mailPassword.length() == 0)
|
// if (mailPassword == null || mailPassword.length() == 0)
|
||||||
// return;
|
// return;
|
||||||
//
|
//
|
||||||
StringBuffer sql = new StringBuffer("UPDATE AD_Client SET")
|
StringBuilder sql = new StringBuilder("UPDATE AD_Client SET")
|
||||||
.append(" SMTPHost=").append(DB.TO_STRING(server))
|
.append(" SMTPHost=").append(DB.TO_STRING(server))
|
||||||
.append(", RequestEMail=").append(DB.TO_STRING(adminEMail))
|
.append(", RequestEMail=").append(DB.TO_STRING(adminEMail))
|
||||||
.append(", RequestUser=").append(DB.TO_STRING(mailUser))
|
.append(", RequestUser=").append(DB.TO_STRING(mailUser))
|
||||||
|
@ -232,7 +232,7 @@ public final class DB
|
||||||
int no = DB.executeUpdate(sql.toString(), null);
|
int no = DB.executeUpdate(sql.toString(), null);
|
||||||
if (log.isLoggable(Level.FINE)) log.fine("Client #"+no);
|
if (log.isLoggable(Level.FINE)) log.fine("Client #"+no);
|
||||||
//
|
//
|
||||||
sql = new StringBuffer("UPDATE AD_User SET ")
|
sql = new StringBuilder("UPDATE AD_User SET ")
|
||||||
.append(" EMail=").append(DB.TO_STRING(adminEMail))
|
.append(" EMail=").append(DB.TO_STRING(adminEMail))
|
||||||
.append(", EMailUser=").append(DB.TO_STRING(mailUser))
|
.append(", EMailUser=").append(DB.TO_STRING(mailUser))
|
||||||
.append(", EMailUserPW=").append(DB.TO_STRING(mailPassword))
|
.append(", EMailUserPW=").append(DB.TO_STRING(mailPassword))
|
||||||
|
|
|
@ -880,7 +880,7 @@ public final class EMail implements Serializable
|
||||||
public void setMessageHTML (String subject, String message)
|
public void setMessageHTML (String subject, String message)
|
||||||
{
|
{
|
||||||
m_subject = subject;
|
m_subject = subject;
|
||||||
StringBuffer sb = new StringBuffer("<HTML>\n")
|
StringBuilder sb = new StringBuilder("<HTML>\n")
|
||||||
.append("<HEAD>\n")
|
.append("<HEAD>\n")
|
||||||
.append("<TITLE>\n")
|
.append("<TITLE>\n")
|
||||||
.append(subject + "\n")
|
.append(subject + "\n")
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue