com.tools20022.repository.codeset.ProvidedCode Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tools20022-api-payments Show documentation
Show all versions of tools20022-api-payments Show documentation
Java API for ISO 20022 - Payments business domain
The newest version!
/* Tools20022 - API for ISO 20022
* Copyright (C) 2017 Tools20022.com - László Bukodi
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
package com.tools20022.repository.codeset;
import com.tools20022.metamodel.MMCode;
import com.tools20022.metamodel.MMCodeSet;
import com.tools20022.metamodel.MMRegistrationStatus;
import com.tools20022.repository.codeset.ProvidedCode.InternalXmlAdapter;
import com.tools20022.repository.GeneratedRepository;
import java.lang.String;
import java.util.Arrays;
import java.util.concurrent.atomic.AtomicReference;
import java.util.LinkedHashMap;
import javax.xml.bind.annotation.adapters.XmlAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
/**
* Specifies whether items have been provided.
*
* Constant fields:
*
* - {@linkplain com.tools20022.metamodel.MMCodeSet#getCode code} =
*
* - {@linkplain com.tools20022.repository.codeset.ProvidedCode#Provided
* ProvidedCode.mmProvided}
* - {@linkplain com.tools20022.repository.codeset.ProvidedCode#NotProvided
* ProvidedCode.mmNotProvided}
*
*
* -
* {@linkplain com.tools20022.metamodel.MMTopLevelDictionaryEntry#getDataDictionary
* dataDictionary} =
* {@linkplain com.tools20022.repository.GeneratedRepository#mmdataDict
* GeneratedRepository.mmdataDict}
* - {@linkplain com.tools20022.metamodel.MMRepositoryConcept#getExample
* example} =
*
* - "PROV"
*
*
* -
* {@linkplain com.tools20022.metamodel.MMRepositoryConcept#getRegistrationStatus
* registrationStatus} =
* com.tools20022.metamodel.MMRegistrationStatus.REGISTERED
* - {@linkplain com.tools20022.metamodel.MMRepositoryConcept#getName name} =
* "ProvidedCode"
* - {@linkplain com.tools20022.metamodel.MMRepositoryConcept#getDefinition
* definition} = "Specifies whether items have been provided."
*
*/
@XmlJavaTypeAdapter(InternalXmlAdapter.class)
public class ProvidedCode extends MMCode {
final static private AtomicReference mmObject_lazy = new AtomicReference<>();
/**
* Provided.
*
* Constant fields:
*
* - {@linkplain com.tools20022.metamodel.MMCode#getOwner owner} =
* {@linkplain com.tools20022.repository.codeset.ProvidedCode ProvidedCode}
* - {@linkplain com.tools20022.metamodel.MMCode#getCodeName codeName} =
* "PROV"
* -
* {@linkplain com.tools20022.metamodel.MMRepositoryConcept#getRegistrationStatus
* registrationStatus} =
* com.tools20022.metamodel.MMRegistrationStatus.PROVISIONALLY_REGISTERED
* - {@linkplain com.tools20022.metamodel.MMRepositoryConcept#getName
* name} = "Provided"
* -
* {@linkplain com.tools20022.metamodel.MMRepositoryConcept#getDefinition
* definition} = "Provided."
*
*/
public static final ProvidedCode Provided = new ProvidedCode() {
{
registrationStatus = MMRegistrationStatus.PROVISIONALLY_REGISTERED;
name = "Provided";
definition = "Provided.";
owner_lazy = () -> com.tools20022.repository.codeset.ProvidedCode.mmObject();
codeName = "PROV";
}
};
/**
* Not provided.
*
* Constant fields:
*
* - {@linkplain com.tools20022.metamodel.MMCode#getOwner owner} =
* {@linkplain com.tools20022.repository.codeset.ProvidedCode ProvidedCode}
* - {@linkplain com.tools20022.metamodel.MMCode#getCodeName codeName} =
* "NPRO"
* -
* {@linkplain com.tools20022.metamodel.MMRepositoryConcept#getRegistrationStatus
* registrationStatus} =
* com.tools20022.metamodel.MMRegistrationStatus.PROVISIONALLY_REGISTERED
* - {@linkplain com.tools20022.metamodel.MMRepositoryConcept#getName
* name} = "NotProvided"
* -
* {@linkplain com.tools20022.metamodel.MMRepositoryConcept#getDefinition
* definition} = "Not provided."
*
*/
public static final ProvidedCode NotProvided = new ProvidedCode() {
{
registrationStatus = MMRegistrationStatus.PROVISIONALLY_REGISTERED;
name = "NotProvided";
definition = "Not provided.";
owner_lazy = () -> com.tools20022.repository.codeset.ProvidedCode.mmObject();
codeName = "NPRO";
}
};
final static private LinkedHashMap codesByName = new LinkedHashMap<>();
protected ProvidedCode() {
}
final static public MMCodeSet mmObject() {
mmObject_lazy.compareAndSet(null, new MMCodeSet() {
{
dataDictionary_lazy = () -> GeneratedRepository.mmdataDict;
example = Arrays.asList("PROV");
registrationStatus = MMRegistrationStatus.REGISTERED;
name = "ProvidedCode";
definition = "Specifies whether items have been provided.";
code_lazy = () -> Arrays.asList(com.tools20022.repository.codeset.ProvidedCode.Provided, com.tools20022.repository.codeset.ProvidedCode.NotProvided);
}
});
return mmObject_lazy.get();
}
static {
codesByName.put(Provided.getCodeName().get(), Provided);
codesByName.put(NotProvided.getCodeName().get(), NotProvided);
}
public static ProvidedCode valueOf(String codeName) {
return codesByName.get(codeName);
}
public static ProvidedCode[] values() {
ProvidedCode[] values = new ProvidedCode[codesByName.size()];
return codesByName.values().toArray(values);
}
protected static class InternalXmlAdapter extends XmlAdapter {
@Override
public ProvidedCode unmarshal(String codeName) {
return valueOf(codeName);
}
@Override
public String marshal(ProvidedCode codeObj) {
return codeObj.getCodeName().orElse(null);
}
}
}