What is the Groovy expression you use?

In an HR replication you want to add validation using Groovy language. The validation is defined
on the salary attribute. It needs to ensure that if an employees job is not that of a salesmans then
the new value of the salary must be greater than 500 or greater than zero. What is the Groovy
expression you use?

In an HR replication you want to add validation using Groovy language. The validation is defined
on the salary attribute. It needs to ensure that if an employees job is not that of a salesmans then
the new value of the salary must be greater than 500 or greater than zero. What is the Groovy
expression you use?

A.
( Job “SALESMAN” ? newValue > 500 : newValue > 0)

B.
(job != “SALESMAN” ? currentValue > 500 : currentValue > 0)

C.
(job !=”SALESMAN” : newValue > 500 ? newValue > 0)

D.
(job !=’SALESMAN’ ? newValue > 500 : newValue > 0)

E.
(job != “SALESMAN” ? newValue > 500 : newValue > 0)

Explanation:
http://www.oracle.com/technetwork/developer-tools/jdev/introduction-to-groovy-128837.pdf (page 12)



Leave a Reply 1

Your email address will not be published. Required fields are marked *