Skip to content

Commit

Permalink
update demo after upgrade lib
Browse files Browse the repository at this point in the history
  • Loading branch information
nvvi committed Nov 28, 2024
1 parent b1a773c commit eeb056c
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 27 deletions.
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
package com.axonivy.utils.approvaldecision.demo.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Column;

import com.axonivy.utils.approvaldecision.entities.BaseApprovalHistory;

import ch.ivyteam.ivy.environment.Ivy;


@Entity
@Table(name = "ApprovalHistory")
public class ApprovalHistory extends BaseApprovalHistory<String> {
public class ApprovalHistory extends BaseApprovalHistory<Long> {

private static final long serialVersionUID = 1L;

@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.AUTO)
private String id;
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id", unique = true, nullable = false)
private Long id;

@Override
public String getId() {
return id;
public String getSessionUsername() {
return Ivy.session().getSessionUserName();
}

@Override
public void setId(String id) {
this.id = id;
public Long getId() {
return this.id;
}

@Override
public String getSessionUsername() {
return Ivy.session().getSessionUserName();
public void setId(Long id) {
this.id = id;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@

@Entity
@Table(name = "TicketRequest")
public class TicketRequest extends BaseRequest<ApprovalHistory, String> {
public class TicketRequest extends BaseRequest<ApprovalHistory, Long> {

private static final long serialVersionUID = 1L;

@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.AUTO)
private String id;

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "id", unique = true, nullable = false)
private Long id;

@Column
private String forwardToMail;

Expand Down Expand Up @@ -100,18 +100,18 @@ public void setForwardToMail(String forwardToMail) {
}

@Override
public String getId() {
return id;
public String getSessionUsername() {
return Ivy.session().getSessionUserName();
}

@Override
public void setId(String id) {
this.id = id;
public Long getId() {
return this.id;
}

@Override
public String getSessionUsername() {
return Ivy.session().getSessionUserName();
public void setId(Long id) {
this.id = id;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import com.axonivy.utils.approvaldecision.demo.enums.TicketProcessApprovalDecision;
import com.axonivy.utils.approvaldecision.managedbean.AbstractApprovalDecisionBean;

public class TicketApprovalDecisionBean extends AbstractApprovalDecisionBean<ApprovalHistory, String> {
public class TicketApprovalDecisionBean extends AbstractApprovalDecisionBean<ApprovalHistory, Long> {

private static final long serialVersionUID = 1L;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import java.net.MalformedURLException;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;

import com.axonivy.utils.approvaldecision.demo.contentstate.TicketProcessContentState;
import com.axonivy.utils.approvaldecision.demo.dao.TicketRequestDAO;
Expand Down

0 comments on commit eeb056c

Please sign in to comment.