All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.prowidesoftware.swift.model.mt.mt9xx.MT941 Maven / Gradle / Ivy

The newest version!
/* 
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * 
 * This library 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
 * Lesser General Public License for more details.
 * 
 */
package com.prowidesoftware.swift.model.mt.mt9xx;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.model.field.*;
import com.prowidesoftware.swift.model.mt.AbstractMT;

/**
 * MT 941

* * * NOTE: this source code has been generated from template * * @author www.prowidesoftware.com */ public class MT941 extends AbstractMT implements Serializable { private static final long serialVersionUID = 1L; private static transient final java.util.logging.Logger log = java.util.logging.Logger.getLogger(MT941.class.getName()); /** * Creates an MT941 initialized with the parameter SwiftMessage * @param m swift message with the MT941 content */ public MT941(SwiftMessage m) { super(m); } /** * Creates an MT941 initialized with a new SwiftMessage */ public MT941() { super(); } /** * Returns this MT number * @return the message type number of this MT * @since 6.4 */ @Override public String getMessageType() { return "941"; } /** * Iterates through block4 fields and return the first one whose name matches 20, * or null if none is found.
* The first occurrence of field 20 at MT941 is expected to be the only one. * * @return a Field20 object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field20 getField20() { if (getSwiftMessage() == null) { throw new IllegalStateException("SwiftMessage was not initialized"); } if (getSwiftMessage().getBlock4() == null) { log.info("block4 is null"); return null; } else { final Tag t = getSwiftMessage().getBlock4().getTagByName("20"); if (t == null) { log.fine("field 20 not found"); return null; } else { return new Field20(t.getValue()); } } } /** * Iterates through block4 fields and return the first one whose name matches 21, * or null if none is found.
* The first occurrence of field 21 at MT941 is expected to be the only one. * * @return a Field21 object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field21 getField21() { if (getSwiftMessage() == null) { throw new IllegalStateException("SwiftMessage was not initialized"); } if (getSwiftMessage().getBlock4() == null) { log.info("block4 is null"); return null; } else { final Tag t = getSwiftMessage().getBlock4().getTagByName("21"); if (t == null) { log.fine("field 21 not found"); return null; } else { return new Field21(t.getValue()); } } } /** * Iterates through block4 fields and return the first one whose name matches 25, * or null if none is found.
* The first occurrence of field 25 at MT941 is expected to be the only one. * * @return a Field25 object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field25 getField25() { if (getSwiftMessage() == null) { throw new IllegalStateException("SwiftMessage was not initialized"); } if (getSwiftMessage().getBlock4() == null) { log.info("block4 is null"); return null; } else { final Tag t = getSwiftMessage().getBlock4().getTagByName("25"); if (t == null) { log.fine("field 25 not found"); return null; } else { return new Field25(t.getValue()); } } } /** * Iterates through block4 fields and return the first one whose name matches 28, * or null if none is found.
* The first occurrence of field 28 at MT941 is expected to be the only one. * * @return a Field28 object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field28 getField28() { if (getSwiftMessage() == null) { throw new IllegalStateException("SwiftMessage was not initialized"); } if (getSwiftMessage().getBlock4() == null) { log.info("block4 is null"); return null; } else { final Tag t = getSwiftMessage().getBlock4().getTagByName("28"); if (t == null) { log.fine("field 28 not found"); return null; } else { return new Field28(t.getValue()); } } } /** * Iterates through block4 fields and return the first one whose name matches 13D, * or null if none is found.
* The first occurrence of field 13D at MT941 is expected to be the only one. * * @return a Field13D object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field13D getField13D() { if (getSwiftMessage() == null) { throw new IllegalStateException("SwiftMessage was not initialized"); } if (getSwiftMessage().getBlock4() == null) { log.info("block4 is null"); return null; } else { final Tag t = getSwiftMessage().getBlock4().getTagByName("13D"); if (t == null) { log.fine("field 13D not found"); return null; } else { return new Field13D(t.getValue()); } } } /** * Iterates through block4 fields and return the first one whose name matches 60F, * or null if none is found.
* The first occurrence of field 60F at MT941 is expected to be the only one. * * @return a Field60F object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field60F getField60F() { if (getSwiftMessage() == null) { throw new IllegalStateException("SwiftMessage was not initialized"); } if (getSwiftMessage().getBlock4() == null) { log.info("block4 is null"); return null; } else { final Tag t = getSwiftMessage().getBlock4().getTagByName("60F"); if (t == null) { log.fine("field 60F not found"); return null; } else { return new Field60F(t.getValue()); } } } /** * Iterates through block4 fields and return the first one whose name matches 90D, * or null if none is found.
* The first occurrence of field 90D at MT941 is expected to be the only one. * * @return a Field90D object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field90D getField90D() { if (getSwiftMessage() == null) { throw new IllegalStateException("SwiftMessage was not initialized"); } if (getSwiftMessage().getBlock4() == null) { log.info("block4 is null"); return null; } else { final Tag t = getSwiftMessage().getBlock4().getTagByName("90D"); if (t == null) { log.fine("field 90D not found"); return null; } else { return new Field90D(t.getValue()); } } } /** * Iterates through block4 fields and return the first one whose name matches 90C, * or null if none is found.
* The first occurrence of field 90C at MT941 is expected to be the only one. * * @return a Field90C object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field90C getField90C() { if (getSwiftMessage() == null) { throw new IllegalStateException("SwiftMessage was not initialized"); } if (getSwiftMessage().getBlock4() == null) { log.info("block4 is null"); return null; } else { final Tag t = getSwiftMessage().getBlock4().getTagByName("90C"); if (t == null) { log.fine("field 90C not found"); return null; } else { return new Field90C(t.getValue()); } } } /** * Iterates through block4 fields and return the first one whose name matches 62F, * or null if none is found.
* The first occurrence of field 62F at MT941 is expected to be the only one. * * @return a Field62F object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field62F getField62F() { if (getSwiftMessage() == null) { throw new IllegalStateException("SwiftMessage was not initialized"); } if (getSwiftMessage().getBlock4() == null) { log.info("block4 is null"); return null; } else { final Tag t = getSwiftMessage().getBlock4().getTagByName("62F"); if (t == null) { log.fine("field 62F not found"); return null; } else { return new Field62F(t.getValue()); } } } /** * Iterates through block4 fields and return the first one whose name matches 64, * or null if none is found.
* The first occurrence of field 64 at MT941 is expected to be the only one. * * @return a Field64 object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field64 getField64() { if (getSwiftMessage() == null) { throw new IllegalStateException("SwiftMessage was not initialized"); } if (getSwiftMessage().getBlock4() == null) { log.info("block4 is null"); return null; } else { final Tag t = getSwiftMessage().getBlock4().getTagByName("64"); if (t == null) { log.fine("field 64 not found"); return null; } else { return new Field64(t.getValue()); } } } /** * Iterates through block4 fields and return the first one whose name matches 86, * or null if none is found.
* The first occurrence of field 86 at MT941 is expected to be the only one. * * @return a Field86 object or null if the field is not found * @see SwiftTagListBlock#getTagByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public Field86 getField86() { if (getSwiftMessage() == null) { throw new IllegalStateException("SwiftMessage was not initialized"); } if (getSwiftMessage().getBlock4() == null) { log.info("block4 is null"); return null; } else { final Tag t = getSwiftMessage().getBlock4().getTagByName("86"); if (t == null) { log.fine("field 86 not found"); return null; } else { return new Field86(t.getValue()); } } } /** * Iterates through block4 fields and return all occurrences of fields whose names matches 65, * or Collections.emptyList() if none is found.
* Multiple occurrences of field 65 at MT941 are expected at one sequence or across several sequences. * * @return a List of Field65 objects or Collections.emptyList() if none is not found * @see SwiftTagListBlock#getTagsByName(String) * @throws IllegalStateException if SwiftMessage object is not initialized */ public List getField65() { if (getSwiftMessage() == null) { throw new IllegalStateException("SwiftMessage was not initialized"); } if (getSwiftMessage().getBlock4() == null) { log.info("block4 is null"); return Collections.emptyList(); } else { final Tag[] tags = getSwiftMessage().getBlock4().getTagsByName("65"); final List result = new ArrayList(); for (int i=0; i




© 2015 - 2025 Weber Informatics LLC | Privacy Policy