-
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.
Merge pull request #5 from absmartly/feature/custom-fields-support
Add support for custom fields
- Loading branch information
Showing
8 changed files
with
409 additions
and
47 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
47 changes: 47 additions & 0 deletions
47
core-api/src/main/java/com/absmartly/sdk/json/CustomFieldValue.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,47 @@ | ||
package com.absmartly.sdk.json; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
|
||
@JsonInclude(JsonInclude.Include.NON_NULL) | ||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
public class CustomFieldValue { | ||
public String name; | ||
public String type; | ||
public String value; | ||
|
||
public CustomFieldValue() {} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (this == o) | ||
return true; | ||
if (o == null || getClass() != o.getClass()) | ||
return false; | ||
|
||
CustomFieldValue that = (CustomFieldValue) o; | ||
|
||
if (name != null ? !name.equals(that.name) : that.name != null) | ||
return false; | ||
if (type != null ? !type.equals(that.type) : that.type != null) | ||
return false; | ||
return value != null ? value.equals(that.value) : that.value == null; | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
int result = name != null ? name.hashCode() : 0; | ||
result = 31 * result + (type != null ? type.hashCode() : 0); | ||
result = 31 * result + (value != null ? value.hashCode() : 0); | ||
return result; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "CustomFieldValue{" + | ||
"name='" + name + '\'' + | ||
", type='" + type + '\'' + | ||
", value='" + value + '\'' + | ||
'}'; | ||
} | ||
} |
Oops, something went wrong.