IDEMPIERE-4743 - Clean up ImageDBStorageImpl, Lookup, M_Element, MAccount, MAcctProcessor,MAcctSchema,MAcctSchemaDefault,MAcctSchemaElement classes (#714)

This commit is contained in:
Diego Ruiz 2021-06-10 09:49:49 +02:00 committed by GitHub
parent d0346f6819
commit 5811f87f19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 0 additions and 80 deletions

View File

@ -101,7 +101,6 @@ public class ImageDBStorageImpl implements IImageStore {
if (log.isLoggable(Level.FINE)) log.fine(entry.getCompressedSize() + " (" + entry.getSize() + ") "
+ (entry.getCompressedSize() * 100 / entry.getSize()) + "%");
//
// zip.finish();
zip.close();
deflatedData = out.toByteArray();
if (log.isLoggable(Level.FINE)) log.fine("Length=" + inflatedData.length);

View File

@ -112,14 +112,12 @@ public abstract class Lookup extends AbstractListModel<Object>
if (p_data.contains(anObject) || anObject == null)
{
m_selectedObject = anObject;
// Log.trace(s_ll, "Lookup.setSelectedItem", anObject);
}
else
{
m_selectedObject = null;
if (log.isLoggable(Level.FINE)) log.fine(getColumnName() + ": setSelectedItem - Set to NULL");
}
// if (m_worker == null || !m_worker.isAlive())
fireContentsChanged(this, -1, -1);
}
} // setSelectedItem
@ -274,8 +272,6 @@ public abstract class Lookup extends AbstractListModel<Object>
m_tempData = new Object[size];
// We need to do a deep copy, so store it in Array
p_data.toArray(m_tempData);
// for (int i = 0; i < size; i++)
// m_tempData[i] = p_data.get(i);
}
@ -292,16 +288,6 @@ public abstract class Lookup extends AbstractListModel<Object>
obj = m_selectedObject;
}
// comment next code because of bug [ 2053140 ] Mandatory lookup fields autofilled (badly)
// if nothing selected & mandatory, select first
// if (obj == null && mandatory && p_data.size() > 0)
// {
// obj = p_data.get(0);
// m_selectedObject = obj;
// log.finest(getColumnName() + ": SelectedValue SetToFirst=" + obj);
// // fireContentsChanged(this, -1, -1);
// }
m_loaded = true;
fireContentsChanged(this, 0, p_data.size());
if (p_data.size() == 0) {

View File

@ -214,7 +214,6 @@ public class MAccount extends X_C_ValidCombination implements ImmutablePOSupport
whereClause.append(" AND UserElement2_ID=?");
params.add(UserElement2_ID);
}
// whereClause.append(" ORDER BY IsFullyQualified DESC");
MAccount existingAccount = new Query(ctx, MAccount.Table_Name, whereClause.toString(), trxName)
.setParameters(params)
@ -426,8 +425,6 @@ public class MAccount extends X_C_ValidCombination implements ImmutablePOSupport
super (ctx, C_ValidCombination_ID, trxName);
if (C_ValidCombination_ID == 0)
{
// setAccount_ID (0);
// setC_AcctSchema_ID (0);
setIsFullyQualified (false);
}
} // MAccount
@ -503,7 +500,6 @@ public class MAccount extends X_C_ValidCombination implements ImmutablePOSupport
.append(getCombination());
else
{
// .append(",Client=").append(getAD_Client_ID())
sb.append(",Schema=").append(getC_AcctSchema_ID())
.append(",Org=").append(getAD_Org_ID())
.append(",Acct=").append(getAccount_ID())
@ -652,7 +648,6 @@ public class MAccount extends X_C_ValidCombination implements ImmutablePOSupport
{
combiStr = "*";
descrStr = "*";
//fullyQualified = false; IDEMPIERE 159 - allow combination with org *
}
}
else if (MAcctSchemaElement.ELEMENTTYPE_Account.equals(element.getElementType()))

View File

@ -66,10 +66,6 @@ public class MAcctProcessor extends X_C_AcctProcessor
super (ctx, C_AcctProcessor_ID, trxName);
if (C_AcctProcessor_ID == 0)
{
// setName (null);
// setSupervisor_ID (0);
// setFrequencyType (FREQUENCYTYPE_Hour);
// setFrequency (1);
setKeepLogDays (7); // 7
}
} // MAcctProcessor

View File

@ -197,8 +197,6 @@ public class MAcctSchema extends X_C_AcctSchema implements ImmutablePOSupport
super (ctx, C_AcctSchema_ID, trxName);
if (C_AcctSchema_ID == 0)
{
// setC_Currency_ID (0);
// setName (null);
setAutoPeriodControl (true);
setPeriod_OpenFuture(2);
setPeriod_OpenHistory(2);

View File

@ -111,37 +111,6 @@ public class MAcctSchemaDefault extends X_C_AcctSchema_Default implements Immuta
copyPO(copy);
}
/**
* Get Realized Gain Acct for currency
* @param C_Currency_ID currency
* @return gain acct
*/
// IDEMPIERE-362 Hide things that don't work on iDempiere
// public int getRealizedGain_Acct (int C_Currency_ID)
// {
// MCurrencyAcct acct = MCurrencyAcct.get (this, C_Currency_ID);
// if (acct != null)
// return acct.getRealizedGain_Acct();
// return super.getRealizedGain_Acct();
// } // getRealizedGain_Acct
/**
* Get Realized Loss Acct for currency
* @param C_Currency_ID currency
* @return loss acct
*/
// IDEMPIERE-362 Hide things that don't work on iDempiere
// public int getRealizedLoss_Acct (int C_Currency_ID)
// {
// MCurrencyAcct acct = MCurrencyAcct.get (this, C_Currency_ID);
// if (acct != null)
// return acct.getRealizedLoss_Acct();
// return super.getRealizedLoss_Acct();
// } // getRealizedLoss_Acct
/**
* Get Acct Info list
* @return list

View File

@ -200,15 +200,8 @@ public class MAcctSchemaElement extends X_C_AcctSchema_Element implements Immuta
super (ctx, C_AcctSchema_Element_ID, trxName);
if (C_AcctSchema_Element_ID == 0)
{
// setC_AcctSchema_Element_ID (0);
// setC_AcctSchema_ID (0);
// setC_Element_ID (0);
// setElementType (null);
setIsBalanced (false);
setIsMandatory (false);
// setName (null);
// setOrg_ID (0);
// setSeqNo (0);
}
} // MAcctSchemaElement
@ -232,12 +225,6 @@ public class MAcctSchemaElement extends X_C_AcctSchema_Element implements Immuta
this (as.getCtx(), 0, as.get_TrxName());
setClientOrg(as);
setC_AcctSchema_ID (as.getC_AcctSchema_ID());
// setC_Element_ID (0);
// setElementType (null);
// setName (null);
// setSeqNo (0);
} // MAcctSchemaElement
/**

View File

@ -142,13 +142,6 @@ public class M_Element extends X_AD_Element
public M_Element (Properties ctx, int AD_Element_ID, String trxName)
{
super (ctx, AD_Element_ID, trxName);
if (AD_Element_ID == 0)
{
// setColumnName (null);
// setEntityType (null); // U
// setName (null);
// setPrintName (null);
}
} // M_Element
/**
@ -296,9 +289,6 @@ public class M_Element extends X_AD_Element
no = DB.executeUpdate(sql.toString(), get_TrxName());
if (log.isLoggable(Level.FINE)) log.fine("Fields updated #" + no);
// Info Column - update Name, Description, Help - doesn't have IsCentrallyMaintained currently
// no = DB.executeUpdate(sql.toString(), get_TrxName());
// log.fine("InfoColumn updated #" + no);
}
if ( is_ValueChanged(M_Element.COLUMNNAME_PrintName)