
io.ciera.tool.sql.ooaofooa.value.impl.MessageValueImpl Maven / Gradle / Ivy
package io.ciera.tool.sql.ooaofooa.value.impl;
import io.ciera.runtime.instanceloading.AttributeChangedDelta;
import io.ciera.runtime.instanceloading.InstanceCreatedDelta;
import io.ciera.runtime.summit.application.IRunContext;
import io.ciera.runtime.summit.classes.IInstanceIdentifier;
import io.ciera.runtime.summit.classes.InstanceIdentifier;
import io.ciera.runtime.summit.classes.ModelInstance;
import io.ciera.runtime.summit.exceptions.EmptyInstanceException;
import io.ciera.runtime.summit.exceptions.InstancePopulationException;
import io.ciera.runtime.summit.exceptions.XtumlException;
import io.ciera.runtime.summit.types.IWhere;
import io.ciera.runtime.summit.types.IXtumlType;
import io.ciera.runtime.summit.types.UniqueId;
import io.ciera.tool.Sql;
import io.ciera.tool.sql.ooaofooa.component.signalprovisionsandrequirements.ProvidedExecutableProperty;
import io.ciera.tool.sql.ooaofooa.component.signalprovisionsandrequirements.RequiredExecutableProperty;
import io.ciera.tool.sql.ooaofooa.component.signalprovisionsandrequirements.impl.ProvidedExecutablePropertyImpl;
import io.ciera.tool.sql.ooaofooa.component.signalprovisionsandrequirements.impl.RequiredExecutablePropertyImpl;
import io.ciera.tool.sql.ooaofooa.value.MessageValue;
import io.ciera.tool.sql.ooaofooa.value.V_PAR;
import io.ciera.tool.sql.ooaofooa.value.V_PARSet;
import io.ciera.tool.sql.ooaofooa.value.Value;
import io.ciera.tool.sql.ooaofooa.value.impl.V_PARSetImpl;
import io.ciera.tool.sql.ooaofooa.value.impl.ValueImpl;
public class MessageValueImpl extends ModelInstance implements MessageValue {
public static final String KEY_LETTERS = "V_MSV";
public static final MessageValue EMPTY_MESSAGEVALUE = new EmptyMessageValue();
private Sql context;
// constructors
private MessageValueImpl( Sql context ) {
this.context = context;
ref_Value_ID = UniqueId.random();
ref_PEP_Id = UniqueId.random();
ref_REP_Id = UniqueId.random();
m_ParmListOK = false;
m_ownerNameLineNumber = 0;
m_ownerNameColumn = 0;
ref_Target_Value_ID = UniqueId.random();
R801_is_a_Value_inst = ValueImpl.EMPTY_VALUE;
R841_ProvidedExecutableProperty_inst = ProvidedExecutablePropertyImpl.EMPTY_PROVIDEDEXECUTABLEPROPERTY;
R842_has_V_PAR_set = new V_PARSetImpl();
R845_RequiredExecutableProperty_inst = RequiredExecutablePropertyImpl.EMPTY_REQUIREDEXECUTABLEPROPERTY;
R851_has_target_Value_inst = ValueImpl.EMPTY_VALUE;
}
private MessageValueImpl( Sql context, UniqueId instanceId, UniqueId ref_Value_ID, UniqueId ref_PEP_Id, UniqueId ref_REP_Id, boolean m_ParmListOK, int m_ownerNameLineNumber, int m_ownerNameColumn, UniqueId ref_Target_Value_ID ) {
super(instanceId);
this.context = context;
this.ref_Value_ID = ref_Value_ID;
this.ref_PEP_Id = ref_PEP_Id;
this.ref_REP_Id = ref_REP_Id;
this.m_ParmListOK = m_ParmListOK;
this.m_ownerNameLineNumber = m_ownerNameLineNumber;
this.m_ownerNameColumn = m_ownerNameColumn;
this.ref_Target_Value_ID = ref_Target_Value_ID;
R801_is_a_Value_inst = ValueImpl.EMPTY_VALUE;
R841_ProvidedExecutableProperty_inst = ProvidedExecutablePropertyImpl.EMPTY_PROVIDEDEXECUTABLEPROPERTY;
R842_has_V_PAR_set = new V_PARSetImpl();
R845_RequiredExecutableProperty_inst = RequiredExecutablePropertyImpl.EMPTY_REQUIREDEXECUTABLEPROPERTY;
R851_has_target_Value_inst = ValueImpl.EMPTY_VALUE;
}
public static MessageValue create( Sql context ) throws XtumlException {
MessageValue newMessageValue = new MessageValueImpl( context );
if ( context.addInstance( newMessageValue ) ) {
newMessageValue.getRunContext().addChange(new InstanceCreatedDelta(newMessageValue, KEY_LETTERS));
return newMessageValue;
}
else throw new InstancePopulationException( "Instance already exists within this population." );
}
public static MessageValue create( Sql context, UniqueId ref_Value_ID, UniqueId ref_PEP_Id, UniqueId ref_REP_Id, boolean m_ParmListOK, int m_ownerNameLineNumber, int m_ownerNameColumn, UniqueId ref_Target_Value_ID ) throws XtumlException {
return create(context, UniqueId.random(), ref_Value_ID, ref_PEP_Id, ref_REP_Id, m_ParmListOK, m_ownerNameLineNumber, m_ownerNameColumn, ref_Target_Value_ID);
}
public static MessageValue create( Sql context, UniqueId instanceId, UniqueId ref_Value_ID, UniqueId ref_PEP_Id, UniqueId ref_REP_Id, boolean m_ParmListOK, int m_ownerNameLineNumber, int m_ownerNameColumn, UniqueId ref_Target_Value_ID ) throws XtumlException {
MessageValue newMessageValue = new MessageValueImpl( context, instanceId, ref_Value_ID, ref_PEP_Id, ref_REP_Id, m_ParmListOK, m_ownerNameLineNumber, m_ownerNameColumn, ref_Target_Value_ID );
if ( context.addInstance( newMessageValue ) ) {
return newMessageValue;
}
else throw new InstancePopulationException( "Instance already exists within this population." );
}
// attributes
private UniqueId ref_Value_ID;
@Override
public UniqueId getValue_ID() throws XtumlException {
checkLiving();
return ref_Value_ID;
}
@Override
public void setValue_ID(UniqueId ref_Value_ID) throws XtumlException {
checkLiving();
if (ref_Value_ID.inequality( this.ref_Value_ID)) {
final UniqueId oldValue = this.ref_Value_ID;
this.ref_Value_ID = ref_Value_ID;
getRunContext().addChange(new AttributeChangedDelta(this, KEY_LETTERS, "ref_Value_ID", oldValue, this.ref_Value_ID));
if ( !R842_has_V_PAR().isEmpty() ) R842_has_V_PAR().setInvocation_Value_ID( ref_Value_ID );
}
}
private UniqueId ref_PEP_Id;
@Override
public void setPEP_Id(UniqueId ref_PEP_Id) throws XtumlException {
checkLiving();
if (ref_PEP_Id.inequality( this.ref_PEP_Id)) {
final UniqueId oldValue = this.ref_PEP_Id;
this.ref_PEP_Id = ref_PEP_Id;
getRunContext().addChange(new AttributeChangedDelta(this, KEY_LETTERS, "ref_PEP_Id", oldValue, this.ref_PEP_Id));
}
}
@Override
public UniqueId getPEP_Id() throws XtumlException {
checkLiving();
return ref_PEP_Id;
}
private UniqueId ref_REP_Id;
@Override
public void setREP_Id(UniqueId ref_REP_Id) throws XtumlException {
checkLiving();
if (ref_REP_Id.inequality( this.ref_REP_Id)) {
final UniqueId oldValue = this.ref_REP_Id;
this.ref_REP_Id = ref_REP_Id;
getRunContext().addChange(new AttributeChangedDelta(this, KEY_LETTERS, "ref_REP_Id", oldValue, this.ref_REP_Id));
}
}
@Override
public UniqueId getREP_Id() throws XtumlException {
checkLiving();
return ref_REP_Id;
}
private boolean m_ParmListOK;
@Override
public void setParmListOK(boolean m_ParmListOK) throws XtumlException {
checkLiving();
if (m_ParmListOK != this.m_ParmListOK) {
final boolean oldValue = this.m_ParmListOK;
this.m_ParmListOK = m_ParmListOK;
getRunContext().addChange(new AttributeChangedDelta(this, KEY_LETTERS, "m_ParmListOK", oldValue, this.m_ParmListOK));
}
}
@Override
public boolean getParmListOK() throws XtumlException {
checkLiving();
return m_ParmListOK;
}
private int m_ownerNameLineNumber;
@Override
public void setOwnerNameLineNumber(int m_ownerNameLineNumber) throws XtumlException {
checkLiving();
if (m_ownerNameLineNumber != this.m_ownerNameLineNumber) {
final int oldValue = this.m_ownerNameLineNumber;
this.m_ownerNameLineNumber = m_ownerNameLineNumber;
getRunContext().addChange(new AttributeChangedDelta(this, KEY_LETTERS, "m_ownerNameLineNumber", oldValue, this.m_ownerNameLineNumber));
}
}
@Override
public int getOwnerNameLineNumber() throws XtumlException {
checkLiving();
return m_ownerNameLineNumber;
}
private int m_ownerNameColumn;
@Override
public void setOwnerNameColumn(int m_ownerNameColumn) throws XtumlException {
checkLiving();
if (m_ownerNameColumn != this.m_ownerNameColumn) {
final int oldValue = this.m_ownerNameColumn;
this.m_ownerNameColumn = m_ownerNameColumn;
getRunContext().addChange(new AttributeChangedDelta(this, KEY_LETTERS, "m_ownerNameColumn", oldValue, this.m_ownerNameColumn));
}
}
@Override
public int getOwnerNameColumn() throws XtumlException {
checkLiving();
return m_ownerNameColumn;
}
private UniqueId ref_Target_Value_ID;
@Override
public void setTarget_Value_ID(UniqueId ref_Target_Value_ID) throws XtumlException {
checkLiving();
if (ref_Target_Value_ID.inequality( this.ref_Target_Value_ID)) {
final UniqueId oldValue = this.ref_Target_Value_ID;
this.ref_Target_Value_ID = ref_Target_Value_ID;
getRunContext().addChange(new AttributeChangedDelta(this, KEY_LETTERS, "ref_Target_Value_ID", oldValue, this.ref_Target_Value_ID));
}
}
@Override
public UniqueId getTarget_Value_ID() throws XtumlException {
checkLiving();
return ref_Target_Value_ID;
}
// instance identifiers
@Override
public IInstanceIdentifier getId1() {
try {
return new InstanceIdentifier(getValue_ID());
}
catch ( XtumlException e ) {
getRunContext().getLog().error(e);
System.exit(1);
return null;
}
}
// operations
// static operations
// events
// selections
private Value R801_is_a_Value_inst;
@Override
public void setR801_is_a_Value( Value inst ) {
R801_is_a_Value_inst = inst;
}
@Override
public Value R801_is_a_Value() throws XtumlException {
return R801_is_a_Value_inst;
}
private ProvidedExecutableProperty R841_ProvidedExecutableProperty_inst;
@Override
public void setR841_ProvidedExecutableProperty( ProvidedExecutableProperty inst ) {
R841_ProvidedExecutableProperty_inst = inst;
}
@Override
public ProvidedExecutableProperty R841_ProvidedExecutableProperty() throws XtumlException {
return R841_ProvidedExecutableProperty_inst;
}
private V_PARSet R842_has_V_PAR_set;
@Override
public void addR842_has_V_PAR( V_PAR inst ) {
R842_has_V_PAR_set.add(inst);
}
@Override
public void removeR842_has_V_PAR( V_PAR inst ) {
R842_has_V_PAR_set.remove(inst);
}
@Override
public V_PARSet R842_has_V_PAR() throws XtumlException {
return R842_has_V_PAR_set;
}
private RequiredExecutableProperty R845_RequiredExecutableProperty_inst;
@Override
public void setR845_RequiredExecutableProperty( RequiredExecutableProperty inst ) {
R845_RequiredExecutableProperty_inst = inst;
}
@Override
public RequiredExecutableProperty R845_RequiredExecutableProperty() throws XtumlException {
return R845_RequiredExecutableProperty_inst;
}
private Value R851_has_target_Value_inst;
@Override
public void setR851_has_target_Value( Value inst ) {
R851_has_target_Value_inst = inst;
}
@Override
public Value R851_has_target_Value() throws XtumlException {
return R851_has_target_Value_inst;
}
@Override
public IRunContext getRunContext() {
return context().getRunContext();
}
@Override
public Sql context() {
return context;
}
@Override
public String getKeyLetters() {
return KEY_LETTERS;
}
@Override
public MessageValue self() {
return this;
}
@Override
public MessageValue oneWhere(IWhere condition) throws XtumlException {
if (null == condition) throw new XtumlException("Null condition passed to selection.");
if (condition.evaluate(this)) return this;
else return EMPTY_MESSAGEVALUE;
}
}
class EmptyMessageValue extends ModelInstance implements MessageValue {
// attributes
public UniqueId getValue_ID() throws XtumlException {
throw new EmptyInstanceException( "Cannot get attribute of empty instance." );
}
public void setValue_ID( UniqueId ref_Value_ID ) throws XtumlException {
throw new EmptyInstanceException( "Cannot set attribute of empty instance." );
}
public void setPEP_Id( UniqueId ref_PEP_Id ) throws XtumlException {
throw new EmptyInstanceException( "Cannot set attribute of empty instance." );
}
public UniqueId getPEP_Id() throws XtumlException {
throw new EmptyInstanceException( "Cannot get attribute of empty instance." );
}
public void setREP_Id( UniqueId ref_REP_Id ) throws XtumlException {
throw new EmptyInstanceException( "Cannot set attribute of empty instance." );
}
public UniqueId getREP_Id() throws XtumlException {
throw new EmptyInstanceException( "Cannot get attribute of empty instance." );
}
public void setParmListOK( boolean m_ParmListOK ) throws XtumlException {
throw new EmptyInstanceException( "Cannot set attribute of empty instance." );
}
public boolean getParmListOK() throws XtumlException {
throw new EmptyInstanceException( "Cannot get attribute of empty instance." );
}
public void setOwnerNameLineNumber( int m_ownerNameLineNumber ) throws XtumlException {
throw new EmptyInstanceException( "Cannot set attribute of empty instance." );
}
public int getOwnerNameLineNumber() throws XtumlException {
throw new EmptyInstanceException( "Cannot get attribute of empty instance." );
}
public void setOwnerNameColumn( int m_ownerNameColumn ) throws XtumlException {
throw new EmptyInstanceException( "Cannot set attribute of empty instance." );
}
public int getOwnerNameColumn() throws XtumlException {
throw new EmptyInstanceException( "Cannot get attribute of empty instance." );
}
public void setTarget_Value_ID( UniqueId ref_Target_Value_ID ) throws XtumlException {
throw new EmptyInstanceException( "Cannot set attribute of empty instance." );
}
public UniqueId getTarget_Value_ID() throws XtumlException {
throw new EmptyInstanceException( "Cannot get attribute of empty instance." );
}
// operations
// selections
@Override
public Value R801_is_a_Value() {
return ValueImpl.EMPTY_VALUE;
}
@Override
public ProvidedExecutableProperty R841_ProvidedExecutableProperty() {
return ProvidedExecutablePropertyImpl.EMPTY_PROVIDEDEXECUTABLEPROPERTY;
}
@Override
public V_PARSet R842_has_V_PAR() {
return (new V_PARSetImpl());
}
@Override
public RequiredExecutableProperty R845_RequiredExecutableProperty() {
return RequiredExecutablePropertyImpl.EMPTY_REQUIREDEXECUTABLEPROPERTY;
}
@Override
public Value R851_has_target_Value() {
return ValueImpl.EMPTY_VALUE;
}
@Override
public String getKeyLetters() {
return MessageValueImpl.KEY_LETTERS;
}
@Override
public MessageValue self() {
return this;
}
@Override
public boolean isEmpty() {
return true;
}
@Override
public MessageValue oneWhere(IWhere condition) throws XtumlException {
if (null == condition) throw new XtumlException("Null condition passed to selection.");
return MessageValueImpl.EMPTY_MESSAGEVALUE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy