-
Notifications
You must be signed in to change notification settings - Fork 188
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
5 changed files
with
102 additions
and
29 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
37 changes: 37 additions & 0 deletions
37
coral-service/src/main/java/com/linkedin/coral/coralservice/utils/RewriteType.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,37 @@ | ||
/** | ||
* Copyright 2023 LinkedIn Corporation. All rights reserved. | ||
* Licensed under the BSD-2 Clause license. | ||
* See LICENSE in the project root for license information. | ||
*/ | ||
package com.linkedin.coral.coralservice.utils; | ||
|
||
import com.fasterxml.jackson.annotation.JsonCreator; | ||
|
||
|
||
public enum RewriteType { | ||
NONE("none"), | ||
INCREMENTAL("incremental"), | ||
DATAMASKING("datamasking"); | ||
|
||
private final String type; | ||
|
||
RewriteType(String type) { | ||
this.type = type; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return type; | ||
} | ||
|
||
@JsonCreator | ||
public static RewriteType getDepartmentFromCode(String value) { | ||
for (RewriteType type : RewriteType.values()) { | ||
if (type.toString().equals(value)) { | ||
return type; | ||
} | ||
} | ||
return null; | ||
} | ||
|
||
} |
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