Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
My notepad
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
9731301
My notepad
Commits
fe5d7417
Commit
fe5d7417
authored
Nov 08, 2020
by
9731301
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add PicsEntity to addPics url in database
parent
1e1d10e3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
62 additions
and
2 deletions
+62
-2
DateNoreDAO.java
...mynotepad/MenuFeatures/AllNotes/DataBase/DateNoreDAO.java
+2
-2
NoteDataBase.java
...ynotepad/MenuFeatures/AllNotes/DataBase/NoteDataBase.java
+1
-0
PicsDao.java
...ple/mynotepad/MenuFeatures/AllNotes/DataBase/PicsDao.java
+25
-0
PicsEntity.java
.../mynotepad/MenuFeatures/AllNotes/DataBase/PicsEntity.java
+34
-0
No files found.
app/src/main/java/com/example/mynotepad/MenuFeatures/AllNotes/DataBase/DateNoreDAO.java
View file @
fe5d7417
...
@@ -19,12 +19,12 @@ public interface DateNoreDAO {
...
@@ -19,12 +19,12 @@ public interface DateNoreDAO {
@Insert
@Insert
void
insertDateNote
(
DateEntity
dateEntity
);
void
insertDateNote
(
DateEntity
dateEntity
);
//delete data in database
@Delete
@Delete
void
deleteDateNote
(
DateEntity
dateEntity
);
void
deleteDateNote
(
DateEntity
dateEntity
);
@Update
void
updateDateNote
(
DateEntity
dateEntity
);
//update data
@Query
(
"UPDATE DateEntity SET date = :date , description = :description ,archived = :isarchived Where ID = :id"
)
@Query
(
"UPDATE DateEntity SET date = :date , description = :description ,archived = :isarchived Where ID = :id"
)
void
updateDate
(
String
date
,
String
description
,
boolean
isarchived
,
int
id
);
void
updateDate
(
String
date
,
String
description
,
boolean
isarchived
,
int
id
);
}
}
app/src/main/java/com/example/mynotepad/MenuFeatures/AllNotes/DataBase/NoteDataBase.java
View file @
fe5d7417
...
@@ -8,4 +8,5 @@ public abstract class NoteDataBase extends RoomDatabase {
...
@@ -8,4 +8,5 @@ public abstract class NoteDataBase extends RoomDatabase {
public
abstract
NoteDAO
noteDao
();
public
abstract
NoteDAO
noteDao
();
public
abstract
DateNoreDAO
dateNoreDAO
();
public
abstract
DateNoreDAO
dateNoreDAO
();
public
abstract
PicsDao
picsDao
();
}
}
app/src/main/java/com/example/mynotepad/MenuFeatures/AllNotes/DataBase/PicsDao.java
0 → 100644
View file @
fe5d7417
package
com
.
example
.
mynotepad
.
MenuFeatures
.
AllNotes
.
DataBase
;
import
androidx.room.Delete
;
import
androidx.room.Insert
;
import
androidx.room.Query
;
import
java.util.List
;
public
interface
PicsDao
{
// a method list type
@Query
(
"SELECT * FROM PicsEntity"
)
List
<
DateEntity
>
getAllPicsNotes
();
//insert data in database
@Insert
void
insertPicsNote
(
PicsEntity
picsEntity
);
//delete data in database
@Delete
void
deletePicsNote
(
DateEntity
dateEntity
);
//update data
@Query
(
"UPDATE PicsEntity SET txt = :txt , url = :url "
)
void
updateDate
(
String
txt
,
String
url
);
}
app/src/main/java/com/example/mynotepad/MenuFeatures/AllNotes/DataBase/PicsEntity.java
0 → 100644
View file @
fe5d7417
package
com
.
example
.
mynotepad
.
MenuFeatures
.
AllNotes
.
DataBase
;
import
androidx.room.ColumnInfo
;
import
androidx.room.Entity
;
@Entity
public
class
PicsEntity
{
@ColumnInfo
(
name
=
"url"
)
String
url
;
@ColumnInfo
(
name
=
"txt"
)
String
txt
;
public
PicsEntity
(
String
url
,
String
txt
)
{
this
.
url
=
url
;
this
.
txt
=
txt
;
}
public
String
getUrl
()
{
return
url
;
}
public
void
setUrl
(
String
url
)
{
this
.
url
=
url
;
}
public
String
getTxt
()
{
return
txt
;
}
public
void
setTxt
(
String
txt
)
{
this
.
txt
=
txt
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment