Http Adapter Extra Log - Header처리 수정
This commit is contained in:
@@ -1,46 +1,46 @@
|
||||
package com.eactive.eai.data.entity.onl.logger;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.ConstraintMode;
|
||||
import javax.persistence.EmbeddedId;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.ForeignKey;
|
||||
import javax.persistence.Index;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.JoinColumns;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
|
||||
import com.eactive.eai.data.entity.AbstractEntity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(onlyExplicitlyIncluded = true, callSuper = true)
|
||||
|
||||
@Entity
|
||||
@Table(name = "http_adapter_extra_header", indexes = {
|
||||
@Index(name = "idx_guid_service_number", columnList = "weekday, guid, service_process_number") })
|
||||
public class HttpAdapterExtraHeader extends AbstractEntity<HttpAdapterExtraHeaderId> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@EmbeddedId
|
||||
private HttpAdapterExtraHeaderId id;
|
||||
|
||||
@Column(name = "value", nullable = false, length = 500)
|
||||
@Comment("헤더 값")
|
||||
private String value;
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumns({
|
||||
@JoinColumn(name = "weekday", referencedColumnName = "weekday", insertable = false, updatable = false, foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT)),
|
||||
@JoinColumn(name = "guid", referencedColumnName = "guid", insertable = false, updatable = false, foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT)),
|
||||
@JoinColumn(name = "service_process_number", referencedColumnName = "service_process_number", insertable = false, updatable = false, foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT)) })
|
||||
@ToString.Exclude
|
||||
private HttpAdapterExtraLog log;
|
||||
}
|
||||
//package com.eactive.eai.data.entity.onl.logger;
|
||||
//
|
||||
//import javax.persistence.Column;
|
||||
//import javax.persistence.ConstraintMode;
|
||||
//import javax.persistence.EmbeddedId;
|
||||
//import javax.persistence.Entity;
|
||||
//import javax.persistence.ForeignKey;
|
||||
//import javax.persistence.Index;
|
||||
//import javax.persistence.JoinColumn;
|
||||
//import javax.persistence.JoinColumns;
|
||||
//import javax.persistence.ManyToOne;
|
||||
//import javax.persistence.Table;
|
||||
//
|
||||
//import org.hibernate.annotations.Comment;
|
||||
//
|
||||
//import com.eactive.eai.data.entity.AbstractEntity;
|
||||
//
|
||||
//import lombok.Data;
|
||||
//import lombok.EqualsAndHashCode;
|
||||
//import lombok.ToString;
|
||||
//
|
||||
//@Data
|
||||
//@EqualsAndHashCode(onlyExplicitlyIncluded = true, callSuper = true)
|
||||
//
|
||||
//@Entity
|
||||
//@Table(name = "http_adapter_extra_header", indexes = {
|
||||
// @Index(name = "idx_guid_service_number", columnList = "weekday, guid, service_process_number") })
|
||||
//public class HttpAdapterExtraHeader extends AbstractEntity<HttpAdapterExtraHeaderId> {
|
||||
//
|
||||
// private static final long serialVersionUID = 1L;
|
||||
//
|
||||
// @EmbeddedId
|
||||
// private HttpAdapterExtraHeaderId id;
|
||||
//
|
||||
// @Column(name = "value", nullable = false, length = 500)
|
||||
// @Comment("헤더 값")
|
||||
// private String value;
|
||||
//
|
||||
// @ManyToOne
|
||||
// @JoinColumns({
|
||||
// @JoinColumn(name = "weekday", referencedColumnName = "weekday", insertable = false, updatable = false, foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT)),
|
||||
// @JoinColumn(name = "guid", referencedColumnName = "guid", insertable = false, updatable = false, foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT)),
|
||||
// @JoinColumn(name = "service_process_number", referencedColumnName = "service_process_number", insertable = false, updatable = false, foreignKey = @ForeignKey(ConstraintMode.NO_CONSTRAINT)) })
|
||||
// @ToString.Exclude
|
||||
// private HttpAdapterExtraLog log;
|
||||
//}
|
||||
|
||||
+32
-32
@@ -1,32 +1,32 @@
|
||||
package com.eactive.eai.data.entity.onl.logger;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Embeddable;
|
||||
|
||||
import org.hibernate.annotations.Comment;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@Embeddable
|
||||
public class HttpAdapterExtraHeaderId implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Column(name = "weekday")
|
||||
@Comment("파티션을 위한 요일 코드(1:일요일, 2:월요일...)")
|
||||
private Integer weekday;
|
||||
|
||||
@Column(name = "guid", nullable = false, length = 500)
|
||||
@Comment("트랜잭션 별 Unique ID")
|
||||
private String guid;
|
||||
|
||||
@Column(name = "service_process_number", nullable = false)
|
||||
@Comment("서비스 처리 번호 (100/200/300/400...)")
|
||||
private int serviceProcessNumber;
|
||||
|
||||
@Column(name = "name", nullable = false, length = 500)
|
||||
@Comment("헤더 이름")
|
||||
private String name;
|
||||
}
|
||||
//package com.eactive.eai.data.entity.onl.logger;
|
||||
//
|
||||
//import java.io.Serializable;
|
||||
//
|
||||
//import javax.persistence.Column;
|
||||
//import javax.persistence.Embeddable;
|
||||
//
|
||||
//import org.hibernate.annotations.Comment;
|
||||
//
|
||||
//import lombok.Data;
|
||||
//
|
||||
//@Data
|
||||
//@Embeddable
|
||||
//public class HttpAdapterExtraHeaderId implements Serializable {
|
||||
// private static final long serialVersionUID = 1L;
|
||||
//
|
||||
// @Column(name = "weekday")
|
||||
// @Comment("파티션을 위한 요일 코드(1:일요일, 2:월요일...)")
|
||||
// private Integer weekday;
|
||||
//
|
||||
// @Column(name = "guid", nullable = false, length = 500)
|
||||
// @Comment("트랜잭션 별 Unique ID")
|
||||
// private String guid;
|
||||
//
|
||||
// @Column(name = "service_process_number", nullable = false)
|
||||
// @Comment("서비스 처리 번호 (100/200/300/400...)")
|
||||
// private int serviceProcessNumber;
|
||||
//
|
||||
// @Column(name = "name", nullable = false, length = 500)
|
||||
// @Comment("헤더 이름")
|
||||
// private String name;
|
||||
//}
|
||||
@@ -1,23 +1,17 @@
|
||||
package com.eactive.eai.data.entity.onl.logger;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.persistence.CascadeType;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.EmbeddedId;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import com.eactive.eai.data.entity.AbstractEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.hibernate.annotations.Comment;
|
||||
import org.hibernate.annotations.DynamicInsert;
|
||||
import org.hibernate.annotations.DynamicUpdate;
|
||||
|
||||
import com.eactive.eai.data.entity.AbstractEntity;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.EmbeddedId;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Lob;
|
||||
import javax.persistence.Table;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(onlyExplicitlyIncluded = true, callSuper = true)
|
||||
@@ -26,7 +20,10 @@ import lombok.ToString;
|
||||
@DynamicInsert
|
||||
@DynamicUpdate
|
||||
@Table(name = "http_adapter_extra_log")
|
||||
@org.hibernate.annotations.Table(appliesTo = "http_adapter_extra_log", comment = "http 헤더 로그")
|
||||
public class HttpAdapterExtraLog extends AbstractEntity<HttpAdapterExtraLogId> {
|
||||
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@EmbeddedId
|
||||
@@ -52,10 +49,8 @@ public class HttpAdapterExtraLog extends AbstractEntity<HttpAdapterExtraLogId> {
|
||||
@Comment("HTTP 응답 상태 코드(200,404,500...)")
|
||||
private Integer httpStatus;
|
||||
|
||||
@OneToMany(mappedBy = "log", cascade = CascadeType.ALL, orphanRemoval = true)
|
||||
@ToString.Exclude
|
||||
List<HttpAdapterExtraHeader> headerList;
|
||||
|
||||
|
||||
@Lob
|
||||
@Column(name = "header_content") //,columnDefinition = "TEXT") // oracle 적용시 주석 처리
|
||||
private String headerContent;
|
||||
|
||||
}
|
||||
|
||||
@@ -18,9 +18,9 @@ import lombok.NoArgsConstructor;
|
||||
public class HttpAdapterExtraLogId implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Column(name = "weekday")
|
||||
@Comment("파티션을 위한 요일 코드(1:일요일, 2:월요일...)")
|
||||
private Integer weekday;
|
||||
@Column(name = "prcs_date")
|
||||
@Comment("파티션을 위한 처리일자")
|
||||
private String prcsDate;
|
||||
|
||||
@Column(name = "guid", nullable = false, length = 500)
|
||||
@Comment("트랜잭션 별 Unique ID")
|
||||
|
||||
Reference in New Issue
Block a user