Package org.adempiere.process
Class UUIDGenerator
- java.lang.Object
-
- org.compiere.process.SvrProcess
-
- org.adempiere.process.UUIDGenerator
-
- All Implemented Interfaces:
ProcessCall
public class UUIDGenerator extends SvrProcess
Add UUID column (tableName_UU) to table and update existing records with new UUID. Warning: this process is only safe to run if it have exclusive access to database.- Author:
- hengsin
-
-
Field Summary
-
Fields inherited from class org.compiere.process.SvrProcess
MSG_InvalidArguments, MSG_SaveErrorRowNotFound, PROCESS_INFO_CTX_KEY, PROCESS_UI_CTX_KEY, processUI
-
-
Constructor Summary
Constructors Constructor Description UUIDGenerator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringdoIt()Perform process.protected voidprepare()Prepare - e.g., get Parameters.static StringupdateUUID(MColumn column, String trxName)-
Methods inherited from class org.compiere.process.SvrProcess
addBufferLog, addLog, addLog, addLog, commit, commitEx, doIt, get_TrxName, getAD_Client_ID, getAD_PInstance_ID, getAD_User_ID, getCtx, getName, getParameter, getProcessInfo, getRecord_ID, getRecord_IDs, getTable_ID, isLocked, lockObject, postProcess, rollback, setProcessUI, startProcess, statusUpdate, unlockObject
-
-
-
-
Method Detail
-
prepare
protected void prepare()
Description copied from class:SvrProcessPrepare - e.g., get Parameters.ProcessInfoParameter[] para = getParameter(); for (int i = 0; i < para.length; i++) { String name = para[i].getParameterName(); if (para[i].getParameter() == null) ; else if (name.equals("A_Asset_Group_ID")) p_A_Asset_Group_ID = para[i].getParameterAsInt(); else if (name.equals("GuaranteeDate")) p_GuaranteeDate = (Timestamp)para[i].getParameter(); else if (name.equals("AttachAsset")) p_AttachAsset = "Y".equals(para[i].getParameter()); else log.log(Level.SEVERE, "Unknown Parameter: " + name); }- Specified by:
preparein classSvrProcess- See Also:
SvrProcess.prepare()
-
doIt
protected String doIt() throws Exception
Description copied from class:SvrProcessPerform process.- Specified by:
doItin classSvrProcess- Returns:
- Message (variables are parsed)
- Throws:
Exception- if not successful e.g. throw new AdempiereUserError ("@FillMandatory@ @C_BankAccount_ID@");- See Also:
SvrProcess.doIt()
-
-