This repository has been archived by the owner on Nov 9, 2017. It is now read-only.
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
Alex Eng
committed
Apr 4, 2013
1 parent
c663577
commit 8eff6bc
Showing
15 changed files
with
165 additions
and
100 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
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
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
69 changes: 69 additions & 0 deletions
69
zanata-war/src/main/java/org/zanata/webtrans/shared/model/AuditInfo.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,69 @@ | ||
package org.zanata.webtrans.shared.model; | ||
|
||
import java.util.Date; | ||
|
||
import com.google.gwt.user.client.rpc.IsSerializable; | ||
|
||
public class AuditInfo implements IsSerializable | ||
{ | ||
private Date date; | ||
private String username; | ||
|
||
private AuditInfo() | ||
{ | ||
} | ||
|
||
public AuditInfo(Date date, String username) | ||
{ | ||
this.date = date; | ||
this.username = username; | ||
} | ||
|
||
public Date getDate() | ||
{ | ||
return date; | ||
} | ||
|
||
public String getUsername() | ||
{ | ||
return username; | ||
} | ||
|
||
@Override | ||
public int hashCode() | ||
{ | ||
final int prime = 31; | ||
int result = 1; | ||
result = prime * result + ((username == null) ? 0 : username.hashCode()); | ||
result = prime * result + ((date == null) ? 0 : date.hashCode()); | ||
return result; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object obj) | ||
{ | ||
if (this == obj) | ||
return true; | ||
if (obj == null) | ||
return false; | ||
if (getClass() != obj.getClass()) | ||
return false; | ||
AuditInfo other = (AuditInfo) obj; | ||
if (username == null) | ||
{ | ||
if (other.username != null) | ||
return false; | ||
} | ||
else if (!username.equals(other.username)) | ||
return false; | ||
if (date == null) | ||
{ | ||
if (other.date != null) | ||
return false; | ||
} | ||
else if (!date.equals(other.date)) | ||
return false; | ||
return true; | ||
} | ||
|
||
} |
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
Oops, something went wrong.