forked from opencb/java-common-libs
-
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.
- Loading branch information
Showing
30 changed files
with
1,004 additions
and
1,231 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
59 changes: 59 additions & 0 deletions
59
.../commons-datastore-core/src/main/java/org/opencb/commons/datastore/core/result/Error.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,59 @@ | ||
package org.opencb.commons.datastore.core.result; | ||
|
||
public class Error { | ||
|
||
private int code; | ||
|
||
/** | ||
* example: USER_NOT_FOUND, ... | ||
*/ | ||
private String name; | ||
private String description; | ||
|
||
public Error() { | ||
} | ||
|
||
public Error(int code, String name, String description) { | ||
this.code = code; | ||
this.name = name; | ||
this.description = description; | ||
} | ||
|
||
|
||
@Override | ||
public String toString() { | ||
final StringBuilder sb = new StringBuilder("Error{"); | ||
sb.append("code=").append(code); | ||
sb.append(", name='").append(name).append('\''); | ||
sb.append(", description='").append(description).append('\''); | ||
sb.append('}'); | ||
return sb.toString(); | ||
} | ||
|
||
public int getCode() { | ||
return code; | ||
} | ||
|
||
public Error setCode(int code) { | ||
this.code = code; | ||
return this; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public Error setName(String name) { | ||
this.name = name; | ||
return this; | ||
} | ||
|
||
public String getDescription() { | ||
return description; | ||
} | ||
|
||
public Error setDescription(String description) { | ||
this.description = description; | ||
return this; | ||
} | ||
} |
Oops, something went wrong.