/*
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Enum.java to edit this template
|
*/
|
package com.megatim.fdxcommons.model.enumeration;
|
|
import com.fasterxml.jackson.annotation.JsonValue;
|
import com.megatim.fdxcommons.model.search.EnumValue;
|
|
/**
|
*
|
* @author ASUS
|
*/
|
public enum RemoteTypeAction {
|
AJOUTER("AJOUTER"),
|
CONSULTER("CONSULTER"),
|
SUPPRIMER("SUPPRIMER");
|
|
private final String name;
|
|
private RemoteTypeAction(String name) {
|
this.name = name;
|
}
|
|
@Override
|
public String toString() {
|
return name;
|
}
|
|
@JsonValue
|
public String getName() {
|
return name;
|
}
|
|
@EnumValue
|
public static TypeOperation fromValeur(String value) {
|
if (value == null) {
|
return null;
|
}
|
if (value.equalsIgnoreCase("ajouter")) {
|
return TypeOperation.AJOUTER;
|
} else if (value.equalsIgnoreCase("consulter")) {
|
return TypeOperation.CONSULTER;
|
} else {
|
return null;
|
|
}
|
}
|
}
|