advanced

Reset the value of a field when another field is modified

This entry is part of the Maximo Java Development series. Today I want to share with you some Java sample code to reset the value of a field when another field is modified.In the example below I have implemented a little piece of logic to reset the WORKORDER.SUPEVISOR field when the WORKORDER.OWNERGROUP is modified. Here […]

Custom condition Java class

Sometimes standard Conditional Expressions are not enough. Sometimes the logic to implement is too complex to be implemented using an SQL expression. In such cases Maximo allows to implement the condition logic in a custom condition class using Java. To implement a condition class you must extend psdi.common.condition.CustomCondition and override evaluateCondition and toWhereClause methods. Here is a […]

MBO Performance Tip N.8 – If there is no other way… use JDBC

This entry is part of the Java MBO performance optimization golden rules series. Sometimes you have to perform some complex logic or you have to join several tables to retrieve a piece of data. In other cases there is a piece of code where performance is critical. In such cases it may be hard to […]

MBO Performance Tip N.6 – Free resources as soon as possible

This entry is part of the Java MBO performance optimization golden rules series. It is important to know the difference between close(), cleanup(), and clear() methods and use them to free up resources as soon as possible. close(): Close the cursor, release the database resources (result set),  SQL statement, and connection key. Does not release […]

MBO Performance Tip N.4 – Be careful when calling MboSet.save()

This entry is part of the Java MBO performance optimization golden rules series. This tip regards the correct handling of transactions in TPAE. The important concept to understand is that MBOs obtained via relationship are included in the same transaction as the parent MBO set. When any MboSet in the transaction is saved, all MboSets […]

MBO Performance Tip N.3 – Be light in Mbo initialization methods

This entry is part of the Java MBO performance optimization golden rules series. The initValue() method is the first method executed after the MBO constructor. It is typically used to initialize attributes on new records and to set default values.The init() method is called after initValue(). It is typically used to set current attribute as […]

MBO Performance Tip N.2 – Use discardable MBOs when possible

This entry is part of the Java MBO performance optimization golden rules series. If an MboSet is used for traversing forward only and not to be saved make it discardable by setting the DISCARDABLE flag.The following snippet shows how to do it. MboSetRemote mboSet = getMboSet(“ASSET”);mboSet.setFlag(MboConstants.DISCARDABLE, true);MboRemote mbo=null;for(int i=0; (mbo=mboSet.getMbo(i))!=null; i++){ …} Using a discardable […]

Scroll to top