Maximo List Archive

This is an archive of the Maximo Yahoo Community. The content of this pages may be a sometimes obsolete so please check post dates.
Thanks to the community owner Christopher Wanko for providing the content.



labeling statement in java

From: yudi.irianto (2012-03-26 15:08)

Dear all,
I need your suggestion about labeling syntax in Java, below sample
psdi.app.inventory.InvUseLineSet. What does it mean with "break label215"?
does it exit from the loop-do and continue to " label215: invRes =
(MboRemote)e.nextElement();" ?
public void copyInvReserveSet(MboSetRemote invReserveSet)
throws MXException, RemoteException {
MboRemote invRes = null;
Vector selectedMbos = invReserveSet.getSelection();
MboRemote invuse = getOwner();
if ((invuse != null) && (invuse.isBasedOn("InvUse"))) {
String usetype = getTranslator().toInternalString("INVUSETYPE",
invuse.getString("usetype"), invuse);
if (!(usetype.equalsIgnoreCase("MIXED"))) {
Enumeration e = selectedMbos.elements();
do { do { if (!(e.hasMoreElements()))
break label215;
<------------------------------------------------------------------ here
invRes = (MboRemote)e.nextElement();
if (!(usetype.equalsIgnoreCase("TRANSFER"))) break
label161;
}
while ((!(invRes.getString("tostoreloc").equals(""))) ||
((!(invRes.getString("ponum").equals(""))) &&
(!(invRes.getString("polinenum").equals("")))));
label161: throw new MXApplicationException("inventory",
"IncorrectUsageType");
}
while ((!(usetype.equalsIgnoreCase("ISSUE"))) || (
(invRes.getString("ponum").equals("")) &&
(invRes.getString("polinenum").equals(""))));
throw new MXApplicationException("inventory",
"IncorrectUsageType");
}
}
for (Enumeration e = selectedMbos.elements(); e.hasMoreElements();
) {
label215: invRes = (MboRemote)e.nextElement();
addInvUseLineFromInvReserve(invRes);
}
}
Max75, Was, Sql2008r2
Thanks & Best Regards,
Yudi Irianto