티스토리 뷰
(2020-05-27)
Company.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
package texas.sbv.kcar.company;
import lombok.*;
import texas.sbv.kcar.employee.Employee;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;
@Component
@Entity
@NoArgsConstructor
@Setter(AccessLevel.PUBLIC)
@Getter
@ToString
@Lazy
@Table(name = "company")
public class Company implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@NotNull @Column(name = "COMPANY_ID") private Long companyId;
@NotNull@Column(name = "CENTER_CODE", length = 3) private String centerCode;
@NotNull@Column(name = "CENTER_NAME", length = 20) private String centerName;
@NotNull@Column(name = "CENTER_REGION", length = 10) private String centerRegion;
@Column(name = "MONTH_REVENUE") private int monthRevenue;
@OneToMany(fetch = FetchType.LAZY)
@JoinColumn(name = "COMPANY_ID")
private List<Employee> employees;
}
|
cs |
Employee.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
package texas.sbv.kcar.employee;
import lombok.*;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
@Component
@Entity
@NoArgsConstructor
@Setter(AccessLevel.PUBLIC)
@Getter
@ToString
@Lazy
@Table(name = "employee")
public class Employee implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@NotNull @Column(name = "EM_ID") private Long emId;
@NotNull @Column(name = "EM_CODE",length = 6) private String emCode;
@Column(name = "MONTH_REVENUE") private int monthRevenue;
@Column(name = "CENTER_NAME", length = 20) private String centerName;
@Column(name = "EM_NAME", length = 20) private String emName;
@Column(name = "CENTER_CODE", length = 3) private String centerCode;
@Column(name = "EM_POSITION", length = 3) private String emPosition;
@Column(name = "CARCD", length = 12) private String carcd;
}
|
cs |
Article.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
package texas.sbv.kcar.magazine;
import lombok.*;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
import org.springframework.util.Assert;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
@Component
@Entity
@NoArgsConstructor
@Setter(AccessLevel.PUBLIC)
@Getter
@Lazy
@ToString
@Table(name = "MAGAZINE")
public class Article implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@NotNull @Column(name = "AID") private Long Aid;
@NotNull @Column(name = "ARTICLE_ID", length = 12) private String aricleId;
@Column(name = "SUBJECT", length = 300) private String subject;
@Column(name = "WRITER", length = 20) private String writer;
@Column(name = "WRITE_DATE", length = 6) private String writeDate;
@Column(name = "ARTICLE_HREF", length = 100) private String articleHref;
@Column(name = "ARTICLE_IMG", length = 100) private String articleImg;
@Builder
public Article (String aricleId,String subject,String writer,String writeDate,String articleHref,String articleImg) {
Assert.hasText(aricleId, "aricleId must not be empty");
this.aricleId = aricleId;
this.subject = subject;
this.writer = writer;
this.writeDate = writeDate;
this.articleHref = articleHref;
this.articleImg = articleImg;
}
}
|
cs |
ExtractWord.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
package texas.sbv.kcar.magazine;
import lombok.*;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
@Component
@Entity
@Lazy
@NoArgsConstructor
@Setter(AccessLevel.PUBLIC)
@Getter
@ToString
@Table(name = "EXTRACTEDWORD")
public class ExtractedWord implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@NotNull @Column(name = "WID") private Long wid;
@Column(name = "WORD") private String word;
@Column(name = "COUNT") private int count;
@Builder
public ExtractedWord (String word , int count ) {
this.word = word;
this.count = count;
}
}
|
cs |
Recommend.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
package texas.sbv.kcar.recommend;
import texas.sbv.kcar.user.User;
import lombok.*;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
@Component
@Lazy
@Entity
@ToString
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Table(name="recommend")
public class Recommend implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "RECO_SEQ") @NotNull private Long recoSeq;
@Column(name = "USERID" ,length = 25) @NotNull private String userId;
@Column(name = "NAME", length = 30) @NotNull private String name;
@Column(name = "CENTER_CODE" ,length = 3) @NotNull private String centerCode;
@Column(name = "CENTER_REGION", length = 10) private String centerRegion;
@Column(name = "CENTER_NAME", length = 20) private String centerName;
@Column(name = "MIN_BEGIN_YEAR") private int minBeginYear;
@Column(name = "MAX_BEGIN_YEAR") private int maxBeginYear;
@Column(name = "MIN_PRICE") private int minPrice;
@Column(name = "MAX_PRICE") private int maxPrice;
@Column(name = "MIN_MILEAGE") private int minMilage;
@Column(name = "MAX_MILEAGE") private int maxMilage;
@Column(name = "TRANSMISSIONCD_NAME", length = 10) private String transmissioncdName;
@Column(name = "FUEL_TYPED_NAME", length = 9) private String fuleTypedName;
@Column(name = "MAKENM", length = 20) private String makeNm;
@Column(name = "MODEL_GRP_NM", length = 100) private String modelGrpNm;
@Column(name = "MODELNM", length = 45) private String modelNm;
@Column(name = "REC_COMMENT_CD", length = 3) private String recCommentCd;
}
|
cs |
Revenue.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
package texas.sbv.kcar.revenue;
import lombok.*;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
@Component
@Entity
@Lazy
@NoArgsConstructor
@Setter(AccessLevel.PUBLIC)
@Getter
@ToString
@Table(name = "revenue")
public class Revenue {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "REVENUE_SEQ") @NotNull private Long revenueSeq;
@Column(name = "CENTER_CODE", length = 3) @NotNull private String centerCode;
@Column(name = "MONTH") @NotNull private String month;
@Column(name = "EM_NAME", length = 20)@NotNull private String emName;
@Column(name = "EM_CODE",length = 6) @NotNull private String emCode;
@Column(name = "EM_REVENUE") @NotNull private int emRevenue;
}
|
cs |
Social.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
package texas.sbv.kcar.social;
import com.fasterxml.jackson.annotation.*;
import texas.sbv.kcar.user.User;
import lombok.*;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
import org.springframework.util.Assert;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
@Component @Lazy @Entity
@Getter @Setter
@ToString(exclude = {"userSeq","thumbs"})
@NoArgsConstructor
@Table(name="SOCIALBOARD")
@JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "boardSeq")
public class Social implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "BOARDSEQ") @NotNull private Long boardSeq;
@Column(name = "BOARDDATE", length=25) @NotNull private String boardDate;
@Column(name = "CARCODE", length=50) @NotNull private String carCode;
@Column(name = "CARNAME", length=100) @NotNull private String carName;
@Column(name = "BOARDCONTENT", length = 20000) @NotNull private String boardContent;
@Column(name = "BOARDIMG", length=200) @NotNull private String boardImg;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "USERSEQ")
@NotNull
private User userSeq;
@OneToMany(mappedBy = "boardSeq", cascade = CascadeType.ALL,
orphanRemoval = true)
private List<Thumb> thumbs = new ArrayList<>();
@Builder
private Social(String boardDate, String carCode, String carName, String boardContent, String boardImg) {
Assert.hasText(boardDate, "boardDate must not be empty");
Assert.hasText(carCode, "carCode must not be empty");
Assert.hasText(boardContent, "boardContent must not be empty");
Assert.hasText(boardImg, "boardImg must not be empty");
this.boardDate = boardDate;
this.carCode = carCode;
this.carName = carName;
this.boardContent = boardContent;
this.boardImg = boardImg;
}
}
|
cs |
Thumb.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
package texas.sbv.kcar.social;
import texas.sbv.kcar.user.User;
import lombok.*;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
@Component @Lazy @Entity
@ToString
@Getter @Setter(AccessLevel.PUBLIC)
@AllArgsConstructor
@NoArgsConstructor(access = AccessLevel.PUBLIC)
@Table(name="THUMB")
public class Thumb implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "THUMBSEQ") @NotNull private Long thumbSeq;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "BOARDSEQ")
@NotNull
private Social boardSeq;
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "USERSEQ")
@NotNull
private User userSeq;
}
|
cs |
'1. 자바' 카테고리의 다른 글
자바/스프링/2020-06-01/ 페이지네이션 Pager.java (0) | 2020.06.01 |
---|---|
자바/인텔리제이/2020-05-28/ 선택한 부분 일괄 변경시키기 CTRL + SHIFT + R (replace) (0) | 2020.05.28 |
자바/이클립스/2020-05-24/ 톰캣 깨끗이 삭제 하기 (0) | 2020.05.24 |
main-Map 4가지 (0) | 2020.05.24 |
control-model-jdbc BoardDao.java (0) | 2020.05.24 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- tensorflow
- Git
- FLASK
- Java
- vscode
- database
- SQLAlchemy
- springMVC
- jQuery
- React
- Mlearn
- Mongo
- intellij
- Oracle
- terms
- Algorithm
- JPA
- docker
- maven
- Eclipse
- ERD
- JUnit
- nodejs
- KAFKA
- SpringBoot
- mariadb
- AWS
- Django
- Python
- COLAB
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |
글 보관함