forked from devonfw/cobigen
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
devonfw#860 added more tests, fixed bugs
- Loading branch information
Showing
5 changed files
with
286 additions
and
207 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
83 changes: 37 additions & 46 deletions
83
.../java/com/devonfw/cobigen/templates/devon4j/test/templates/testclasses/SQLTestEntity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,58 @@ | ||
package com.devonfw.cobigen.templates.devon4j.test.templates.testclasses; | ||
|
||
import javax.persistence.*; | ||
import java.util.List; | ||
|
||
import javax.persistence.Column; | ||
import javax.persistence.Entity; | ||
import javax.persistence.EnumType; | ||
import javax.persistence.Enumerated; | ||
import javax.persistence.Id; | ||
import javax.persistence.Table; | ||
|
||
/** | ||
* Test entity to test the correct generation of the enumerated type, the primary key, and name overriding | ||
* | ||
*/ | ||
@Entity | ||
@Table(name = "SQLTEST") | ||
public class SQLTestEntity { | ||
@Id | ||
@Column(name = "MY_ID_FIELD") | ||
private Long id; | ||
|
||
@Column(name = "VALUENAME") | ||
private Integer integerValue; | ||
@Id | ||
@Column(name = "MY_ID_FIELD") | ||
private Long id; | ||
|
||
@OneToOne | ||
private ReferenceEntity refEntity; | ||
@Column(name = "VALUENAME") | ||
private Integer integerValue; | ||
|
||
@Enumerated(EnumType.STRING) | ||
@Column(length = 420, name = "ENUM_TEST_FIELD_NAME_OVERRIDE") | ||
private EnumForTest enumForTest; | ||
@Enumerated(EnumType.STRING) | ||
@Column(length = 420, name = "ENUM_TEST_FIELD_NAME_OVERRIDE") | ||
private EnumForTest enumForTest; | ||
|
||
private List<ReferenceEntity> referenceEntities; | ||
public Long getId() { | ||
|
||
public Long getId() { | ||
return id; | ||
} | ||
return this.id; | ||
} | ||
|
||
public void setId(Long id) { | ||
this.id = id; | ||
} | ||
public void setId(Long id) { | ||
|
||
public Integer getIntegerValue() { | ||
return integerValue; | ||
} | ||
this.id = id; | ||
} | ||
|
||
public Integer getIntegerValue() { | ||
|
||
public void setIntegerValue(Integer value) { | ||
this.integerValue = value; | ||
} | ||
return this.integerValue; | ||
} | ||
|
||
@OneToMany(mappedBy = "I_SHALL_BE_SKIPPED") | ||
public List<ReferenceEntity> getReferenceEntities() { | ||
return referenceEntities; | ||
} | ||
public void setIntegerValue(Integer value) { | ||
|
||
public void setReferenceEntities(List<ReferenceEntity> referenceEntities) { | ||
this.referenceEntities = referenceEntities; | ||
} | ||
this.integerValue = value; | ||
} | ||
|
||
public EnumForTest getEnumForTest() { | ||
|
||
public ReferenceEntity getRefEntity() { | ||
return refEntity; | ||
} | ||
return this.enumForTest; | ||
} | ||
|
||
public void setRefEntity(ReferenceEntity refEntity) { | ||
this.refEntity = refEntity; | ||
} | ||
public void setEnumForTest(EnumForTest enumForTest) { | ||
|
||
public EnumForTest getEnumForTest() { | ||
return enumForTest; | ||
} | ||
this.enumForTest = enumForTest; | ||
} | ||
|
||
public void setEnumForTest(EnumForTest enumForTest) { | ||
this.enumForTest = enumForTest; | ||
} | ||
} |
Oops, something went wrong.