Generating setters and getters for package variables

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

Building applications with Apex I am coding in PL/SQL a lot. I find myself typing in similar patterns many times. And I do not like it. Being an IT man I look for ways to automate it.

 One of the things I regularly have to create is getters and setters for package variables. I start out with a package and define a package variable. Then after a while it turns out I need this value in a SQL statement. So I need a getter. It is more elegant to use getters and setters anyway.

But my point is I always end up typing more or less the same code and it slows me down. So I created another generator. You can find it at:

http://www.speech2form.com/ords/f?p=OPFG:CREATE_GETSET

It is very simple and fast to use. Just type (or paste 😉 ) the name of the variable, chose the datatype and hit the generate button. Then hit Copy to Clipboard and paste the result in your PL/SQL package specification and body code respectively.

Extra parameters:
– Internal variable name: use it if the internal variable name differs from the one you want to expose in the interface. The case of this name is not affected by the Case switch.
– Case of keywords: you can have your code with uppercase keywords

Happy Apexing

Source Article from http://dickdral.blogspot.com/2017/01/generating-setters-and-getters-for.html

Leave a Reply