Which code sample is the recommended way to override th…

Which code sample is the recommended way to override the create() method in EmployeesImpl, an
implementation of oracle.jbo.server.EntityImpl for the Employee’s entity object, to set default salary?
(Choose the best answer.)

Which code sample is the recommended way to override the create() method in EmployeesImpl, an
implementation of oracle.jbo.server.EntityImpl for the Employee’s entity object, to set default salary?
(Choose the best answer.)

A.
protected void create(AttributeList attributeList) {
SetAttributeInternal (SALARY, 0);
super.create(attributeList);
}

B.
protected void create(AttributeList attributeList) {
super.create(attributeList);
setAttributeInternal(“SALARY”, 0);
}

C.
protected void create(AttributeList attributeList) {
super.create(attributeList);
setSalary(0);
}

D.
protected void create(AttributeList attributeList) {
setSalary(0);
}

Explanation:
Instances of subclasses should call super.create() before performing any operations.References: http://docs.oracle.com/cd/E28280_01/apirefs.1111/e10653/oracle/jbo/server/EntityImpl.html



Leave a Reply 0

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