hello everyone we will continue that topic persistence class and in the previous video we gave some name to the persistence class which is starting with cl after that we clicked on to the button if you remember we clicked on to go to persistence representation we give the nip of our order header table and all Columns of that data is stable is appearing here now we are creating a persistence class for this particular table for this particular order Adder table now we will move these columns to the upper portion upper portion how we will move just
simply select and we have a button here okay just to move now go for second go for third go for fourth go forth so we all columns we moved to the upper portion of that table and have you seen order number is the primary key of the table order number is the primary key of the table it is clearly written it is key active now we will go for Save we are saving now we will go for back button and once we will go for back button the most important conclusion and which is very very
useful when we will use in the coding now whenever you are creating a persistence class have you seen previously we have only these five methods available which came from this particular interface now have you seen we got this additional methods every method is instance type and every method is public and have you seen these are our Columns of the table what are our Columns of the table order number then we have what order date payment mode total amount currency so four of all these columns we got these methods and simple word if I will say
for each and every column for every column of that table sap is giving character and stature methods these all are your character and Setter methods now the most important Point here have you seen for order number for order number we have only get method there is no set method for other columns we have getter and sector both just see we have get method for currency we have set method for currency we have get method for order date we have set method for order date similarly for payment mode get set similarly for total amount get set
but for that order number order number we have only only get method and the reason behind is order number is the primary key of that table just simple understanding you can only only get the primary key how you can set the primary key the first of suppose simple understanding okay I have a employee ID in the organization for throughout my career my employee ID will never never change I can always or other people can always get my details through employee ID but we can never never set the employee ID we can change other thing yes
I can change my first name last name whatever I I want to add but employee ID we can never never change same thing is here yes order number once created you cannot change the order number yes order number is the primary key of that table so for order number we have only only cat method for other things we have getter and sector both most important point from the interview perspective yes whenever we are creating persistence class sap generates getter and Saturn methods for the primary key fields for the key Fields only scatter method for the
non-primary key builds getter and Setter both methods will generate now whenever I will activate the class sap will generate two helper classes again important Point whenever you are creating persistence class as simply generate to helper classes automatically we will not create these classes as SNP automatically create these two helper classes and what are those two helper classes those are C A and C D C A is called as actor class or ancient class and CB is called as base class we will not create SMP automatically generate and many time in the interviewer interview ask the
question what are the co helper classes for persistence class Co helper classes so go helper classes are C A and C B C A is your actor class or agent class CB is your base class So Co helper means two helper classes now I will simply simply activate whenever I will activate sap will generate two helper classes I will activate and I will get a pop-up also do you want to activate the class actor just see it is asking should the class actor should also be activated yes we will activate so our active class and
Base Class automatically generated now how we can check the name of those actor class and base class just simply simply copy the name and rather than CL use the word c a rather than CL use the word CV suppose if I will go to SC 24 now I will use the word c a z c a underscore order underscore details order address sorry I give orders and and have you seen I have not created this class it's automatically created this is your agent class or actor class and similarly we have Base Class also zcb order
hidden base agent for base agent so these two helper classes automatically generated and we are not creating these classes when we see a and another with C so what is the summary of the video in this video we after giving the name of that table after giving the name of the table we simply move the columns to the upper portion of the table we saved once we saved the most important part arrived that SMP generated the getter and Saturn method for The Columns of the table for the primary columns only getter for the non-primary column
get both whenever you are creating or whenever you are creating a persistence class whenever I activated two helper classes automatically generated one with CA and another with CB CA is called as a actor class or agent class C B is called as base class and they are called as Co helper classes now in the next video we will use these classes in our program because ultimately we need to develop a program with the hand that program we will use these classes to perform that database operation insert update and delete so that's it in this video
thank you