MAP and ORDER methods cannot be defined in the same object

Options
- True
- False


CORRECT ANSWER : True

Discussion Board
MAP and ORDER Methods

The above statement is true. MAP and ORDER methods cannot be defined in the same object. Map methods return values that can be used for comparing and sorting. Generally, map methods perform calculations on the attributes of the object to produce the return value. Map methods are called automatically to evaluate such comparisons. Comparisons implied by the DISTINCT, GROUP BY, UNION, and ORDER BY clauses which require sorting of rows.

Order methods make direct one-to-one object comparisons. Unlike map methods, they cannot determine the order of a number of objects. They simply tell you that the current object is less than, equal to, or greater than the object, that it is being compared to, based on the criterion used. An order method is a function for an object (SELF), with one declared parameter that is an object of the same type. As with map methods, an order method, if one is defined, is called automatically whenever two objects of that type need to be compared. Order methods are useful where comparison semantics may be too complex to use a map method.

Prajakta Pandit 02-22-2017 12:46 AM

Write your comments


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement