1
00:00:00,290 --> 00:00:04,080
Hired one in this literally all you're going to go ahead and you're going to actually go inside this

2
00:00:04,080 --> 00:00:10,890
class database handler class and here after that the curly brace of this on of great effort and before

3
00:00:10,890 --> 00:00:17,740
the end in curly brace of this class database handler Let's create armor for public voice.

4
00:00:17,760 --> 00:00:23,610
So the return type of this method is what right then is the name of this if it is actually at martial

5
00:00:23,610 --> 00:00:30,110
arts at martial arts I then put a pair of prentices this way if it is going to have a parameter of type.

6
00:00:30,110 --> 00:00:36,270
Martial arts martial art and the name is martial art object the name of this prime intellectually.

7
00:00:36,410 --> 00:00:40,770
So just open and close the Smurfit by using these curly braces.

8
00:00:40,810 --> 00:00:46,510
So now let's actually get our reference to the right level database which is a school like database

9
00:00:46,520 --> 00:00:46,800
right.

10
00:00:46,810 --> 00:00:53,950
So I can say it's cool like database and the name is going to be D-B or a school like database assignment

11
00:00:53,950 --> 00:00:54,770
operator.

12
00:00:54,820 --> 00:00:56,170
So let's call it database.

13
00:00:56,170 --> 00:01:02,410
Actually I think it's more meaningful and I can just type in get the right table database.

14
00:01:02,410 --> 00:01:07,800
So this if it gets right in a database is going to actually keep us still database.

15
00:01:07,990 --> 00:01:12,630
We actually wish we actually created inside these uncreate if it is going to give us that database.

16
00:01:12,850 --> 00:01:19,150
And this means that right database means that it is going to be writable which means that we can actually

17
00:01:19,630 --> 00:01:25,540
read some data from the database and we can also write some data under database.

18
00:01:25,680 --> 00:01:26,110
Right.

19
00:01:26,320 --> 00:01:32,330
So it is called Get right database because we want to actually add a martial art object to the database.

20
00:01:32,350 --> 00:01:36,120
It is very important that we get the right locatable database.

21
00:01:36,160 --> 00:01:43,500
So after this line of code I can say let's create a variable of type stream so strange and the name

22
00:01:43,500 --> 00:01:49,160
of this variable is at martial arts at martial arts as well.

23
00:01:49,250 --> 00:01:58,460
Comment assignment operator just put two coats here and inside the coats you're going to put the SU

24
00:01:58,460 --> 00:02:01,610
l.com and in order to add Aamar should not object to the database.

25
00:02:01,640 --> 00:02:10,220
So just typing here insert into space and then after this code just put a concatenation operator and

26
00:02:10,220 --> 00:02:17,000
then refer to the martial arts table and then here put a plus operator or a concatenation operator.

27
00:02:17,020 --> 00:02:22,150
Let's create a new line here so that you can see what's going on here exactly and then put two coats

28
00:02:22,150 --> 00:02:34,010
here and just put a space values and then put an Open in practices here null values non comma space.

29
00:02:34,210 --> 00:02:42,040
So what does this null refers to this null refers to the ID of the martial art object that we want to

30
00:02:42,040 --> 00:02:43,770
put inside this martial arts state.

31
00:02:43,790 --> 00:02:47,880
Well so why the past null here because I told you.

32
00:02:48,100 --> 00:02:50,460
Let me show you this as you come here.

33
00:02:50,560 --> 00:02:56,590
When we actually created this idea what we said that it is going to be the integer primary key or increment.

34
00:02:56,590 --> 00:03:00,970
So this means that it is going to be actually automatically incremented for us.

35
00:03:00,970 --> 00:03:03,580
The idea is going to be set for us automatically.

36
00:03:03,670 --> 00:03:10,240
And it is going to be incremented for us automatically So this means that we don't have to specify an

37
00:03:10,330 --> 00:03:15,470
ID specifically here for this for the values that that we want to actually put inside the stable.

38
00:03:15,670 --> 00:03:23,080
So we don't care what the idea is because it is going to be specified and auto incremented for us automatically.

39
00:03:23,170 --> 00:03:25,720
So Knol comma space.

40
00:03:25,840 --> 00:03:28,920
And then we need to put a single code here.

41
00:03:28,930 --> 00:03:29,780
OK.

42
00:03:29,920 --> 00:03:32,910
And then you can see these codes here right.

43
00:03:32,920 --> 00:03:35,130
So just put a plus operator here.

44
00:03:35,930 --> 00:03:39,020
Refer to this martial art object argument.

45
00:03:39,230 --> 00:03:45,980
So I can't say a martial art object that gets NE just get martial art name actually.

46
00:03:45,980 --> 00:03:46,530
Right.

47
00:03:46,550 --> 00:03:48,680
So let me create a new line here.

48
00:03:48,710 --> 00:03:55,470
So now let's put a plus operator or a concatenation operator and then put two coats.

49
00:03:55,490 --> 00:04:00,450
So this single code is going to be for this modular object that gets name right.

50
00:04:00,620 --> 00:04:04,450
We said insert into martial arts table values.

51
00:04:04,460 --> 00:04:06,980
So for the past non comma.

52
00:04:07,190 --> 00:04:14,630
But for the martial art name we put this single quote here and we put it this module that object that

53
00:04:14,630 --> 00:04:17,490
get Marshlack name here so it's going to give us the marshal up name.

54
00:04:17,690 --> 00:04:21,160
And then here we need to put the actually the closing quote.

55
00:04:21,230 --> 00:04:27,600
So let's put another single call here and then put a comma space.

56
00:04:27,830 --> 00:04:28,250
Right.

57
00:04:28,400 --> 00:04:34,640
So it is going to actually put this modular object name inside these inside single quotes inside single

58
00:04:34,640 --> 00:04:36,210
quotes that you can see here.

59
00:04:36,290 --> 00:04:36,760
Right.

60
00:04:36,770 --> 00:04:37,080
Come on.

61
00:04:37,090 --> 00:04:41,230
So now we need to put the second value inside our table.

62
00:04:41,270 --> 00:04:45,920
So the second value again must be inside the coats inside the single quotes actually.

63
00:04:45,920 --> 00:04:49,980
So comma let's actually put another single quote here.

64
00:04:50,330 --> 00:04:57,830
And after these these double quotes you just put another plus operator again l'affaire to this martial

65
00:04:57,830 --> 00:04:59,120
art object.

66
00:04:59,120 --> 00:05:04,230
Now we want to get to actually let me show you this as you will come on.

67
00:05:04,250 --> 00:05:06,800
First we have the ID key right.

68
00:05:06,920 --> 00:05:09,550
And then we have the name price color.

69
00:05:09,680 --> 00:05:17,410
So now I have to get the price shop so more of a martial art object that gets martial art price right.

70
00:05:17,410 --> 00:05:24,180
And then here let's put another concatenation operator let's put in your line here.

71
00:05:24,740 --> 00:05:31,550
So just put two coats here again this value of martial art price must be inside single quotes.

72
00:05:31,550 --> 00:05:37,380
So let's put another single quotes here inside these double quotes comma.

73
00:05:37,580 --> 00:05:44,570
Now we have these second value which is going to be art price inside single quotes and then we put a

74
00:05:44,570 --> 00:05:45,030
comma.

75
00:05:45,050 --> 00:05:48,880
Now it's time to add the first value here.

76
00:05:48,890 --> 00:05:56,860
So after these quotes I put a plus operator here so you can see that because we want to put the first

77
00:05:56,860 --> 00:05:58,050
value here.

78
00:05:58,090 --> 00:06:02,320
So after this come on here I need to put another single quote.

79
00:06:02,410 --> 00:06:05,370
Here let me put it here right.

80
00:06:05,390 --> 00:06:11,030
I just need to put this single quote here and then I just need to put this plus operator.

81
00:06:11,200 --> 00:06:15,340
Now all I can say marshal or object dot.

82
00:06:15,370 --> 00:06:20,080
So now that we have the price I can just refer to these Cullinan get Marshall at color.

83
00:06:20,440 --> 00:06:23,800
Plus let's put a new line here.

84
00:06:24,370 --> 00:06:25,930
Let's put two double quotes.

85
00:06:25,960 --> 00:06:29,980
So again this value should not color must be inside the single quotes.

86
00:06:29,980 --> 00:06:32,270
So let's put another single quote here.

87
00:06:32,400 --> 00:06:33,590
Come on.

88
00:06:33,970 --> 00:06:36,480
So now let's look at our comment here.

89
00:06:36,490 --> 00:06:42,720
Inside these uncreate method so we get the idea and we got the name price and color.

90
00:06:42,760 --> 00:06:43,270
Right.

91
00:06:43,300 --> 00:06:48,610
So we don't have any other values that we want to put inside this table so we don't have to put this

92
00:06:48,850 --> 00:06:49,750
comma here actually.

93
00:06:49,750 --> 00:06:53,410
You must not put this come on here after the end value.

94
00:06:53,410 --> 00:06:57,680
OK because these are the values that we wanted to put inside this table.

95
00:06:57,700 --> 00:07:00,220
So the first one is the ID which we don't care about.

96
00:07:00,220 --> 00:07:03,640
It is not the second value is this one martial arts name.

97
00:07:03,850 --> 00:07:07,500
So which we actually put it inside is inside single quotes.

98
00:07:07,510 --> 00:07:09,280
And the second value is this one.

99
00:07:09,340 --> 00:07:16,360
MARSHALL The price which we put it inside single quotes comma and the first value is felt and the final

100
00:07:16,360 --> 00:07:22,330
value actually is going to be martial art color which if you put it inside these single coats here.

101
00:07:22,330 --> 00:07:23,230
Right.

102
00:07:23,230 --> 00:07:28,160
So now after this this single coat let's put this end in Prentice's here.

103
00:07:28,510 --> 00:07:31,160
And then at the end of our statement let's put a semicolon here.

104
00:07:31,210 --> 00:07:31,870
Right.

105
00:07:32,200 --> 00:07:33,440
So let me explain again.

106
00:07:33,460 --> 00:07:38,970
We have this is google.com and inserts into martial arts table values.

107
00:07:39,010 --> 00:07:41,330
The first one which is the ID not comma.

108
00:07:41,470 --> 00:07:46,660
The second value which is going to be the name inside a single code smasher Oggi that get Marshlack

109
00:07:46,660 --> 00:07:47,370
name.

110
00:07:47,710 --> 00:07:49,950
Marshall OBD-II that get Marshall Price.

111
00:07:49,960 --> 00:07:53,210
And finally Marshall object that get martial art color.

112
00:07:53,470 --> 00:07:58,620
So not is that your school comment must be exactly the same as mine here.

113
00:07:58,690 --> 00:08:01,650
Notice these commas here OK.

114
00:08:01,750 --> 00:08:05,120
If you for example forget to put one of these commas here.

115
00:08:05,200 --> 00:08:08,440
Your app is going to crash when we want to access this method.

116
00:08:08,530 --> 00:08:09,740
It is very important.

117
00:08:09,760 --> 00:08:14,770
This is true l.com and is already complex I know but is what it is.

118
00:08:14,770 --> 00:08:17,470
You have to actually work on it.

119
00:08:17,470 --> 00:08:23,180
You have to make it second nature to in order to work with the tool comments.

120
00:08:23,230 --> 00:08:24,370
This is su lite.

121
00:08:24,550 --> 00:08:29,750
So now after this value but after this at martial arts school come on here.

122
00:08:29,920 --> 00:08:34,280
I cant say database that execute.

123
00:08:34,400 --> 00:08:37,200
SAGAL So I just need to pass the SU l comment.

124
00:08:37,270 --> 00:08:40,870
So at martial art as you comment.

125
00:08:41,080 --> 00:08:45,520
And finally we must close the database so databased that close.

126
00:08:45,520 --> 00:08:46,180
Thats it.

127
00:08:46,180 --> 00:08:49,100
So now its time to add the final.

128
00:08:49,170 --> 00:08:55,240
I actually intend to add another method which is going to be called the delete marshal or so after the

129
00:08:55,240 --> 00:08:59,970
ending curly brace of the Smurfette and before the end equilibrate of this class lets add another method

130
00:08:59,980 --> 00:09:00,550
here.

