Databases Reference
In-Depth Information
Some commonly used expressions
Groovy expressions are used in ADF Business Components to evaluate and validate business
logic. Groovy expression is preferred declaraive expression language for the enity and
view objects.
Someimes, we will add an atribute for the enity or the view
object with the values defaulted using Groovy expression as a
calculated atribute known as transient atribute .
The following table gives the expressions and their funcionaliies:
Expression Functionality
getAttribute("Sal") This expression will fetch the Sal attribute.
(Date)getAttribute("HireDate") This expression will cast the HireDate
attribute value to Date .
new TimeStamp(System.
currentTimeMillis())
This expression will create a new Timestamp
object from the current system time in long .
newValue
This expression will get the new value for the
attribute in the attribute-level validator.
oldValue
This expression will get the old value for the
attribute in the attribute-level validator.
source
This expression will refer to the current entity
object.
adf.context
This expression will refer to the ADFContext
object.
adf.object
This expression will refer to the current object
to which the expression is applied.
adf.error
This expression will give the reference for the
current error handler object.
adf.error.raise
This expression will raise an exception.
adf.error.warn
This expression will raise a warning.
adf.currentDate
This expression will refer to the current
date with no time.
adf.currentDateTime
This expression will refer to the current date
and time.
rowSetAttr.sum(),rowSetAttr.
count(), rowSetAttr.min(),
rowSetAttr.max(), rowSetAttr.
avg()
You can call the aggregate function on the ADF
RowSet object. RowSet is a collection of rows
returned through an association accessor.
Search WWH ::




Custom Search