com.exactpro.sf.messages.testaml.Instrument Maven / Gradle / Ivy
/******************************************************************************
* Copyright 2009-2018 Exactpro (Exactpro Systems Limited)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
******************************************************************************/
package com.exactpro.sf.messages.testaml;
import com.exactpro.sf.common.impl.messages.DefaultMessageFactory;
import com.exactpro.sf.common.impl.messages.BaseMessage;
import com.exactpro.sf.common.messages.IMessageFactory;
import com.exactpro.sf.common.messages.IMessage;
import com.exactpro.sf.common.messages.FieldNotFoundException;
import com.exactpro.sf.aml.scriptutil.StaticUtil.IFilter;
import java.time.LocalDateTime;
import java.time.LocalDate;
import java.time.LocalTime;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.lang.Deprecated;
@SuppressWarnings("unused")
public class Instrument extends BaseMessage
{
public static final String MESSAGE_NAME = "Instrument";
public Instrument(IMessageFactory messageFactory)
{
this(messageFactory.createMessage(MESSAGE_NAME, (messageFactory.getNamespace() == null) ? "TestAML" : messageFactory.getNamespace()));
}
/**
* @deprecated Please use {@link #Instrument(IMessageFactory)}
*/
@Deprecated
public Instrument()
{
this(DefaultMessageFactory.getFactory());
}
/**
* @deprecated Please use {@link #Instrument(IMessageFactory)}
*/
@Deprecated
public Instrument(String name, String namespace)
{
super(DefaultMessageFactory.getFactory().createMessage(name, namespace));
}
public Instrument(IMessage msg)
{
super(msg);
}
@Override
public Instrument clone() {
return (Instrument)super.clone();
}
public Instrument setSymbol(String value)
{
this.msg.addField("Symbol", value);
return this;
}
public String getSymbol()
{
Object value = this.msg.getField("Symbol");
return (String)value;
}
public Object getUntypedSymbol()
{
return this.msg.getField("Symbol");
}
public IFilter getSymbolFilter()
{
return this.msg.getField("Symbol");
}
public Instrument setSymbolFilter(IFilter filter)
{
this.msg.addField("Symbol", filter);
return this;
}
public Instrument removeSymbol()
{
this.msg.removeField("Symbol");
return this;
}
public boolean isSetSymbol()
{
return this.msg.getField("Symbol") != null;
}
public boolean isFilterSymbol()
{
return this.msg.getField("Symbol") instanceof IFilter;
}
public Instrument setSecurityID(String value)
{
this.msg.addField("SecurityID", value);
return this;
}
public String getSecurityID()
{
Object value = this.msg.getField("SecurityID");
return (String)value;
}
public Object getUntypedSecurityID()
{
return this.msg.getField("SecurityID");
}
public IFilter getSecurityIDFilter()
{
return this.msg.getField("SecurityID");
}
public Instrument setSecurityIDFilter(IFilter filter)
{
this.msg.addField("SecurityID", filter);
return this;
}
public Instrument removeSecurityID()
{
this.msg.removeField("SecurityID");
return this;
}
public boolean isSetSecurityID()
{
return this.msg.getField("SecurityID") != null;
}
public boolean isFilterSecurityID()
{
return this.msg.getField("SecurityID") instanceof IFilter;
}
public Instrument setSecurityIDSource(String value)
{
this.msg.addField("SecurityIDSource", value);
return this;
}
public String getSecurityIDSource()
{
Object value = this.msg.getField("SecurityIDSource");
return (String)value;
}
public Object getUntypedSecurityIDSource()
{
return this.msg.getField("SecurityIDSource");
}
public IFilter getSecurityIDSourceFilter()
{
return this.msg.getField("SecurityIDSource");
}
public Instrument setSecurityIDSourceFilter(IFilter filter)
{
this.msg.addField("SecurityIDSource", filter);
return this;
}
public Instrument removeSecurityIDSource()
{
this.msg.removeField("SecurityIDSource");
return this;
}
public boolean isSetSecurityIDSource()
{
return this.msg.getField("SecurityIDSource") != null;
}
public boolean isFilterSecurityIDSource()
{
return this.msg.getField("SecurityIDSource") instanceof IFilter;
}
public Instrument addNoSecurityAltID(com.exactpro.sf.messages.testaml.Instrument_NoSecurityAltID value)
{
List list = this.msg.>getField("NoSecurityAltID");
if(list == null){
list = new ArrayList();
this.msg.addField("NoSecurityAltID" ,list);
}
list.add(value.getMessage());
return this;
}
public List getNoSecurityAltID()
{
List value = this.msg.>getField("NoSecurityAltID");
if(value == null)
{
throw new FieldNotFoundException(" NoSecurityAltID ");
}
List list = new ArrayList();
for( IMessage element : value )
{
list.add(new com.exactpro.sf.messages.testaml.Instrument_NoSecurityAltID((IMessage)element));
}
return list;
}
public IFilter getNoSecurityAltIDFilter()
{
return this.msg.getField("NoSecurityAltID");
}
public Instrument setNoSecurityAltIDFilter(IFilter filter)
{
this.msg.addField("NoSecurityAltID", filter);
return this;
}
public Instrument removeNoSecurityAltID()
{
this.msg.removeField("NoSecurityAltID");
return this;
}
public boolean isSetNoSecurityAltID()
{
return this.msg.getField("NoSecurityAltID") != null;
}
public boolean isFilterNoSecurityAltID()
{
return this.msg.getField("NoSecurityAltID") instanceof IFilter;
}
}