Skip to content

Commit 8e2c90a

Browse files
committed
useless annotations removed.
1 parent 68bd8ed commit 8e2c90a

File tree

6 files changed

+33
-50
lines changed

6 files changed

+33
-50
lines changed

library/src/main/java/io/syslogic/github/api/room/LicensesDao.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import android.database.Cursor;
44

5-
import androidx.annotation.NonNull;
65
import androidx.room.Dao;
76
import androidx.room.Delete;
87
import androidx.room.Insert;
@@ -22,28 +21,25 @@
2221
@Dao
2322
public interface LicensesDao {
2423

25-
@NonNull
2624
@Query("SELECT * FROM " + Constants.TABLE_LICENSES)
2725
List<License> getItems();
2826

2927
/* For ContentProvider */
30-
@NonNull
3128
@Query("SELECT * FROM " + Constants.TABLE_LICENSES)
3229
Cursor selectAll();
3330

34-
@NonNull
3531
@Insert()
36-
Long insert(@NonNull License item);
32+
Long insert(License item);
3733

3834
@Update()
39-
void update(@NonNull License item);
35+
void update(License item);
4036

4137
@Delete()
42-
void delete(@NonNull License item);
38+
void delete(License item);
4339

4440
@SuppressWarnings("unused")
4541
@Query("DELETE FROM " + Constants.TABLE_LICENSES + " WHERE id = :itemId")
46-
void deleteById(@NonNull Long itemId);
42+
void deleteById(Long itemId);
4743

4844
@Query("DELETE FROM " + Constants.TABLE_LICENSES)
4945
void clear();

library/src/main/java/io/syslogic/github/api/room/OwnersDao.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import android.database.Cursor;
44

5-
import androidx.annotation.NonNull;
65
import androidx.room.Dao;
76
import androidx.room.Delete;
87
import androidx.room.Insert;
@@ -22,28 +21,25 @@
2221
@Dao
2322
public interface OwnersDao {
2423

25-
@NonNull
2624
@Query("SELECT * FROM " + Constants.TABLE_OWNERS)
2725
List<Owner> getItems();
2826

2927
/* For ContentProvider */
30-
@NonNull
3128
@Query("SELECT * FROM " + Constants.TABLE_OWNERS)
3229
Cursor selectAll();
3330

34-
@NonNull
3531
@Insert()
36-
Long insert(@NonNull Owner item);
32+
Long insert(Owner item);
3733

3834
@Update()
39-
void update(@NonNull Owner item);
35+
void update(Owner item);
4036

4137
@Delete()
42-
void delete(@NonNull Owner item);
38+
void delete(Owner item);
4339

4440
@SuppressWarnings("unused")
4541
@Query("DELETE FROM " + Constants.TABLE_OWNERS + " WHERE id = :itemId")
46-
void deleteById(@NonNull Long itemId);
42+
void deleteById(Long itemId);
4743

4844
@Query("DELETE FROM " + Constants.TABLE_OWNERS)
4945
void clear();

library/src/main/java/io/syslogic/github/api/room/QueryStringsDao.java

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import android.database.Cursor;
44

5-
import androidx.annotation.NonNull;
65
import androidx.room.Dao;
76
import androidx.room.Delete;
87
import androidx.room.Insert;
@@ -22,32 +21,28 @@
2221
@Dao
2322
public interface QueryStringsDao {
2423

25-
@NonNull
2624
@Query("SELECT * FROM " + Constants.TABLE_QUERY_STRINGS)
2725
List<QueryString> getItems();
2826

29-
@NonNull
3027
@Query("SELECT * FROM " + Constants.TABLE_QUERY_STRINGS + " WHERE id = :itemId")
31-
QueryString getItem(@NonNull Long itemId);
28+
QueryString getItem(Long itemId);
3229

3330
/* For ContentProvider */
34-
@NonNull
3531
@Query("SELECT * FROM " + Constants.TABLE_QUERY_STRINGS)
3632
Cursor selectAll();
3733

38-
@NonNull
3934
@Insert()
40-
Long insert(@NonNull QueryString item);
35+
Long insert(QueryString item);
4136

4237
@Update()
43-
int update(@NonNull QueryString item);
38+
int update(QueryString item);
4439

4540
@Delete()
46-
void delete(@NonNull QueryString item);
41+
void delete(QueryString item);
4742

4843
@SuppressWarnings("unused")
4944
@Query("DELETE FROM " + Constants.TABLE_QUERY_STRINGS + " WHERE id = :itemId")
50-
int deleteById(@NonNull Long itemId);
45+
int deleteById(Long itemId);
5146

5247
@Query("DELETE FROM " + Constants.TABLE_QUERY_STRINGS)
5348
void clear();

library/src/main/java/io/syslogic/github/api/room/RepositoriesDao.java

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import android.database.Cursor;
44

5-
import androidx.annotation.NonNull;
65
import androidx.room.Dao;
76
import androidx.room.Delete;
87
import androidx.room.Insert;
@@ -22,36 +21,31 @@
2221
@Dao
2322
public interface RepositoriesDao {
2423

25-
@NonNull
2624
@Query("SELECT * FROM " + Constants.TABLE_REPOSITORIES)
2725
List<Repository> getItems();
2826

2927
/* For ContentProvider */
30-
@NonNull
3128
@Query("SELECT * FROM " + Constants.TABLE_REPOSITORIES)
3229
Cursor selectAll();
3330

3431
/* For ContentProvider */
35-
@NonNull
3632
@Query("SELECT * FROM " + Constants.TABLE_REPOSITORIES + " WHERE id LIKE :itemId LIMIT 1")
37-
Cursor getCursor(@NonNull Long itemId);
33+
Cursor getCursor(Long itemId);
3834

39-
@NonNull
4035
@Query("SELECT * FROM " + Constants.TABLE_REPOSITORIES + " WHERE id LIKE :itemId LIMIT 1")
41-
Repository getItem(@NonNull Long itemId);
36+
Repository getItem(Long itemId);
4237

43-
@NonNull
4438
@Insert()
45-
Long insert(@NonNull Repository item);
39+
Long insert(Repository item);
4640

4741
@Update()
48-
int update(@NonNull Repository item);
42+
int update(Repository item);
4943

5044
@Delete()
51-
void delete(@NonNull Repository item);
45+
void delete(Repository item);
5246

5347
@Query("DELETE FROM " + Constants.TABLE_REPOSITORIES + " WHERE id = :itemId")
54-
int deleteById(@NonNull Long itemId);
48+
int deleteById(Long itemId);
5549

5650
@Query("DELETE FROM " + Constants.TABLE_REPOSITORIES)
5751
void clear();

library/src/main/java/io/syslogic/github/api/room/WorkflowsDao.java

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import android.database.Cursor;
44

5-
import androidx.annotation.NonNull;
65
import androidx.room.Dao;
76
import androidx.room.Delete;
87
import androidx.room.Insert;
@@ -22,37 +21,32 @@
2221
@Dao
2322
public interface WorkflowsDao {
2423

25-
@NonNull
2624
@Query("SELECT * FROM " + Constants.TABLE_WORKFLOWS)
2725
List<Workflow> getItems();
2826

2927
/* For ContentProvider */
30-
@NonNull
3128
@Query("SELECT * FROM " + Constants.TABLE_WORKFLOWS)
3229
Cursor selectAll();
3330

3431
/* For ContentProvider */
35-
@NonNull
3632
@Query("SELECT * FROM " + Constants.TABLE_WORKFLOWS + " WHERE id LIKE :itemId LIMIT 1")
37-
Cursor getCursor(@NonNull Long itemId);
33+
Cursor getCursor(Long itemId);
3834

39-
@NonNull
4035
@Query("SELECT * FROM " + Constants.TABLE_WORKFLOWS + " WHERE id LIKE :itemId LIMIT 1")
41-
Workflow getItem(@NonNull Long itemId);
36+
Workflow getItem(Long itemId);
4237

43-
@NonNull
4438
@Insert()
45-
Long insert(@NonNull Workflow item);
39+
Long insert(Workflow item);
4640

4741
@Update()
48-
int update(@NonNull Workflow item);
42+
int update(Workflow item);
4943

5044
@Delete()
51-
void delete(@NonNull Workflow item);
45+
void delete(Workflow item);
5246

5347
@SuppressWarnings("unused")
5448
@Query("DELETE FROM " + Constants.TABLE_WORKFLOWS + " WHERE id = :itemId")
55-
int deleteById(@NonNull Long itemId);
49+
int deleteById(Long itemId);
5650

5751
@Query("DELETE FROM " + Constants.TABLE_WORKFLOWS)
5852
void clear();

library/src/main/java/io/syslogic/github/api/utils/DateConverter.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,20 @@
1212
*/
1313
public class DateConverter {
1414

15+
/**
16+
* @param value a long date.
17+
* @return an instance of {@link Date}.
18+
*/
1519
@NonNull
1620
@TypeConverter
1721
public Date fromLong(@NonNull Long value) {
1822
return new Date(value);
1923
}
2024

25+
/**
26+
* @param value an instance of {@link Date}.
27+
* @return a long date.
28+
*/
2129
@NonNull
2230
@TypeConverter
2331
public Long toLong(@NonNull Date value) {

0 commit comments

Comments
 (0)