What does this oracle code do?

PROCEDURE scroll_control IS
BEGIN
IF GET_BLOCK_PROPERTY(:SYSTEM.CURSOR_BLOCK,INSERT_ALLOWED) <> 'TRUE' AND GET_BLOCK_PROPERTY(:SYSTEM.CURSOR_BLOCK,UPDATE_ALLOWED) <> 'TRUE' THEN
  IF :SYSTEM.CURSOR_RECORD = 1 AND :SYSTEM.LAST_RECORD = 'TRUE' THEN
        SET_ITEM_PROPERTY('TOOL.FIRST',ENABLED,PROPERTY_FALSE);
        SET_ITEM_PROPERTY('TOOL.PREVIOUS',ENABLED,PROPERTY_FALSE);
        SET_ITEM_PROPERTY('TOOL.NEXT',ENABLED,PROPERTY_FALSE);
        SET_ITEM_PROPERTY('TOOL.LAST',ENABLED,PROPERTY_FALSE);
  ELSIF :SYSTEM.CURSOR_RECORD = 1 AND :SYSTEM.LAST_RECORD <> 'TRUE' THEN
        SET_ITEM_PROPERTY('TOOL.FIRST',ENABLED,PROPERTY_FALSE);
        SET_ITEM_PROPERTY('TOOL.PREVIOUS',ENABLED,PROPERTY_FALSE);
        SET_ITEM_PROPERTY('TOOL.NEXT',ENABLED,PROPERTY_TRUE);
        SET_ITEM_PROPERTY('TOOL.LAST',ENABLED,PROPERTY_TRUE);
  ELSIF :SYSTEM.CURSOR_RECORD <> 1 AND :SYSTEM.LAST_RECORD = 'TRUE' THEN
        SET_ITEM_PROPERTY('TOOL.FIRST',ENABLED,PROPERTY_TRUE);
        SET_ITEM_PROPERTY('TOOL.PREVIOUS',ENABLED,PROPERTY_TRUE);
        SET_ITEM_PROPERTY('TOOL.NEXT',ENABLED,PROPERTY_FALSE);
        SET_ITEM_PROPERTY('TOOL.LAST',ENABLED,PROPERTY_FALSE);
  ELSIF :SYSTEM.CURSOR_RECORD <> 1 AND :SYSTEM.LAST_RECORD <> 'TRUE' THEN
        SET_ITEM_PROPERTY('TOOL.FIRST',ENABLED,PROPERTY_TRUE);
        SET_ITEM_PROPERTY('TOOL.PREVIOUS',ENABLED,PROPERTY_TRUE);
        SET_ITEM_PROPERTY('TOOL.NEXT',ENABLED,PROPERTY_TRUE);
        SET_ITEM_PROPERTY('TOOL.LAST',ENABLED,PROPERTY_TRUE);
  END IF;
ELSE
        SET_ITEM_PROPERTY('TOOL.FIRST',ENABLED,PROPERTY_FALSE);
        SET_ITEM_PROPERTY('TOOL.PREVIOUS',ENABLED,PROPERTY_FALSE);
        SET_ITEM_PROPERTY('TOOL.NEXT',ENABLED,PROPERTY_FALSE);
        SET_ITEM_PROPERTY('TOOL.LAST',ENABLED,PROPERTY_FALSE);
END IF;
END;
mc87Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Devinder Singh VirdiLead Oracle DBA TeamCommented:
ITs very simple code,
read line by line if you are not allowed to insert/update
Check if you have only one record then do something
Its its in first record but not the last record  do something
if its in last record but not in first  record then do something (that indicate there are many records)
If its somewhere in middle not first, not last do something.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
flow01Commented:
I would guess
  'TOOL.FIRST'
  'TOOL.PREVIOUS'
  'TOOL.NEXT'
  'TOOL.LAST'
are buttons looking like << < > >> to navigate between records and that are disabled/enabled (by your procedure) when such navigation is not possible/possible
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.