-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix RB-43 added creationTime getters to entity and transformator
- Loading branch information
Showing
2 changed files
with
15 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,8 @@ | |
|
||
import jodd.vtor.constraint.*; | ||
|
||
import java.util.Date; | ||
|
||
/** | ||
* @author Adam Gavronek <[email protected]> | ||
* @since 6/11/2014 | ||
|
@@ -40,13 +42,14 @@ public class Comment extends EntityBase { | |
@Min(-1) | ||
private final int creatorId; | ||
|
||
private final Date creationTime; | ||
|
||
public Comment(Builder builder) { | ||
Id = builder.id; | ||
this.message = builder.message; | ||
this.creatorId = builder.userId; | ||
this.requirementId = builder.requirementId; | ||
|
||
this.creationTime = builder.creationTime; | ||
} | ||
|
||
public int getRequirementId() { | ||
|
@@ -65,6 +68,10 @@ public int getCreatorId() { | |
return creatorId; | ||
} | ||
|
||
public Date getCreationTime() { | ||
return creationTime; | ||
} | ||
|
||
public static Builder getBuilder(String message) { | ||
return new Builder(message); | ||
} | ||
|
@@ -74,6 +81,7 @@ public static class Builder { | |
private String message; | ||
private int userId; | ||
private int requirementId; | ||
public Date creationTime; | ||
|
||
|
||
public Builder(String message) { | ||
|
@@ -95,6 +103,11 @@ public Builder creatorId(int creatorId) { | |
return this; | ||
} | ||
|
||
public Builder creationTime(Date creationTime) { | ||
this.creationTime = creationTime; | ||
return this; | ||
} | ||
|
||
public Comment build() { | ||
return new Comment(this); | ||
} | ||
|
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