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
1ed2b328
Commit
1ed2b328
authored
Nov 30, 2021
by
Roberto Loayza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ETL Process
- Creación de servicios ETL
parent
a577f209
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
120 additions
and
0 deletions
+120
-0
ProcessETLBean.java
src/main/java/com/bytesw/bytebot/bean/ProcessETLBean.java
+22
-0
ProcessETLController.java
...a/com/bytesw/bytebot/controller/ProcessETLController.java
+21
-0
ProcessETL.java
src/main/java/com/bytesw/bytebot/model/ProcessETL.java
+32
-0
ProcessETLRepository.java
...a/com/bytesw/bytebot/repository/ProcessETLRepository.java
+8
-0
ProcessETLService.java
...in/java/com/bytesw/bytebot/service/ProcessETLService.java
+37
-0
No files found.
src/main/java/com/bytesw/bytebot/bean/ProcessETLBean.java
0 → 100644
View file @
1ed2b328
package
com
.
bytesw
.
bytebot
.
bean
;
import
com.google.gson.annotations.Expose
;
import
lombok.Getter
;
import
lombok.Setter
;
import
java.io.Serializable
;
@Getter
@Setter
public
class
ProcessETLBean
implements
Serializable
{
@Expose
private
int
id
;
@Expose
private
String
name
;
@Expose
private
long
version
;
}
src/main/java/com/bytesw/bytebot/controller/ProcessETLController.java
0 → 100644
View file @
1ed2b328
package
com
.
bytesw
.
bytebot
.
controller
;
import
com.bytesw.bytebot.bean.CalendarBean
;
import
com.bytesw.bytebot.bean.ProcessETLBean
;
import
com.bytesw.bytebot.service.CalendarService
;
import
com.bytesw.bytebot.service.ProcessETLService
;
import
com.bytesw.xdf.annotation.ProgramSecurity
;
import
com.bytesw.xdf.controller.XDFController
;
import
lombok.extern.log4j.Log4j2
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
@RestController
()
@RequestMapping
(
"/service/settings/ProcessETL"
)
@ProgramSecurity
(
"PROCESSETL"
)
@Log4j2
public
class
ProcessETLController
extends
XDFController
<
ProcessETLBean
,
Integer
>
{
public
ProcessETLController
(
ProcessETLService
service
)
{
super
(
service
);
}
}
src/main/java/com/bytesw/bytebot/model/ProcessETL.java
0 → 100644
View file @
1ed2b328
package
com
.
bytesw
.
bytebot
.
model
;
import
lombok.EqualsAndHashCode
;
import
lombok.Getter
;
import
lombok.Setter
;
import
lombok.ToString
;
import
org.hibernate.envers.Audited
;
import
javax.persistence.*
;
import
java.io.Serializable
;
@Audited
@Entity
@Table
(
name
=
"avb_process_etl"
)
@NamedQuery
(
name
=
"ProcessETL.findByPK"
,
query
=
"Select u from ProcessETL u where u.id = ?1"
)
@Getter
@Setter
@EqualsAndHashCode
@ToString
(
exclude
=
"id"
)
public
class
ProcessETL
implements
Serializable
{
@Id
@Column
(
name
=
"etl_id"
)
private
int
id
;
@Version
@Column
(
name
=
"etl_version"
)
@Basic
(
optional
=
false
)
private
long
version
;
@Column
(
name
=
"etl_name"
,
nullable
=
false
)
private
String
name
;
}
src/main/java/com/bytesw/bytebot/repository/ProcessETLRepository.java
0 → 100644
View file @
1ed2b328
package
com
.
bytesw
.
bytebot
.
repository
;
import
com.bytesw.bytebot.model.ProcessETL
;
import
org.springframework.data.jpa.repository.JpaSpecificationExecutor
;
import
org.springframework.data.repository.CrudRepository
;
public
interface
ProcessETLRepository
extends
CrudRepository
<
ProcessETL
,
Integer
>,
JpaSpecificationExecutor
<
ProcessETL
>
{
}
src/main/java/com/bytesw/bytebot/service/ProcessETLService.java
0 → 100644
View file @
1ed2b328
package
com
.
bytesw
.
bytebot
.
service
;
import
com.bytesw.bytebot.bean.CalendarBean
;
import
com.bytesw.bytebot.bean.ProcessETLBean
;
import
com.bytesw.bytebot.model.Calendar
;
import
com.bytesw.bytebot.model.ProcessETL
;
import
com.bytesw.bytebot.repository.ProcessETLRepository
;
import
com.bytesw.xdf.service.XDFService
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
@Service
@Transactional
public
class
ProcessETLService
extends
XDFService
<
ProcessETL
,
ProcessETLBean
,
Integer
>
{
protected
ProcessETLService
(
ProcessETLRepository
repository
)
{
super
(
repository
);
}
@Override
protected
ProcessETL
toModel
(
ProcessETL
model
,
ProcessETLBean
bean
)
{
if
(
model
==
null
)
{
model
=
new
ProcessETL
();
}
BeanUtils
.
copyProperties
(
bean
,
model
);
return
model
;
}
@Override
protected
ProcessETLBean
toBean
(
ProcessETL
model
)
{
ProcessETLBean
bean
=
new
ProcessETLBean
();
BeanUtils
.
copyProperties
(
model
,
bean
);
return
bean
;
}
}
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