com.prowidesoftware.swift.model.mt.mt7xx.MT792 Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of wife Show documentation
Show all versions of wife Show documentation
Prowide Core Libraries for SWIFT (TM) messages
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.mt7xx;
import java.io.Serializable;
import com.prowidesoftware.swift.model.*;
import com.prowidesoftware.swift.model.field.*;
import com.prowidesoftware.swift.model.mt.AbstractMT;
/**
* MT 792
*
*
* NOTE: this source code has been generated from template
*
* @author www.prowidesoftware.com
*/
public class MT792 extends AbstractMT implements Serializable {
private static final long serialVersionUID = 1L;
private static transient final java.util.logging.Logger log = java.util.logging.Logger.getLogger(MT792.class.getName());
/**
* Creates an MT792 initialized with the parameter SwiftMessage
* @param m swift message with the MT792 content
*/
public MT792(SwiftMessage m) {
super(m);
}
/**
* Creates an MT792 initialized with a new SwiftMessage
*/
public MT792() {
super();
}
/**
* Returns this MT number
* @return the message type number of this MT
* @since 6.4
*/
@Override
public String getMessageType() {
return "792";
}
/**
* 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 MT792 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 MT792 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 11S,
* or null
if none is found.
* The first occurrence of field 11S at MT792 is expected to be the only one.
*
* @return a Field11S object or null
if the field is not found
* @see SwiftTagListBlock#getTagByName(String)
* @throws IllegalStateException if SwiftMessage object is not initialized
*/
public Field11S getField11S() {
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("11S");
if (t == null) {
log.fine("field 11S not found");
return null;
} else {
return new Field11S(t.getValue());
}
}
}
/**
* Iterates through block4 fields and return the first one whose name matches 79,
* or null
if none is found.
* The first occurrence of field 79 at MT792 is expected to be the only one.
*
* @return a Field79 object or null
if the field is not found
* @see SwiftTagListBlock#getTagByName(String)
* @throws IllegalStateException if SwiftMessage object is not initialized
*/
public Field79 getField79() {
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("79");
if (t == null) {
log.fine("field 79 not found");
return null;
} else {
return new Field79(t.getValue());
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy