Menu

Util

Utility (10)
Barry Goodsell

Util

Package [com.oaframework.toolkit.common.util]

checkNull()

Checks whether the supplied object is null. If it is, the method throws an OAException with a predefined Toolkit error message. This method is useful in all sorts of places; for example, it is good practice to check whether you have been passed null parameters to a method, before using them for real. The following example is a method in an Application Modules used to execute the query for a VO:

public void initListRecordsVO(Number recordId)
{
  Util.checkNull(recordId, "recordId parameter");

  ListRecordsVOImpl vo = getListRecordsVO();
  Util.checkNull(vo, "ListRecordsVOImpl");

  vo.initQuery(recordId);
}

checkDateRange()

This method is overloaded to accept either a pair of [java.sql.Timestamp]'s or a pair of {{JboDomain|Date}}'s. CheckDateRange returns true if the first date parameter is earlier than the second.

checkDates()

This method is overloaded to accept either a pair of [java.sql.Timestamp]'s or a pair of [oracle.jbo.domain.date]'s, along with a textual name for each Date. Calls checkDateRange() and if false, throws an OAException with a Toolkit specific error containing two tokens for the two Date names.

checkFutureDate()

Checks whether the supplied date is later than the system date, and throws a Toolkit specific message if it is not

setValidator()

Adds a DecimalValidator to a messageTextInput, ensuring that the values entered are in a given range and have a certain number of decimal places.

setConfirmMessage()

Stores (as a PageContext Session Value) the name of a FND message to be displayed as a Confirmation message.

displayConfirmMessage()

Displays a Confirmation Message using an OAException with Type of Confirmation.

displayYesNoDialog()

Displays a Yes/No dialog page.

getNumberParameter()

Returns a Number parameter from the Page Context.

getNumberSessionValue()

Returns a Number Session Value from the Page Context.


Related

Wiki: com.oaframework.toolkit.common.util

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.