-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BFFL-174 -> Adjusted Prepared Statements with POST-Method in BE
-> Added POST_Type-Classes
- Loading branch information
Showing
12 changed files
with
281 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
.../main/java/org/bffl/dbConnector/dao/types/postParamTypes/POST_AdminToGroupAssignment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package org.bffl.dbConnector.dao.types.postParamTypes; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
@Getter | ||
@Setter | ||
public class POST_AdminToGroupAssignment { | ||
|
||
private String group_name; | ||
private String user_id; | ||
private Integer end_timestamp; | ||
private Boolean admin_flag; | ||
|
||
public POST_AdminToGroupAssignment(String group_name, String user_id, Integer end_timestamp, Boolean admin_flag) { | ||
this.group_name = group_name; | ||
this.user_id = user_id; | ||
this.admin_flag = admin_flag; | ||
int currentTime = (int) System.currentTimeMillis() / 1000 + 3600; | ||
if(end_timestamp < currentTime) | ||
end_timestamp = currentTime; | ||
this.end_timestamp = end_timestamp; | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
backend/src/main/java/org/bffl/dbConnector/dao/types/postParamTypes/POST_Group.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package org.bffl.dbConnector.dao.types.postParamTypes; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
@Getter | ||
@Setter | ||
public class POST_Group { | ||
|
||
private String group_name; | ||
private int max_size; | ||
|
||
public POST_Group(String group_name, int max_size) { | ||
this.group_name = group_name; | ||
if(max_size < 1) | ||
max_size = 1; | ||
this.max_size = max_size; | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
backend/src/main/java/org/bffl/dbConnector/dao/types/postParamTypes/POST_GroupName.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package org.bffl.dbConnector.dao.types.postParamTypes; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
@Getter | ||
@Setter | ||
@AllArgsConstructor | ||
public class POST_GroupName { | ||
|
||
private String group_name; | ||
|
||
} |
19 changes: 19 additions & 0 deletions
19
backend/src/main/java/org/bffl/dbConnector/dao/types/postParamTypes/POST_ShortURL.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package org.bffl.dbConnector.dao.types.postParamTypes; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
@Getter | ||
@Setter | ||
@AllArgsConstructor | ||
public class POST_ShortURL { | ||
|
||
private int short_url_id; | ||
private String custom_suffix; | ||
private int scope; | ||
private Boolean delete_flag; | ||
private Boolean update_flag; | ||
private String target_url; | ||
|
||
} |
14 changes: 14 additions & 0 deletions
14
backend/src/main/java/org/bffl/dbConnector/dao/types/postParamTypes/POST_ShortURLId.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package org.bffl.dbConnector.dao.types.postParamTypes; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
@Getter | ||
@Setter | ||
@AllArgsConstructor | ||
public class POST_ShortURLId { | ||
|
||
private int short_url_id; | ||
|
||
} |
Oops, something went wrong.