Commit 77943b0b authored by Cristian Aguirre's avatar Cristian Aguirre

CalendarService

parent 8b400966
...@@ -152,6 +152,7 @@ public class ScheduleService implements SchedulingConfigurer { ...@@ -152,6 +152,7 @@ public class ScheduleService implements SchedulingConfigurer {
String key = String.format("%s-%s", tenantIdentifier, identifier); String key = String.format("%s-%s", tenantIdentifier, identifier);
futureMap.put(key, taskRegistrar.getScheduler().schedule(() -> scheduleCron(createJob(tenantIdentifier), tenantIdentifier), trigger)); futureMap.put(key, taskRegistrar.getScheduler().schedule(() -> scheduleCron(createJob(tenantIdentifier), tenantIdentifier), trigger));
/*ETL eliminacion de data sensible*/ /*ETL eliminacion de data sensible*/
List<DeleteDataSensBean> deleteDataSensBeans = deleteDataSensJDBCRepository List<DeleteDataSensBean> deleteDataSensBeans = deleteDataSensJDBCRepository
.getListAgentChannel(AgentStatusEnum.DEPLOYED.getName(), AgentParameterEnum.ACCESS_TWILIO.getName()); .getListAgentChannel(AgentStatusEnum.DEPLOYED.getName(), AgentParameterEnum.ACCESS_TWILIO.getName());
......
...@@ -11,7 +11,7 @@ import javax.persistence.DiscriminatorValue; ...@@ -11,7 +11,7 @@ import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.NamedQuery; import javax.persistence.NamedQuery;
@Audited //@Audited
@Entity @Entity
@DiscriminatorValue(value=AnnualCalendarException.DISCRIMINATOR_VALUE) @DiscriminatorValue(value=AnnualCalendarException.DISCRIMINATOR_VALUE)
@NamedQuery(name = "AnnualCalendarException.findByPK", query = "Select u from AnnualCalendarException u where u.id = ?1") @NamedQuery(name = "AnnualCalendarException.findByPK", query = "Select u from AnnualCalendarException u where u.id = ?1")
......
...@@ -10,7 +10,7 @@ import javax.persistence.*; ...@@ -10,7 +10,7 @@ import javax.persistence.*;
import java.io.Serializable; import java.io.Serializable;
import java.util.List; 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")
......
...@@ -12,7 +12,7 @@ import javax.persistence.*; ...@@ -12,7 +12,7 @@ import javax.persistence.*;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigInteger; import java.math.BigInteger;
@Audited //@Audited
@Entity @Entity
@Inheritance( @Inheritance(
strategy = InheritanceType.SINGLE_TABLE strategy = InheritanceType.SINGLE_TABLE
...@@ -27,8 +27,8 @@ public abstract class CalendarException implements Serializable { ...@@ -27,8 +27,8 @@ public abstract class CalendarException implements Serializable {
@Id @Id
@Column(name = "CALE_EXC_ID") @Column(name = "CALE_EXC_ID")
@SequenceGenerator(name = "AVB_CALENDAR_EXCEPTION_GENERATOR", sequenceName = "AVB_CALENDAR_EXCEPTION_SEQ", initialValue = 1, allocationSize = 1) // @SequenceGenerator(name = "AVB_CALENDAR_EXCEPTION_GENERATOR", sequenceName = "AVB_CALENDAR_EXCEPTION_SEQ", initialValue = 1, allocationSize = 1)
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "AVB_CALENDAR_EXCEPTION_GENERATOR") // @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "AVB_CALENDAR_EXCEPTION_GENERATOR")
private BigInteger id; private BigInteger id;
@Version @Version
......
...@@ -12,7 +12,7 @@ import javax.persistence.Entity; ...@@ -12,7 +12,7 @@ import javax.persistence.Entity;
import javax.persistence.NamedQuery; import javax.persistence.NamedQuery;
import java.time.OffsetDateTime; import java.time.OffsetDateTime;
@Audited //@Audited
@Entity @Entity
@DiscriminatorValue(value= RangeCalendarException.DISCRIMINATOR_VALUE) @DiscriminatorValue(value= RangeCalendarException.DISCRIMINATOR_VALUE)
@NamedQuery(name = "RangeCalendarException.findByPK", query = "Select u from RangeCalendarException u where u.id = ?1") @NamedQuery(name = "RangeCalendarException.findByPK", query = "Select u from RangeCalendarException u where u.id = ?1")
......
...@@ -13,7 +13,7 @@ import javax.persistence.*; ...@@ -13,7 +13,7 @@ import javax.persistence.*;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigInteger; import java.math.BigInteger;
@Audited //@Audited
@Entity @Entity
@Table(name = "AVB_SCHEDULER_TASK") @Table(name = "AVB_SCHEDULER_TASK")
@NamedQuery(name = "SchedulerTask.findByPK", query = "Select u from SchedulerTask u where u.id = ?1") @NamedQuery(name = "SchedulerTask.findByPK", query = "Select u from SchedulerTask u where u.id = ?1")
...@@ -25,8 +25,8 @@ public class SchedulerTask implements Serializable { ...@@ -25,8 +25,8 @@ public class SchedulerTask implements Serializable {
@Id @Id
@Column(name = "SHTA_ID") @Column(name = "SHTA_ID")
@SequenceGenerator(name = "AVB_SCHEDULER_TASK_GENERATOR", sequenceName = "AVB_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 = "AVB_SCHEDULER_TASK_GENERATOR") // @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "AVB_SCHEDULER_TASK_GENERATOR")
private BigInteger id; private BigInteger id;
@Version @Version
......
...@@ -12,7 +12,7 @@ import javax.persistence.Entity; ...@@ -12,7 +12,7 @@ import javax.persistence.Entity;
import javax.persistence.NamedQuery; import javax.persistence.NamedQuery;
import java.time.LocalDate; import java.time.LocalDate;
@Audited //@Audited
@Entity @Entity
@DiscriminatorValue(value= UniqueCalendarException.DISCRIMINATOR_VALUE) @DiscriminatorValue(value= UniqueCalendarException.DISCRIMINATOR_VALUE)
@NamedQuery(name = "UniqueCalendarException.findByPK", query = "Select u from UniqueCalendarException u where u.id = ?1") @NamedQuery(name = "UniqueCalendarException.findByPK", query = "Select u from UniqueCalendarException u where u.id = ?1")
......
...@@ -11,7 +11,7 @@ import javax.persistence.DiscriminatorValue; ...@@ -11,7 +11,7 @@ import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.NamedQuery; import javax.persistence.NamedQuery;
@Audited //@Audited
@Entity @Entity
@DiscriminatorValue(value= UniqueWeeklyCalendarException.DISCRIMINATOR_VALUE) @DiscriminatorValue(value= UniqueWeeklyCalendarException.DISCRIMINATOR_VALUE)
@NamedQuery(name = "UniqueWeeklyCalendarException.findByPK", query = "Select u from UniqueWeeklyCalendarException u where u.id = ?1") @NamedQuery(name = "UniqueWeeklyCalendarException.findByPK", query = "Select u from UniqueWeeklyCalendarException u where u.id = ?1")
......
...@@ -13,7 +13,7 @@ import java.io.Serializable; ...@@ -13,7 +13,7 @@ import java.io.Serializable;
import java.math.BigInteger; import java.math.BigInteger;
import java.time.OffsetTime; import java.time.OffsetTime;
@Audited //@Audited
@Entity @Entity
@Table(name = "AVB_WEEK_SCHEDULER") @Table(name = "AVB_WEEK_SCHEDULER")
@NamedQuery(name = "WeekScheduler.findByPK", query = "Select u from WeekScheduler u where u.id = ?1") @NamedQuery(name = "WeekScheduler.findByPK", query = "Select u from WeekScheduler u where u.id = ?1")
...@@ -25,8 +25,8 @@ public class WeekScheduler implements Serializable { ...@@ -25,8 +25,8 @@ public class WeekScheduler implements Serializable {
@Id @Id
@Column(name = "WESC_ID") @Column(name = "WESC_ID")
@SequenceGenerator(name = "AVB_WEEK_SCHEDULER_GENERATOR", sequenceName = "AVB_WEEK_SCHEDULER_SEQ", initialValue = 1, allocationSize = 1) // @SequenceGenerator(name = "AVB_WEEK_SCHEDULER_GENERATOR", sequenceName = "AVB_WEEK_SCHEDULER_SEQ", initialValue = 1, allocationSize = 1)
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "AVB_WEEK_SCHEDULER_GENERATOR") // @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "AVB_WEEK_SCHEDULER_GENERATOR")
private BigInteger id; private BigInteger id;
@Version @Version
...@@ -48,7 +48,7 @@ public class WeekScheduler implements Serializable { ...@@ -48,7 +48,7 @@ public class WeekScheduler implements Serializable {
@ManyToOne(optional = false) @ManyToOne(optional = false)
@NotFound(action = NotFoundAction.IGNORE) @NotFound(action = NotFoundAction.IGNORE)
@JoinColumn(name = "CALE_ID", referencedColumnName = "CALE_ID", nullable = false) @JoinColumn(name = "cale_id", referencedColumnName = "cale_id", nullable = false)
private Calendar calendar; private Calendar calendar;
} }
...@@ -14,4 +14,5 @@ public interface SchedulerTaskRepository extends CrudRepository<SchedulerTask, B ...@@ -14,4 +14,5 @@ public interface SchedulerTaskRepository extends CrudRepository<SchedulerTask, B
@Query("select b from SchedulerTask b where b.calendar.id = :calendarId") @Query("select b from SchedulerTask b where b.calendar.id = :calendarId")
Optional<List<SchedulerTask>> findByCalendarId(@Param("calendarId") String calendarId); Optional<List<SchedulerTask>> findByCalendarId(@Param("calendarId") String calendarId);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment