IDEMPIERE-4723 - Clean up code -> MT/MU/MW* classes (#823)
This commit is contained in:
parent
e41fcdea2f
commit
29343610ca
|
@ -57,9 +57,6 @@ public class MTab extends X_AD_Tab implements ImmutablePOSupport
|
|||
super (ctx, AD_Tab_ID, trxName);
|
||||
if (AD_Tab_ID == 0)
|
||||
{
|
||||
// setAD_Window_ID (0);
|
||||
// setAD_Table_ID (0);
|
||||
// setName (null);
|
||||
setEntityType (ENTITYTYPE_UserMaintained); // U
|
||||
setHasTree (false);
|
||||
setIsReadOnly (false);
|
||||
|
@ -193,7 +190,6 @@ public class MTab extends X_AD_Tab implements ImmutablePOSupport
|
|||
*/
|
||||
protected boolean beforeSave (boolean newRecord)
|
||||
{
|
||||
// UPDATE AD_Tab SET IsInsertRecord='N' WHERE IsInsertRecord='Y' AND IsReadOnly='Y'
|
||||
if (isReadOnly() && isInsertRecord())
|
||||
setIsInsertRecord(false);
|
||||
//RF[2826384]
|
||||
|
|
|
@ -259,8 +259,6 @@ public class MTable extends X_AD_Table implements ImmutablePOSupport
|
|||
super (ctx, AD_Table_ID, trxName);
|
||||
if (AD_Table_ID == 0)
|
||||
{
|
||||
// setName (null);
|
||||
// setTableName (null);
|
||||
setAccessLevel (ACCESSLEVEL_SystemOnly); // 4
|
||||
setEntityType (ENTITYTYPE_UserMaintained); // U
|
||||
setIsChangeLog (false);
|
||||
|
|
|
@ -150,15 +150,12 @@ public class MTax extends X_C_Tax implements ImmutablePOSupport
|
|||
super (ctx, C_Tax_ID, trxName);
|
||||
if (C_Tax_ID == 0)
|
||||
{
|
||||
// setC_Tax_ID (0); PK
|
||||
setIsDefault (false);
|
||||
setIsDocumentLevel (true);
|
||||
setIsSummary (false);
|
||||
setIsTaxExempt (false);
|
||||
// setName (null);
|
||||
setRate (Env.ZERO);
|
||||
setRequiresTaxCertificate (false);
|
||||
// setC_TaxCategory_ID (0); // FK
|
||||
setSOPOType (SOPOTYPE_Both);
|
||||
setValidFrom (TimeUtil.getDay(1990,1,1));
|
||||
setIsSalesTax(false);
|
||||
|
|
|
@ -46,7 +46,6 @@ public class MTaxCategory extends X_C_TaxCategory
|
|||
super (ctx, C_TaxCategory_ID, trxName);
|
||||
if (C_TaxCategory_ID == 0)
|
||||
{
|
||||
// setName (null);
|
||||
setIsDefault (false);
|
||||
}
|
||||
} // MTaxCategory
|
||||
|
|
|
@ -84,10 +84,6 @@ public class MTest extends X_Test
|
|||
setC_Currency_ID(100); // USD
|
||||
setC_Location_ID(109); // Monroe
|
||||
setC_UOM_ID(100); // Each
|
||||
// setC_BPartner_ID(C_BPartner_ID);
|
||||
// setC_Payment_ID(C_Payment_ID);
|
||||
// setM_Locator_ID(M_Locator_ID);
|
||||
// setM_Product_ID(M_Product_ID);
|
||||
} // MTest
|
||||
|
||||
|
||||
|
@ -158,14 +154,6 @@ public class MTest extends X_Test
|
|||
System.out.println("->" + t2.getCharacterData() + "<-");
|
||||
|
||||
t2.delete(true);
|
||||
|
||||
|
||||
/** Volume Test
|
||||
for (int i = 1; i < 20000; i++)
|
||||
{
|
||||
new MTest (ctx, "test", i).saveEx();
|
||||
}
|
||||
/** */
|
||||
} // main
|
||||
|
||||
} // MTest
|
||||
|
|
|
@ -61,12 +61,8 @@ public class MTimeExpense extends X_S_TimeExpense implements DocAction
|
|||
super (ctx, S_TimeExpense_ID, trxName);
|
||||
if (S_TimeExpense_ID == 0)
|
||||
{
|
||||
// setC_BPartner_ID (0);
|
||||
setDateReport (new Timestamp (System.currentTimeMillis ()));
|
||||
// setDocumentNo (null);
|
||||
setIsApproved (false);
|
||||
// setM_PriceList_ID (0);
|
||||
// setM_Warehouse_ID (0);
|
||||
super.setProcessed (false);
|
||||
setProcessing(false);
|
||||
}
|
||||
|
@ -447,8 +443,6 @@ public class MTimeExpense extends X_S_TimeExpense implements DocAction
|
|||
if (m_processMsg != null)
|
||||
return false;
|
||||
|
||||
// Close Not delivered Qty
|
||||
// setDocAction(DOCACTION_None);
|
||||
return true;
|
||||
} // closeIt
|
||||
|
||||
|
|
|
@ -49,8 +49,6 @@ public class MTimeExpenseLine extends X_S_TimeExpenseLine
|
|||
super (ctx, S_TimeExpenseLine_ID, trxName);
|
||||
if (S_TimeExpenseLine_ID == 0)
|
||||
{
|
||||
// setS_TimeExpenseLine_ID (0); // PK
|
||||
// setS_TimeExpense_ID (0); // Parent
|
||||
setQty(Env.ONE);
|
||||
setQtyInvoiced(Env.ZERO);
|
||||
setQtyReimbursed(Env.ZERO);
|
||||
|
|
|
@ -48,12 +48,8 @@ public class MTransaction extends X_M_Transaction
|
|||
super (ctx, M_Transaction_ID, trxName);
|
||||
if (M_Transaction_ID == 0)
|
||||
{
|
||||
// setM_Transaction_ID (0); // PK
|
||||
// setM_Locator_ID (0);
|
||||
// setM_Product_ID (0);
|
||||
setMovementDate (new Timestamp(System.currentTimeMillis()));
|
||||
setMovementQty (Env.ZERO);
|
||||
// setMovementType (MOVEMENTTYPE_CustomerShipment);
|
||||
}
|
||||
} // MTransaction
|
||||
|
||||
|
|
|
@ -294,8 +294,6 @@ public class MTree extends MTree_Base
|
|||
addToTree (node_ID, parent_ID, seqNo, onBar); // calls getNodeDetail
|
||||
}
|
||||
//
|
||||
//closing the rowset will also close connection for oracle rowset implementation
|
||||
//m_nodeRowSet.close();
|
||||
m_nodeRowSet = null;
|
||||
m_nodeIdMap = null;
|
||||
}
|
||||
|
@ -557,11 +555,10 @@ public class MTree extends MTree_Base
|
|||
MTreeNode retValue = null;
|
||||
try
|
||||
{
|
||||
//m_nodeRowSet.beforeFirst();
|
||||
ArrayList<Integer> nodeList = m_nodeIdMap.get(Integer.valueOf(node_ID));
|
||||
int size = nodeList != null ? nodeList.size() : 0;
|
||||
int i = 0;
|
||||
//while (m_nodeRowSet.next())
|
||||
|
||||
while (i < size)
|
||||
{
|
||||
Integer nodeId = nodeList.get(i);
|
||||
|
@ -638,7 +635,6 @@ public class MTree extends MTree_Base
|
|||
description = userDef.getDescription();
|
||||
}
|
||||
}
|
||||
// log.fine("getNodeDetail - " + name + " - " + actionColor + " - " + access);
|
||||
//
|
||||
if (access != null // rw or ro for Role
|
||||
|| m_editable) // Menu Window can see all
|
||||
|
@ -694,28 +690,6 @@ public class MTree extends MTree_Base
|
|||
}
|
||||
} // trimTree
|
||||
|
||||
/**
|
||||
* Diagnostics: Print tree
|
||||
*/
|
||||
/*private void dumpTree()
|
||||
{
|
||||
Enumeration<?> en = m_root.preorderEnumeration();
|
||||
int count = 0;
|
||||
while (en.hasMoreElements())
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
MTreeNode nd = (MTreeNode)en.nextElement();
|
||||
for (int i = 0; i < nd.getLevel(); i++)
|
||||
sb.append(" ");
|
||||
sb.append("ID=").append(nd.getNode_ID())
|
||||
.append(", SeqNo=").append(nd.getSeqNo())
|
||||
.append(" ").append(nd.getName());
|
||||
System.out.println(sb.toString());
|
||||
count++;
|
||||
}
|
||||
System.out.println("Count=" + count);
|
||||
} // diagPrintTree*/
|
||||
|
||||
/**
|
||||
* Get Root node
|
||||
* @return root
|
||||
|
|
|
@ -56,7 +56,7 @@ public class MTreeNode extends DefaultMutableTreeNode
|
|||
int parent_ID, boolean isSummary, String imageIndicator, boolean onBar, Color color)
|
||||
{
|
||||
super();
|
||||
// log.fine( "MTreeNode Node_ID=" + node_ID + ", Parent_ID=" + parent_ID + " - " + name);
|
||||
|
||||
m_node_ID = node_ID;
|
||||
m_seqNo = seqNo;
|
||||
m_name = name;
|
||||
|
@ -236,8 +236,7 @@ public class MTreeNode extends DefaultMutableTreeNode
|
|||
*/
|
||||
public String toString()
|
||||
{
|
||||
return // m_node_ID + "/" + m_parent_ID + " " + m_seqNo + " - " +
|
||||
m_name;
|
||||
return m_name;
|
||||
} // toString
|
||||
|
||||
/**
|
||||
|
@ -331,10 +330,6 @@ public class MTreeNode extends DefaultMutableTreeNode
|
|||
imageIndex = TYPE_PROCESS;
|
||||
else if (imageIndicator.equals(MWFNode.ACTION_SubWorkflow)) // WorkFlow
|
||||
imageIndex = TYPE_WORKFLOW;
|
||||
/*
|
||||
else if (imageIndicator.equals(MWFNode.ACTION_UserWorkbench)) // Workbench
|
||||
imageIndex = TYPE_WORKBENCH;
|
||||
*/
|
||||
else if (imageIndicator.equals(MWFNode.ACTION_SetVariable)) // Set Variable
|
||||
imageIndex = TYPE_SETVARIABLE;
|
||||
else if (imageIndicator.equals(MWFNode.ACTION_UserChoice)) // User Choice
|
||||
|
|
|
@ -254,8 +254,6 @@ public class MTree_Base extends X_AD_Tree implements ImmutablePOSupport
|
|||
super(ctx, AD_Tree_ID, trxName);
|
||||
if (AD_Tree_ID == 0)
|
||||
{
|
||||
// setName (null);
|
||||
// setTreeType (null);
|
||||
setIsAllNodes (true); // complete tree
|
||||
setIsDefault(false);
|
||||
}
|
||||
|
|
|
@ -137,8 +137,6 @@ public class MUOMConversion extends X_C_UOM_Conversion implements ImmutablePOSup
|
|||
endDate.add(Calendar.MINUTE, minutes);
|
||||
//
|
||||
Timestamp retValue = new Timestamp(endDate.getTimeInMillis());
|
||||
// log.config( "TimeUtil.getEndDate", "Start=" + startDate
|
||||
// + ", Qty=" + qty + ", End=" + retValue);
|
||||
return retValue;
|
||||
} // startDate
|
||||
|
||||
|
|
|
@ -210,7 +210,7 @@ public class MUser extends X_AD_User implements ImmutablePOSupport
|
|||
}
|
||||
boolean hash_password = MSysConfig.getBooleanValue(MSysConfig.USER_PASSWORD_HASH, false);
|
||||
boolean email_login = MSysConfig.getBooleanValue(MSysConfig.USE_EMAIL_FOR_LOGIN, false);
|
||||
// ArrayList<KeyNamePair> clientList = new ArrayList<KeyNamePair>();
|
||||
|
||||
ArrayList<Integer> clientsValidated = new ArrayList<Integer>();
|
||||
MUser retValue = null;
|
||||
|
||||
|
@ -663,34 +663,9 @@ public class MUser extends X_AD_User implements ImmutablePOSupport
|
|||
{
|
||||
if (ia == null)
|
||||
return "NoEmail";
|
||||
else return ia.getAddress();
|
||||
/*
|
||||
if (true)
|
||||
return null;
|
||||
|
||||
Hashtable<String,String> env = new Hashtable<String,String>();
|
||||
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.dns.DnsContextFactory");
|
||||
// env.put(Context.PROVIDER_URL, "dns://admin.adempiere.org");
|
||||
try
|
||||
{
|
||||
DirContext ctx = new InitialDirContext(env);
|
||||
// Attributes atts = ctx.getAttributes("admin");
|
||||
Attributes atts = ctx.getAttributes("dns://admin.adempiere.org", new String[] {"MX"});
|
||||
NamingEnumeration en = atts.getAll();
|
||||
// NamingEnumeration en = ctx.list("adempiere.org");
|
||||
while (en.hasMore())
|
||||
{
|
||||
System.out.println(en.next());
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
return e.getLocalizedMessage();
|
||||
}
|
||||
return null;
|
||||
*/
|
||||
else
|
||||
return ia.getAddress();
|
||||
|
||||
} // validateEmail
|
||||
|
||||
/**
|
||||
|
|
|
@ -149,11 +149,8 @@ public class MUserDefWin extends X_AD_UserDef_Win implements ImmutablePOSupport
|
|||
{
|
||||
// parameters
|
||||
final int AD_Org_ID = Env.getAD_Org_ID(ctx);
|
||||
//final int anyOrg = 0;
|
||||
final int AD_Role_ID = Env.getAD_Role_ID(ctx);
|
||||
//final String anyRole = "NULL";
|
||||
final int AD_User_ID = Env.getAD_User_ID(ctx);
|
||||
//final String anyUser = "NULL";
|
||||
|
||||
// Check Cache
|
||||
String key = new StringBuilder().append(window_ID).append("_")
|
||||
|
|
|
@ -128,18 +128,6 @@ public class MUserOrgAccess extends X_AD_User_OrgAccess
|
|||
setAD_User_ID (AD_User_ID);
|
||||
} // MUserOrgAccess
|
||||
|
||||
/**
|
||||
* User Constructor
|
||||
* param user user
|
||||
* param AD_Org_ID org
|
||||
*
|
||||
public MUserOrgAccess (MUser user, int AD_Org_ID)
|
||||
{
|
||||
this (user.getCtx(), 0, user.get_TrxName());
|
||||
setClientOrg (user.getAD_Client_ID(), AD_Org_ID);
|
||||
setAD_User_ID (user.getAD_User_ID());
|
||||
} // MUserOrgAccess
|
||||
|
||||
/**
|
||||
* String Representation
|
||||
* @return info
|
||||
|
|
|
@ -137,9 +137,6 @@ public class MWarehouse extends X_M_Warehouse implements ImmutablePOSupport
|
|||
super(ctx, M_Warehouse_ID, trxName);
|
||||
if (M_Warehouse_ID == 0)
|
||||
{
|
||||
// setValue (null);
|
||||
// setName (null);
|
||||
// setC_Location_ID (0);
|
||||
setSeparator ("*"); // *
|
||||
}
|
||||
} // MWarehouse
|
||||
|
|
|
@ -47,8 +47,6 @@ public class MWindowAccess extends X_AD_Window_Access
|
|||
throw new IllegalArgumentException("Multi-Key");
|
||||
else
|
||||
{
|
||||
// setAD_Role_ID (0);
|
||||
// setAD_Window_ID (0);
|
||||
setIsReadWrite (true);
|
||||
}
|
||||
} // MWindowAccess
|
||||
|
|
|
@ -16,18 +16,6 @@ public class MXIFAJournal extends X_I_FAJournal
|
|||
public MXIFAJournal (Properties ctx, int I_FAJournal_ID, String trxName)
|
||||
{
|
||||
super (ctx, I_FAJournal_ID, trxName);
|
||||
// if (I_FAJournal_ID == 0)
|
||||
// {
|
||||
// setIsDepreciated (false);
|
||||
// setIsFullyDepreciated (false);
|
||||
// setValue (null);
|
||||
// setName (null);
|
||||
// setIsInPosession (false);
|
||||
// setIsOwned (false);
|
||||
// setA_Asset_Group_ID (0);
|
||||
// setIsDisposed (false);
|
||||
// setM_AttributeSetInstance_ID(0);
|
||||
// }
|
||||
} // MXIFAJournal
|
||||
|
||||
/**
|
||||
|
|
|
@ -61,8 +61,6 @@ public class MYear extends X_C_Year
|
|||
super (ctx, C_Year_ID, trxName);
|
||||
if (C_Year_ID == 0)
|
||||
{
|
||||
// setC_Calendar_ID (0);
|
||||
// setYear (null);
|
||||
setProcessing (false); // N
|
||||
}
|
||||
} // MYear
|
||||
|
|
|
@ -239,11 +239,6 @@ public final class NaturalAccountMap<K,V> extends CCache<K,V>
|
|||
if (IsDocControlled == null || IsDocControlled.length() == 0)
|
||||
IsDocControlled = "N";
|
||||
|
||||
|
||||
// log.config( "Value=" + Value + ", AcctType=" + AccountType
|
||||
// + ", Sign=" + AccountSign + ", Doc=" + docControlled
|
||||
// + ", Summary=" + summary + " - " + Name + " - " + Description);
|
||||
|
||||
try
|
||||
{
|
||||
// Try to find - allows to use same natural account for multiple default accounts
|
||||
|
|
Loading…
Reference in New Issue