com.tools20022.repository.codeset.TransactionActivityCode 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
/* 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.TransactionActivityCode.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 the type of activity to which this transaction relates.
*
* Constant fields:
*
* - {@linkplain com.tools20022.metamodel.MMCodeSet#getCode code} =
*
* -
* {@linkplain com.tools20022.repository.codeset.TransactionActivityCode#BorrowingLendingActivity
* TransactionActivityCode.mmBorrowingLendingActivity}
* -
* {@linkplain com.tools20022.repository.codeset.TransactionActivityCode#MarketClaim
* TransactionActivityCode.mmMarketClaim}
* -
* {@linkplain com.tools20022.repository.codeset.TransactionActivityCode#CollateralActivity
* TransactionActivityCode.mmCollateralActivity}
* -
* {@linkplain com.tools20022.repository.codeset.TransactionActivityCode#CorporateActionActivity
* TransactionActivityCode.mmCorporateActionActivity}
* -
* {@linkplain com.tools20022.repository.codeset.TransactionActivityCode#SettlementandClearingActivity
* TransactionActivityCode.mmSettlementandClearingActivity}
*
*
* -
* {@linkplain com.tools20022.metamodel.MMTopLevelDictionaryEntry#getDataDictionary
* dataDictionary} =
* {@linkplain com.tools20022.repository.GeneratedRepository#mmdataDict
* GeneratedRepository.mmdataDict}
* - {@linkplain com.tools20022.metamodel.MMRepositoryConcept#getExample
* example} =
*
* - "BOLE"
*
*
* -
* {@linkplain com.tools20022.metamodel.MMRepositoryConcept#getRegistrationStatus
* registrationStatus} =
* com.tools20022.metamodel.MMRegistrationStatus.REGISTERED
* - {@linkplain com.tools20022.metamodel.MMRepositoryConcept#getName name} =
* "TransactionActivityCode"
* - {@linkplain com.tools20022.metamodel.MMRepositoryConcept#getDefinition
* definition} =
* "Specifies the type of activity to which this transaction relates."
*
*/
@XmlJavaTypeAdapter(InternalXmlAdapter.class)
public class TransactionActivityCode extends MMCode {
final static private AtomicReference mmObject_lazy = new AtomicReference<>();
/**
* Transaction relates to lending/borrowing.
*
* Constant fields:
*
* - {@linkplain com.tools20022.metamodel.MMCode#getOwner owner} =
* {@linkplain com.tools20022.repository.codeset.TransactionActivityCode
* TransactionActivityCode}
* - {@linkplain com.tools20022.metamodel.MMCode#getCodeName codeName} =
* "BOLE"
* -
* {@linkplain com.tools20022.metamodel.MMRepositoryConcept#getRegistrationStatus
* registrationStatus} =
* com.tools20022.metamodel.MMRegistrationStatus.PROVISIONALLY_REGISTERED
* - {@linkplain com.tools20022.metamodel.MMRepositoryConcept#getName
* name} = "BorrowingLendingActivity"
* -
* {@linkplain com.tools20022.metamodel.MMRepositoryConcept#getDefinition
* definition} = "Transaction relates to lending/borrowing."
*
*/
public static final TransactionActivityCode BorrowingLendingActivity = new TransactionActivityCode() {
{
registrationStatus = MMRegistrationStatus.PROVISIONALLY_REGISTERED;
name = "BorrowingLendingActivity";
definition = "Transaction relates to lending/borrowing.";
owner_lazy = () -> com.tools20022.repository.codeset.TransactionActivityCode.mmObject();
codeName = "BOLE";
}
};
/**
* Transaction relates to a market claim following a corporate action.
*
* Constant fields:
*
* - {@linkplain com.tools20022.metamodel.MMCode#getOwner owner} =
* {@linkplain com.tools20022.repository.codeset.TransactionActivityCode
* TransactionActivityCode}
* - {@linkplain com.tools20022.metamodel.MMCode#getCodeName codeName} =
* "CLAI"
* -
* {@linkplain com.tools20022.metamodel.MMRepositoryConcept#getRegistrationStatus
* registrationStatus} =
* com.tools20022.metamodel.MMRegistrationStatus.PROVISIONALLY_REGISTERED
* - {@linkplain com.tools20022.metamodel.MMRepositoryConcept#getName
* name} = "MarketClaim"
* -
* {@linkplain com.tools20022.metamodel.MMRepositoryConcept#getDefinition
* definition} =
* "Transaction relates to a market claim following a corporate action."
*
*/
public static final TransactionActivityCode MarketClaim = new TransactionActivityCode() {
{
registrationStatus = MMRegistrationStatus.PROVISIONALLY_REGISTERED;
name = "MarketClaim";
definition = "Transaction relates to a market claim following a corporate action.";
owner_lazy = () -> com.tools20022.repository.codeset.TransactionActivityCode.mmObject();
codeName = "CLAI";
}
};
/**
* Transaction relates to collateral.
*
* Constant fields:
*
* - {@linkplain com.tools20022.metamodel.MMCode#getOwner owner} =
* {@linkplain com.tools20022.repository.codeset.TransactionActivityCode
* TransactionActivityCode}
* - {@linkplain com.tools20022.metamodel.MMCode#getCodeName codeName} =
* "COLL"
* -
* {@linkplain com.tools20022.metamodel.MMRepositoryConcept#getRegistrationStatus
* registrationStatus} =
* com.tools20022.metamodel.MMRegistrationStatus.PROVISIONALLY_REGISTERED
* - {@linkplain com.tools20022.metamodel.MMRepositoryConcept#getName
* name} = "CollateralActivity"
* -
* {@linkplain com.tools20022.metamodel.MMRepositoryConcept#getDefinition
* definition} = "Transaction relates to collateral."
*
*/
public static final TransactionActivityCode CollateralActivity = new TransactionActivityCode() {
{
registrationStatus = MMRegistrationStatus.PROVISIONALLY_REGISTERED;
name = "CollateralActivity";
definition = "Transaction relates to collateral.";
owner_lazy = () -> com.tools20022.repository.codeset.TransactionActivityCode.mmObject();
codeName = "COLL";
}
};
/**
* Transaction relates to corporate action.
*
* Constant fields:
*
* - {@linkplain com.tools20022.metamodel.MMCode#getOwner owner} =
* {@linkplain com.tools20022.repository.codeset.TransactionActivityCode
* TransactionActivityCode}
* - {@linkplain com.tools20022.metamodel.MMCode#getCodeName codeName} =
* "CORP"
* -
* {@linkplain com.tools20022.metamodel.MMRepositoryConcept#getRegistrationStatus
* registrationStatus} =
* com.tools20022.metamodel.MMRegistrationStatus.PROVISIONALLY_REGISTERED
* - {@linkplain com.tools20022.metamodel.MMRepositoryConcept#getName
* name} = "CorporateActionActivity"
* -
* {@linkplain com.tools20022.metamodel.MMRepositoryConcept#getDefinition
* definition} = "Transaction relates to corporate action."
*
*/
public static final TransactionActivityCode CorporateActionActivity = new TransactionActivityCode() {
{
registrationStatus = MMRegistrationStatus.PROVISIONALLY_REGISTERED;
name = "CorporateActionActivity";
definition = "Transaction relates to corporate action.";
owner_lazy = () -> com.tools20022.repository.codeset.TransactionActivityCode.mmObject();
codeName = "CORP";
}
};
/**
* Transaction relates to settlement and clearing.
*
* Constant fields:
*
* - {@linkplain com.tools20022.metamodel.MMCode#getOwner owner} =
* {@linkplain com.tools20022.repository.codeset.TransactionActivityCode
* TransactionActivityCode}
* - {@linkplain com.tools20022.metamodel.MMCode#getCodeName codeName} =
* "SETT"
* -
* {@linkplain com.tools20022.metamodel.MMRepositoryConcept#getRegistrationStatus
* registrationStatus} =
* com.tools20022.metamodel.MMRegistrationStatus.PROVISIONALLY_REGISTERED
* - {@linkplain com.tools20022.metamodel.MMRepositoryConcept#getName
* name} = "SettlementandClearingActivity"
* -
* {@linkplain com.tools20022.metamodel.MMRepositoryConcept#getDefinition
* definition} = "Transaction relates to settlement and clearing."
*
*/
public static final TransactionActivityCode SettlementandClearingActivity = new TransactionActivityCode() {
{
registrationStatus = MMRegistrationStatus.PROVISIONALLY_REGISTERED;
name = "SettlementandClearingActivity";
definition = "Transaction relates to settlement and clearing.";
owner_lazy = () -> com.tools20022.repository.codeset.TransactionActivityCode.mmObject();
codeName = "SETT";
}
};
final static private LinkedHashMap codesByName = new LinkedHashMap<>();
protected TransactionActivityCode() {
}
final static public MMCodeSet mmObject() {
mmObject_lazy.compareAndSet(null, new MMCodeSet() {
{
dataDictionary_lazy = () -> GeneratedRepository.mmdataDict;
example = Arrays.asList("BOLE");
registrationStatus = MMRegistrationStatus.REGISTERED;
name = "TransactionActivityCode";
definition = "Specifies the type of activity to which this transaction relates.";
code_lazy = () -> Arrays.asList(com.tools20022.repository.codeset.TransactionActivityCode.BorrowingLendingActivity, com.tools20022.repository.codeset.TransactionActivityCode.MarketClaim,
com.tools20022.repository.codeset.TransactionActivityCode.CollateralActivity, com.tools20022.repository.codeset.TransactionActivityCode.CorporateActionActivity,
com.tools20022.repository.codeset.TransactionActivityCode.SettlementandClearingActivity);
}
});
return mmObject_lazy.get();
}
static {
codesByName.put(BorrowingLendingActivity.getCodeName().get(), BorrowingLendingActivity);
codesByName.put(MarketClaim.getCodeName().get(), MarketClaim);
codesByName.put(CollateralActivity.getCodeName().get(), CollateralActivity);
codesByName.put(CorporateActionActivity.getCodeName().get(), CorporateActionActivity);
codesByName.put(SettlementandClearingActivity.getCodeName().get(), SettlementandClearingActivity);
}
public static TransactionActivityCode valueOf(String codeName) {
return codesByName.get(codeName);
}
public static TransactionActivityCode[] values() {
TransactionActivityCode[] values = new TransactionActivityCode[codesByName.size()];
return codesByName.values().toArray(values);
}
protected static class InternalXmlAdapter extends XmlAdapter {
@Override
public TransactionActivityCode unmarshal(String codeName) {
return valueOf(codeName);
}
@Override
public String marshal(TransactionActivityCode codeObj) {
return codeObj.getCodeName().orElse(null);
}
}
}