-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
97d02ee
commit 264fc41
Showing
8 changed files
with
97 additions
and
81 deletions.
There are no files selected for viewing
27 changes: 0 additions & 27 deletions
27
hibernate-mappings/src/main/java/by/andd3dfx/model/shop/ItemWithLengthAndDiameter.java
This file was deleted.
Oops, something went wrong.
31 changes: 0 additions & 31 deletions
31
hibernate-mappings/src/main/java/by/andd3dfx/model/shop/ItemWithThreeSizes.java
This file was deleted.
Oops, something went wrong.
24 changes: 24 additions & 0 deletions
24
hibernate-mappings/src/main/java/by/andd3dfx/model/shop/OneSizeItem.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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package by.andd3dfx.model.shop; | ||
|
||
import lombok.Data; | ||
|
||
import javax.persistence.Column; | ||
import javax.persistence.DiscriminatorValue; | ||
import javax.persistence.Entity; | ||
|
||
@Data | ||
@Entity | ||
@DiscriminatorValue("1-size") | ||
public class OneSizeItem extends ZeroSizeItem { | ||
|
||
@Column | ||
private Double length; | ||
|
||
@Override | ||
public String toString() { | ||
return "OneSizeItem{" + | ||
super.toString() + | ||
", length=" + length + | ||
'}'; | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
hibernate-mappings/src/main/java/by/andd3dfx/model/shop/ThreeSizeItem.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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package by.andd3dfx.model.shop; | ||
|
||
import javax.persistence.Column; | ||
import javax.persistence.DiscriminatorValue; | ||
import javax.persistence.Entity; | ||
import lombok.Data; | ||
|
||
@Data | ||
@Entity | ||
@DiscriminatorValue("3-size") | ||
public class ThreeSizeItem extends TwoSizeItem { | ||
|
||
@Column | ||
private Double height; | ||
|
||
@Override | ||
public String toString() { | ||
return "ThreeSizeItem{" + | ||
super.toString() + | ||
", height=" + height + | ||
'}'; | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
hibernate-mappings/src/main/java/by/andd3dfx/model/shop/TwoSizeItem.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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package by.andd3dfx.model.shop; | ||
|
||
import javax.persistence.Column; | ||
import javax.persistence.DiscriminatorValue; | ||
import javax.persistence.Entity; | ||
import lombok.Data; | ||
|
||
@Data | ||
@Entity | ||
@DiscriminatorValue("2-size") | ||
public class TwoSizeItem extends OneSizeItem { | ||
|
||
@Column | ||
private Double width; | ||
|
||
@Override | ||
public String toString() { | ||
return "TwoSizeItem{" + | ||
super.toString() + | ||
", width=" + width + | ||
'}'; | ||
} | ||
} |
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
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
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