Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
ejercicio2-framework-back
Project
Project
Details
Activity
Releases
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
Josue
ejercicio2-framework-back
Commits
89a0552e
Commit
89a0552e
authored
Nov 29, 2021
by
jgomez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SchedulerTask, calendar, calendarExeption
Correccion en modelos
parent
a577f209
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
63 additions
and
5 deletions
+63
-5
CalendarExceptionController.java
...ytesw/bytebot/controller/CalendarExceptionController.java
+58
-0
Calendar.java
src/main/java/com/bytesw/bytebot/model/Calendar.java
+1
-1
SchedulerTask.java
src/main/java/com/bytesw/bytebot/model/SchedulerTask.java
+4
-4
No files found.
src/main/java/com/bytesw/bytebot/controller/CalendarExceptionController.java
0 → 100644
View file @
89a0552e
package
com
.
bytesw
.
bytebot
.
controller
;
import
com.bytesw.bytebot.bean.CalendarExceptionBean
;
import
com.bytesw.bytebot.service.CalendarExceptionService
;
import
com.bytesw.xdf.annotation.ProgramSecurity
;
import
com.bytesw.xdf.controller.XDFController
;
import
io.swagger.annotations.ApiResponse
;
import
io.swagger.annotations.ApiResponses
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletRequest
;
import
java.math.BigInteger
;
import
java.util.List
;
import
java.util.Map
;
@RestController
()
@RequestMapping
(
"/calendar-exception"
)
@ProgramSecurity
(
"calendar-exception"
)
@Log4j2
public
class
CalendarExceptionController
extends
XDFController
<
CalendarExceptionBean
,
BigInteger
>
{
@Autowired
CalendarExceptionService
service
;
public
CalendarExceptionController
(
CalendarExceptionService
service
)
{
super
(
service
);
}
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"Success"
,
response
=
ResponseEntity
.
class
),
@ApiResponse
(
code
=
404
,
message
=
"Not Found"
),
@ApiResponse
(
code
=
505
,
message
=
"Internal Server Error"
)})
@RequestMapping
(
value
=
{
"/find-by-calendar-id"
},
method
=
{
RequestMethod
.
POST
}
)
@ResponseBody
@PreAuthorize
(
"hasPermission(this, 'view')"
)
public
ResponseEntity
<
String
>
getCalendarExceptionbyID
(
@RequestBody
Map
<
String
,
String
>
parametersCalendar
,
HttpServletRequest
req
)
{
List
<
CalendarExceptionBean
>
calendarExceptionBeanList
=
this
.
service
.
getCalendarExceptionbyID
(
parametersCalendar
);
return
new
ResponseEntity
(
this
.
gson
.
toJson
(
calendarExceptionBeanList
),
HttpStatus
.
OK
);
}
}
src/main/java/com/bytesw/bytebot/model/Calendar.java
View file @
89a0552e
...
@@ -12,7 +12,7 @@ import java.util.List;
...
@@ -12,7 +12,7 @@ import java.util.List;
@Audited
@Audited
@Entity
@Entity
@Table
(
name
=
"
avb_calendar
"
)
@Table
(
name
=
"
AVB_CALENDAR
"
)
@NamedQuery
(
name
=
"Calendar.findByPK"
,
query
=
"Select u from Calendar u where u.id = ?1"
)
@NamedQuery
(
name
=
"Calendar.findByPK"
,
query
=
"Select u from Calendar u where u.id = ?1"
)
@Getter
@Getter
@Setter
@Setter
...
...
src/main/java/com/bytesw/bytebot/model/SchedulerTask.java
View file @
89a0552e
...
@@ -13,7 +13,7 @@ import java.math.BigInteger;
...
@@ -13,7 +13,7 @@ import java.math.BigInteger;
@Audited
@Audited
@Entity
@Entity
@Table
(
name
=
"
GTW
_SCHEDULER_TASK"
)
@Table
(
name
=
"
AVB
_SCHEDULER_TASK"
)
@NamedQuery
(
name
=
"SchedulerTasks.findByPK"
,
query
=
"Select u from SchedulerTask u where u.id = ?1"
)
@NamedQuery
(
name
=
"SchedulerTasks.findByPK"
,
query
=
"Select u from SchedulerTask u where u.id = ?1"
)
@Getter
@Getter
@Setter
@Setter
...
@@ -23,12 +23,12 @@ public class SchedulerTask implements Serializable {
...
@@ -23,12 +23,12 @@ public class SchedulerTask implements Serializable {
@Id
@Id
@Column
(
name
=
"SHTA_ID"
)
@Column
(
name
=
"SHTA_ID"
)
@SequenceGenerator
(
name
=
"
GTW_SCHEDULER_TASK_GENERATOR"
,
sequenceName
=
"GTW
_SCHEDULER_TASK_SEQ"
,
initialValue
=
1
,
allocationSize
=
1
)
@SequenceGenerator
(
name
=
"
AVB_SCHEDULER_TASK_GENERATOR"
,
sequenceName
=
"AVB
_SCHEDULER_TASK_SEQ"
,
initialValue
=
1
,
allocationSize
=
1
)
@GeneratedValue
(
strategy
=
GenerationType
.
SEQUENCE
,
generator
=
"
GTW
_SCHEDULER_TASK_GENERATOR"
)
@GeneratedValue
(
strategy
=
GenerationType
.
SEQUENCE
,
generator
=
"
AVB
_SCHEDULER_TASK_GENERATOR"
)
private
BigInteger
id
;
private
BigInteger
id
;
@Version
@Version
@Column
(
name
=
"VERSION"
)
@Column
(
name
=
"
SHTA_
VERSION"
)
@Basic
(
optional
=
false
)
@Basic
(
optional
=
false
)
private
long
version
;
private
long
version
;
...
...
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