Untitled

 avatar
unknown
plain_text
6 months ago
2.6 kB
3
Indexable
package com.example.entity;

import lombok.Data;
import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDateTime;

@Entity
@Table(name = "application_gen_param", schema = "private")
@IdClass(ApplicationGenParamId.class)
@Data // Lombok annotation for generating getters, setters, equals, hashCode, and toString methods
public class ApplicationGenParam implements Serializable {

    @Id
    @Column(name = "param_key", nullable = false)
    private String paramKey;

    @Id
    @Column(name = "sub_param_key", nullable = false)
    private String subParamKey;

    @Id
    @Column(name = "param_value", nullable = false)
    private String paramValue;

    @Column(name = "param_desc")
    private String paramDesc;

    @Column(name = "display_seq")
    private String displaySeq;

    @Column(name = "status", columnDefinition = "bpchar(1)")
    private String status;

    @Column(name = "modified_by")
    private String modifiedBy;

    @Column(name = "modified_dt", columnDefinition = "timestamp default now()")
    private LocalDateTime modifiedDt;

    @Column(name = "created_by")
    private String createdBy;

    @Column(name = "created_dt", columnDefinition = "timestamp default now()")
    private LocalDateTime createdDt;

    @Column(name = "action")
    private String action;

    @Column(name = "data_type")
    private String dataType;

    @Column(name = "generic_param")
    private String genericParam;

    @Column(name = "mig_dat", columnDefinition = "timestamp default now()")
    private LocalDateTime migDat;

    @Column(name = "param_type")
    private String paramType;

    @Column(name = "pattern")
    private String pattern;

    @Column(name = "req_no")
    private String reqNo;

    @Column(name = "sub_param_type")
    private String subParamType;

    @Column(name = "cache_required", nullable = false, columnDefinition = "varchar(255) default 'N'")
    private String cacheRequired;
}




package com.example.entity;

import lombok.Data;
import java.io.Serializable;
import java.util.Objects;

@Data // Lombok annotation for generating getters, setters, equals, and hashCode methods
public class ApplicationGenParamId implements Serializable {

    private String paramKey;
    private String subParamKey;
    private String paramValue;

    // Default constructor
    public ApplicationGenParamId() {}

    // Constructor with fields
    public ApplicationGenParamId(String paramKey, String subParamKey, String paramValue) {
        this.paramKey = paramKey;
        this.subParamKey = subParamKey;
        this.paramValue = paramValue;
    }
}
Editor is loading...
Leave a Comment