Hired one in this literally all you're going to go ahead and you're going to actually go inside this
class database handler class and here after that the curly brace of this on of great effort and before
the end in curly brace of this class database handler Let's create armor for public voice.
So the return type of this method is what right then is the name of this if it is actually at martial
arts at martial arts I then put a pair of prentices this way if it is going to have a parameter of type.
Martial arts martial art and the name is martial art object the name of this prime intellectually.
So just open and close the Smurfit by using these curly braces.
So now let's actually get our reference to the right level database which is a school like database
right.
So I can say it's cool like database and the name is going to be D-B or a school like database assignment
operator.
So let's call it database.
Actually I think it's more meaningful and I can just type in get the right table database.
So this if it gets right in a database is going to actually keep us still database.
We actually wish we actually created inside these uncreate if it is going to give us that database.
And this means that right database means that it is going to be writable which means that we can actually
read some data from the database and we can also write some data under database.
Right.
So it is called Get right database because we want to actually add a martial art object to the database.
It is very important that we get the right locatable database.
So after this line of code I can say let's create a variable of type stream so strange and the name
of this variable is at martial arts at martial arts as well.
Comment assignment operator just put two coats here and inside the coats you're going to put the SU
l.com and in order to add Aamar should not object to the database.
So just typing here insert into space and then after this code just put a concatenation operator and
then refer to the martial arts table and then here put a plus operator or a concatenation operator.
Let's create a new line here so that you can see what's going on here exactly and then put two coats
here and just put a space values and then put an Open in practices here null values non comma space.
So what does this null refers to this null refers to the ID of the martial art object that we want to
put inside this martial arts state.
Well so why the past null here because I told you.
Let me show you this as you come here.
When we actually created this idea what we said that it is going to be the integer primary key or increment.
So this means that it is going to be actually automatically incremented for us.
The idea is going to be set for us automatically.
And it is going to be incremented for us automatically So this means that we don't have to specify an
ID specifically here for this for the values that that we want to actually put inside the stable.
So we don't care what the idea is because it is going to be specified and auto incremented for us automatically.
So Knol comma space.
And then we need to put a single code here.
OK.
And then you can see these codes here right.
So just put a plus operator here.
Refer to this martial art object argument.
So I can't say a martial art object that gets NE just get martial art name actually.
Right.
So let me create a new line here.
So now let's put a plus operator or a concatenation operator and then put two coats.
So this single code is going to be for this modular object that gets name right.
We said insert into martial arts table values.
So for the past non comma.
But for the martial art name we put this single quote here and we put it this module that object that
get Marshlack name here so it's going to give us the marshal up name.
And then here we need to put the actually the closing quote.
So let's put another single call here and then put a comma space.
Right.
So it is going to actually put this modular object name inside these inside single quotes inside single
quotes that you can see here.
Right.
Come on.
So now we need to put the second value inside our table.
So the second value again must be inside the coats inside the single quotes actually.
So comma let's actually put another single quote here.
And after these these double quotes you just put another plus operator again l'affaire to this martial
art object.
Now we want to get to actually let me show you this as you will come on.
First we have the ID key right.
And then we have the name price color.
So now I have to get the price shop so more of a martial art object that gets martial art price right.
And then here let's put another concatenation operator let's put in your line here.
So just put two coats here again this value of martial art price must be inside single quotes.
So let's put another single quotes here inside these double quotes comma.
Now we have these second value which is going to be art price inside single quotes and then we put a
comma.
Now it's time to add the first value here.
So after these quotes I put a plus operator here so you can see that because we want to put the first
value here.
So after this come on here I need to put another single quote.
Here let me put it here right.
I just need to put this single quote here and then I just need to put this plus operator.
Now all I can say marshal or object dot.
So now that we have the price I can just refer to these Cullinan get Marshall at color.
Plus let's put a new line here.
Let's put two double quotes.
So again this value should not color must be inside the single quotes.
So let's put another single quote here.
Come on.
So now let's look at our comment here.
Inside these uncreate method so we get the idea and we got the name price and color.
Right.
So we don't have any other values that we want to put inside this table so we don't have to put this
comma here actually.
You must not put this come on here after the end value.
OK because these are the values that we wanted to put inside this table.
So the first one is the ID which we don't care about.
It is not the second value is this one martial arts name.
So which we actually put it inside is inside single quotes.
And the second value is this one.
MARSHALL The price which we put it inside single quotes comma and the first value is felt and the final
value actually is going to be martial art color which if you put it inside these single coats here.
Right.
So now after this this single coat let's put this end in Prentice's here.
And then at the end of our statement let's put a semicolon here.
Right.
So let me explain again.
We have this is google.com and inserts into martial arts table values.
The first one which is the ID not comma.
The second value which is going to be the name inside a single code smasher Oggi that get Marshlack
name.
Marshall OBD-II that get Marshall Price.
And finally Marshall object that get martial art color.
So not is that your school comment must be exactly the same as mine here.
Notice these commas here OK.
If you for example forget to put one of these commas here.
Your app is going to crash when we want to access this method.
It is very important.
This is true l.com and is already complex I know but is what it is.
You have to actually work on it.
You have to make it second nature to in order to work with the tool comments.
This is su lite.
So now after this value but after this at martial arts school come on here.
I cant say database that execute.
SAGAL So I just need to pass the SU l comment.
So at martial art as you comment.
And finally we must close the database so databased that close.
Thats it.
So now its time to add the final.
I actually intend to add another method which is going to be called the delete marshal or so after the
ending curly brace of the Smurfette and before the end equilibrate of this class lets add another method
here.