cdm.product.template.CallingPartyEnum Maven / Gradle / Ivy
package cdm.product.template;
import cdm.product.template.CallingPartyEnum;
import com.rosetta.model.lib.annotations.RosettaEnum;
import com.rosetta.model.lib.annotations.RosettaEnumValue;
import java.util.Collections;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
/**
* Identifies a party to the on-demand repo transaction that has a right to demand for termination of the Security Finance transaction.
* @version 6.0.0-dev.82
*/
@RosettaEnum("CallingPartyEnum")
public enum CallingPartyEnum {
/**
* Initial buyer to the repo transaction.
*/
@RosettaEnumValue(value = "InitialBuyer")
INITIAL_BUYER("InitialBuyer", null),
/**
* Initial seller to the repo transaction.
*/
@RosettaEnumValue(value = "InitialSeller")
INITIAL_SELLER("InitialSeller", null),
/**
* Either, Buyer or Seller to the repo transaction.
*/
@RosettaEnumValue(value = "Either")
EITHER("Either", null),
/**
* As defined in Master Agreement.
*/
@RosettaEnumValue(value = "AsDefinedInMasterAgreement")
AS_DEFINED_IN_MASTER_AGREEMENT("AsDefinedInMasterAgreement", null)
;
private static Map values;
static {
Map map = new ConcurrentHashMap<>();
for (CallingPartyEnum instance : CallingPartyEnum.values()) {
map.put(instance.toDisplayString(), instance);
}
values = Collections.unmodifiableMap(map);
}
private final String rosettaName;
private final String displayName;
CallingPartyEnum(String rosettaName, String displayName) {
this.rosettaName = rosettaName;
this.displayName = displayName;
}
public static CallingPartyEnum fromDisplayName(String name) {
CallingPartyEnum value = values.get(name);
if (value == null) {
throw new IllegalArgumentException("No enum constant with display name \"" + name + "\".");
}
return value;
}
@Override
public String toString() {
return toDisplayString();
}
public String toDisplayString() {
return displayName != null ? displayName : rosettaName;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy