1

00:00:00,990  -->  00:00:08,520
So far we created entities managers and feel constant exporting classes not its Creator didn't need

2

00:00:08,520  -->  00:00:10,200
it for our application.

3

00:00:10,260  -->  00:00:15,150
That is the database itself will create a class called data store.

4

00:00:15,150  -->  00:00:22,090
Now in the resources section I'm adding 4 x files called user book movie and web link.

5

00:00:22,500  -->  00:00:26,730
These files include the raw data needed for our application.

6

00:00:26,940  -->  00:00:33,960
In this first version we will simply copy those values on hard code them in the data stored class laded

7

00:00:34,000  -->  00:00:37,280
we will extend the project to direct read from those files.

8

00:00:37,530  -->  00:00:40,810
But for now we'll be using the hardcoded values.

9

00:00:41,220  -->  00:00:42,830
Let me just show you those files.

10

00:00:43,160  -->  00:00:47,520
And for the user to find I will show you how to created.

11

00:00:47,550  -->  00:00:50,530
So this is the book file.

12

00:00:50,610  -->  00:00:51,530
Here it is.

13

00:00:51,900  -->  00:00:55,290
And these are this is the raw data and the.

14

00:00:55,380  -->  00:01:01,780
So this is one row andere within each and all the values are pops up record tab delimited.

15

00:01:01,800  -->  00:01:04,220
So this is the ID field this is the title of the book.

16

00:01:04,230  -->  00:01:09,040
This is the year when it was published and this is the publisher name.

17

00:01:09,150  -->  00:01:12,390
And here this is the author's name.

18

00:01:12,390  -->  00:01:15,940
Sometimes there can be multiple authors like in this case here.

19

00:01:16,530  -->  00:01:19,740
And this is the genré and this is the rating.

20

00:01:19,740  -->  00:01:22,310
And let's not worry about this final flip here.

21

00:01:22,410  -->  00:01:26,140
It is related to a kid friendly feature.

22

00:01:26,340  -->  00:01:35,370
And similarly we a book or movie free movie file here and this is the idea once again and the name of

23

00:01:35,370  -->  00:01:45,840
the title of the movie year when it was released cast and director John Gray I am repudiating And once

24

00:01:45,840  -->  00:01:47,350
again you can ignore this.

25

00:01:47,880  -->  00:01:52,260
And similarly we have the book the weblink here.

26

00:01:52,800  -->  00:01:57,480
And it has some for use here the idea and there is a you are all here.

27

00:01:57,840  -->  00:02:00,600
And here we have the host information

28

00:02:03,630  -->  00:02:07,070
which is nothing but the just the domain name off that you are.

29

00:02:07,350  -->  00:02:09,400
And this is the Pitre here.

30

00:02:10,020  -->  00:02:11,610
So those are the three files.

31

00:02:11,640  -->  00:02:15,670
So let's just go ahead and create the user file.

32

00:02:15,720  -->  00:02:23,730
So just right click on which is a project say name a new and click on this untidy text file because

33

00:02:23,730  -->  00:02:25,560
we want to create a text file.

34

00:02:25,570  -->  00:02:28,510
Let me just copy those values here for the user fine.

35

00:02:28,790  -->  00:02:35,910
And let's just head control as and it is asking us to set up the page folder since we are dealing with

36

00:02:35,910  -->  00:02:45,420
the project we just really don't know just click that and let's just call it user.

37

00:02:46,080  -->  00:02:48,440
So that's the user ex-fighter.

38

00:02:48,990  -->  00:02:57,870
And if we go here in on our desk so within JRD within really our project you can see that all the forefronts

39

00:02:57,900  -->  00:03:02,170
God created had book we use and web link.

40

00:03:04,080  -->  00:03:09,240
So those are the four files and you can find them in the resource section.

41

00:03:09,240  -->  00:03:16,090
So let's just go ahead now and create the class the data store class and camarade semantics word or

42

00:03:16,090  -->  00:03:19,920
three here which is like the root of the package structure

43

00:03:22,470  -->  00:03:26,090
.

44

00:03:26,240  -->  00:03:36,730
Class called it a store in the package sig com.

45

00:03:36,880  -->  00:03:43,890
So in a calm semantics word through Leo and that's it.

46

00:03:43,980  -->  00:03:46,180
So we have data store.

47

00:03:46,290  -->  00:03:48,370
Now within this package.

48

00:03:48,390  -->  00:03:52,700
So first thing is let's create the data structures needed to hold the data.

49

00:03:53,280  -->  00:03:59,950
So let's create a data structure to hold just the users information.

50

00:04:00,540  -->  00:04:02,400
Static.

51

00:04:02,720  -->  00:04:07,070
So user information can be stored in a user array.

52

00:04:08,610  -->  00:04:11,680
You can have five users initially.

53

00:04:12,480  -->  00:04:15,870
That's just import.

54

00:04:16,620  -->  00:04:20,710
Next let's create the data structure to hold.

55

00:04:21,090  -->  00:04:27,390
Bookmark information just the bookmarks so it needs to be a two dimensional array because we have different

56

00:04:27,390  -->  00:04:31,310
kinds of bookmarks so we need one dimension for that type.

57

00:04:31,350  -->  00:04:33,510
And the other for the actual bookmarks

58

00:04:38,160  -->  00:04:41,690
Coretta's bookmarks.

59

00:04:42,870  -->  00:04:49,270
So we have three types and each type can have five bookmarks.

60

00:04:49,860  -->  00:04:55,590
And let's also create one to hold the user bookmarks.

61

00:04:55,590  -->  00:05:00,840
So whenever a user bookmarks a particular bookmark so it needs to be stored in some data structure let's

62

00:05:00,840  -->  00:05:04,660
create one for that.

63

00:05:05,400  -->  00:05:09,230
If you remember we hired this entity called user bookmark.

64

00:05:09,240  -->  00:05:16,360
So that's also in court here in this bookmark here and it's Connard as user bookmarks.

65

00:05:21,430  -->  00:05:27,780
Now there are five users and each user can bookmark five of them.

66

00:05:27,790  -->  00:05:32,430
So that's the Lamech we how that's something for this.

67

00:05:33,910  -->  00:05:37,730
So those are the three data structures that we have now.

68

00:05:37,930  -->  00:05:40,920
It's not very good to hardcore these values here.

69

00:05:41,290  -->  00:05:45,330
So let's use that straight to our students to be factor of this.

70

00:05:45,690  -->  00:05:59,800
So let's go here and it's just right quick Reflektor and let's say extract constant and we can call

71

00:05:59,800  -->  00:06:09,310
it as Dr. underscore user underskirt can't we do the same thing for here.

72

00:06:09,310  -->  00:06:14,330
For sure we extract constant.

73

00:06:15,060  -->  00:06:17,830
So it's the type so let's call it as bookmarks.

74

00:06:17,940  -->  00:06:19,190
I don't

75

00:06:23,230  -->  00:06:28,860
know this says the code the limits within each type.

76

00:06:28,870  -->  00:06:39,280
So let's also rename this let's call it a bookmark call and type.

77

00:06:40,840  -->  00:06:47,810
So that's the bookmark call and prototype.

78

00:06:48,120  -->  00:06:51,230
So this is simply the user count.

79

00:06:51,910  -->  00:06:53,050
And this is

80

00:06:57,460  -->  00:07:05,280
the limit on the number of bookmarks that a user can bookmark so that Scollard does user bookmarklet

81

00:07:06,440  -->  00:07:08,560
.

82

00:07:10,120  -->  00:07:11,610
OK.

83

00:07:12,340  -->  00:07:15,740
So those are the ones that we have next.

84

00:07:15,790  -->  00:07:18,010
That's right Fuma that's now.

85

00:07:18,940  -->  00:07:25,250
That's right a method called load data which is responsible for loading the data.

86

00:07:25,360  -->  00:07:29,180
So let's make it a public topic.

87

00:07:29,400  -->  00:07:31,740
LLOYD

88

00:07:36,630  -->  00:07:40,250
So let's have separate methods to load users babblings.

89

00:07:40,260  -->  00:07:41,780
Movies and books.

90

00:07:41,830  -->  00:07:46,930
So first method let's call it does more users.

91

00:07:47,050  -->  00:07:50,310
Now let's just make this as a private matter.

92

00:07:51,040  -->  00:07:56,760
So initially we will call this method loading dock to load the data on dockworker internally invoke

93

00:07:56,760  -->  00:08:01,780
all the private methods to load all the data for needed for the application

94

00:08:01,770  -->  00:08:09,530
.

95

00:08:10,210  -->  00:08:19,450
So the data that has to go into this idea needs to be stored into this array so fosters let's say users

96

00:08:20,290  -->  00:08:27,600
who are they use 0 0 and let's get the values from or file the Ostrow.

97

00:08:27,810  -->  00:08:29,990
So these are the values.

98

00:08:31,050  -->  00:08:32,850
So these are all DAPs operator.

99

00:08:32,860  -->  00:08:35,870
Let's just make it camos operator.

100

00:08:36,700  -->  00:08:39,910
So the way we would do it is we would invoke.

101

00:08:40,750  -->  00:08:47,690
If you look at the managers so we're going to call this method create user end user manager.

102

00:08:47,750  -->  00:08:50,830
Again we are going to pass all those values from there.

103

00:08:50,860  -->  00:08:57,160
So let's call it as a user manager.

104

00:08:57,370  -->  00:09:06,120
Now let's get to get an instance method which returns a singleton is it not.

105

00:09:06,160  -->  00:09:07,670
So it's just.

106

00:09:07,680  -->  00:09:11,080
HARLOW This auto generated content.

107

00:09:11,130  -->  00:09:14,440
So Id Dexters email

108

00:09:20,880  -->  00:09:23,800
first is the password.

109

00:09:23,810  -->  00:09:28,720
Next this is John as the host name.

110

00:09:28,920  -->  00:09:35,920
This is the last name we just have a single character here or last name.

111

00:09:35,910  -->  00:09:40,090
Now this is gender or gender

112

00:09:43,750  -->  00:09:45,730
it's your

113

00:09:48,390  -->  00:09:50,190
gender is actually supposed to be.

114

00:09:50,220  -->  00:09:54,270
And so let's just go here and for male.

115

00:09:54,690  -->  00:10:01,090
So if you look at gender here one stands for male it is zero.

116

00:10:01,090  -->  00:10:02,800
So let's just go ahead and

117

00:10:05,910  -->  00:10:14,820
let's just say gender dark mean so let's make use of the constant exploding glass here.

118

00:10:15,310  -->  00:10:20,000
So that's how re-initialize we passed that.

119

00:10:20,920  -->  00:10:23,190
The last one is the user which is a user type.

120

00:10:23,190  -->  00:10:24,700
So if you go into user type.

121

00:10:25,030  -->  00:10:26,210
So here we have user.

122

00:10:26,230  -->  00:10:28,690
So let's just say user Ibaraki user

123

00:10:37,330  -->  00:10:39,690
so that's the first rule.

124

00:10:39,820  -->  00:10:46,620
So let me just take this offline and create the rest of the rules popular the rest of the rules and

125

00:10:46,630  -->  00:10:47,710
then I will.

126

00:10:47,710  -->  00:10:52,570
And then I will show you the entire method.

127

00:10:54,080  -->  00:10:54,450
OK.

128

00:10:54,460  -->  00:10:56,220
Here are the rest of the rules.

129

00:10:56,440  -->  00:10:58,700
So we have five users here.

130

00:10:59,050  -->  00:11:05,130
And just like the first rule we have we are populating the rest of the rules.

131

00:11:05,140  -->  00:11:11,330
Also That's about the users on a new motor Kollek Lord doublings has been added.

132

00:11:11,720  -->  00:11:16,960
I'm actually so that's popular does.

133

00:11:17,050  -->  00:11:21,970
So before this goes into the bookmarks data structure.

134

00:11:22,190  -->  00:11:24,880
So let's see.

135

00:11:25,720  -->  00:11:27,330
So it's a two dimensional array.

136

00:11:27,340  -->  00:11:33,250
So in the first dimension we are going to add on only babblings.

137

00:11:33,820  -->  00:11:37,570
So within the first dimension we are going to add the first bookmark.

138

00:11:37,630  -->  00:11:39,400
OK so that's the first bookmark.

139

00:11:39,700  -->  00:11:45,440
And let's use the bookmark manager.

140

00:11:45,530  -->  00:11:48,130
You get instance mattered.

141

00:11:48,910  -->  00:11:52,730
And we already have this method called create weblink.

142

00:11:53,230  -->  00:11:57,640
Now we just need to copy the values from our wabbling file.

143

00:11:57,730  -->  00:12:00,700
So let me disclose this user right here.

144

00:12:00,800  -->  00:12:05,900
You notice we don't need that last column for now.

145

00:12:05,920  -->  00:12:07,220
So let's just name it

146

00:12:10,490  -->  00:12:13,600
.

147

00:12:14,010  -->  00:12:15,760
And this is the second argument.

148

00:12:15,880  -->  00:12:16,550
It's a string

149

00:12:17,840  -->  00:12:21,390
.

150

00:12:23,240  -->  00:12:26,930
Third is the website you are ill.

151

00:12:28,510  -->  00:12:29,670
And then there's string

152

00:12:32,670  -->  00:12:37,410
Portlands the host information.

153

00:12:37,510  -->  00:12:40,280
So let me just go ahead.

154

00:12:40,690  -->  00:12:45,190
Offline and come back and show you the rest of the rows.

155

00:12:46,990  -->  00:12:49,190
OK here are the rest of the rules.

156

00:12:49,600  -->  00:12:55,000
Earlier there was a minor mistake that we made the index we had it as a run which is supposed to be

157

00:12:55,000  -->  00:12:55,420
zero.

158

00:12:55,450  -->  00:12:56,890
So that's corrected.

159

00:12:56,950  -->  00:13:02,380
So we have all the babblings here in 0 8 row.

160

00:13:02,550  -->  00:13:07,910
And so these are the column values and here we how all the blanks.

161

00:13:08,170  -->  00:13:10,630
OK let's also call this to be consistent.

162

00:13:10,630  -->  00:13:17,870
Let's make this L gap l ramblings and it's just do the same here and there.

163

00:13:17,890  -->  00:13:23,710
So that's what blanks the next let's do it for movies no movies

164

00:13:26,410  -->  00:13:29,670
good books.

165

00:13:30,930  -->  00:13:34,140
So I mean just highlighted this create matter

166

00:13:39,150  -->  00:13:44,230
create it to us.

167

00:13:44,680  -->  00:13:47,940
So let's just go ahead and finish this thing first.

168

00:13:48,070  -->  00:13:51,960
Let me just copy here.

169

00:13:52,240  -->  00:13:56,110
That's how users first mumblings next.

170

00:13:57,070  -->  00:13:59,960
And movies here.

171

00:14:00,610  -->  00:14:05,770
So that's bookmarks.

172

00:14:05,980  -->  00:14:10,280
So it's a new dimension in this dimension with how we won the first one.

173

00:14:10,310  -->  00:14:13,340
As So the zero it raw as far ramblings.

174

00:14:13,360  -->  00:14:17,390
So this one for the first one is for movies.

175

00:14:17,440  -->  00:14:20,450
Next when we have Brooksville hybrids do.

176

00:14:20,800  -->  00:14:26,790
Now the zeroth element within this dimension.

177

00:14:26,820  -->  00:14:27,540
Copy this

178

00:14:30,360  -->  00:14:32,490
.

179

00:14:33,280  -->  00:14:34,650
Let's create a movie.

180

00:14:34,930  -->  00:14:36,340
That's what we have.

181

00:14:37,260  -->  00:14:41,420
And let's get the values from first here.

182

00:14:42,070  -->  00:14:45,000
Let's ignore the last one here and it's just copy all of this

183

00:14:50,410  -->  00:14:53,210
the

184

00:14:57,540  -->  00:15:02,310
Citizen Kane and rustic movie.

185

00:15:04,050  -->  00:15:06,610
And I guess this is cast here.

186

00:15:06,880  -->  00:15:11,480
So it's a string array because there are cast has multiple values.

187

00:15:11,680  -->  00:15:13,660
So let's do this new

188

00:15:25,900  -->  00:15:29,200
next is directors directors can also be multiple directors.

189

00:15:29,410  -->  00:15:32,270
So that's how I ended Stringer here

190

00:15:32,270  -->  00:15:38,940
.

191

00:15:41,080  -->  00:15:44,170
Next is genré.

192

00:15:45,100  -->  00:15:47,290
We don't really let's make use of that.

193

00:15:48,030  -->  00:15:49,420
And it's a classics

194

00:15:51,890  -->  00:15:56,560
Lassman is the raping the I am the in.

195

00:15:56,680  -->  00:16:02,290
So let me just go ahead and finish up.

196

00:16:02,450  -->  00:16:04,280
Seems like you're missing something here.

197

00:16:04,410  -->  00:16:08,570
So let's just go to Mark manager.

198

00:16:08,980  -->  00:16:10,070
I do.

199

00:16:10,450  -->  00:16:17,500
Sorry it's here and it's Id need to that profile of you are.

200

00:16:17,530  -->  00:16:18,360
OK.

201

00:16:18,520  -->  00:16:25,670
So let's put an M.D. over there because we don't have a profile of you on here.

202

00:16:26,920  -->  00:16:27,550
OK.

203

00:16:27,550  -->  00:16:28,300
All we are good.

204

00:16:28,360  -->  00:16:35,080
So let me just go ahead and finish this method and I will also offer up the lord books matter and then

205

00:16:35,080  -->  00:16:38,500
we can review the methods.

206

00:16:40,560  -->  00:16:40,880
OK.

207

00:16:40,900  -->  00:16:43,690
So the rest of the data has also been populated.

208

00:16:43,750  -->  00:16:50,410
So within the last movies we have the rest of the Read here for all the different columns.

209

00:16:51,010  -->  00:16:55,200
So this is the leader and the same thing has been done for books.

210

00:16:55,240  -->  00:16:57,990
Sort of goes into the second row it's a new type.

211

00:16:58,270  -->  00:17:08,750
And the data has been copied from the book filed here or here.

212

00:17:08,770  -->  00:17:10,930
So that is here is the order list.

213

00:17:10,930  -->  00:17:16,910
So it is a string theory and be made use of those constant exporting class book genré in order to set

214

00:17:17,020  -->  00:17:21,370
up the genré information.

215

00:17:21,400  -->  00:17:22,860
So this is notebook's.

216

00:17:22,960  -->  00:17:27,260
So really with this we have all the data that's needed.

217

00:17:27,340  -->  00:17:29,610
Now let's also ired couple of things.

218

00:17:29,620  -->  00:17:35,410
Let's say we want to get hurt for this so that it can be invoked from some other process.

219

00:17:35,620  -->  00:17:37,690
So that's how together for users and bookmarks.

220

00:17:37,720  -->  00:17:42,670
So this is going to source ironer said Jondrette getters and setters.

221

00:17:43,120  -->  00:17:48,280
Let's just how only get so let's say let's do that.

222

00:17:49,450  -->  00:17:51,450
And it's created here is just fine.

223

00:17:51,590  -->  00:17:56,040
Let's also do the same thing for bookmarks.

224

00:17:57,550  -->  00:18:01,690
So that will written all the bookmarks so that's how to get her for that

225

00:18:01,690  -->  00:18:08,800
.

226

00:18:08,800  -->  00:18:12,560
So those are on the bookmarks now.

227

00:18:12,670  -->  00:18:14,360
So that's there they just don't glass.

228

00:18:14,360  -->  00:18:17,300
So we have some data structures here for holding the data.

229

00:18:17,740  -->  00:18:26,510
And in order to populate the data we created this last date which is a public matter and it has it.

230

00:18:26,610  -->  00:18:33,910
It didn't work for private methods for loading day for users of eyeblink movies and books and we also

231

00:18:33,910  -->  00:18:37,430
have the guidelines for users and bookmarks.

232

00:18:37,480  -->  00:18:40,310
So that started us store class for now.
