
io.ciera.tool.sql.ooaofooa.component.signalprovisionsandrequirements.impl.ProvidedExecutablePropertyImpl Maven / Gradle / Ivy
package io.ciera.tool.sql.ooaofooa.component.signalprovisionsandrequirements.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.ExecutableProperty;
import io.ciera.tool.sql.ooaofooa.component.Provision;
import io.ciera.tool.sql.ooaofooa.component.impl.ExecutablePropertyImpl;
import io.ciera.tool.sql.ooaofooa.component.impl.ProvisionImpl;
import io.ciera.tool.sql.ooaofooa.component.signalprovisionsandrequirements.ProvidedExecutableProperty;
import io.ciera.tool.sql.ooaofooa.component.signalprovisionsandrequirements.ProvidedOperation;
import io.ciera.tool.sql.ooaofooa.component.signalprovisionsandrequirements.ProvidedSignal;
import io.ciera.tool.sql.ooaofooa.component.signalprovisionsandrequirements.impl.ProvidedOperationImpl;
import io.ciera.tool.sql.ooaofooa.component.signalprovisionsandrequirements.impl.ProvidedSignalImpl;
import io.ciera.tool.sql.ooaofooa.value.MessageValue;
import io.ciera.tool.sql.ooaofooa.value.MessageValueSet;
import io.ciera.tool.sql.ooaofooa.value.impl.MessageValueSetImpl;
public class ProvidedExecutablePropertyImpl extends ModelInstance implements ProvidedExecutableProperty {
public static final String KEY_LETTERS = "SPR_PEP";
public static final ProvidedExecutableProperty EMPTY_PROVIDEDEXECUTABLEPROPERTY = new EmptyProvidedExecutableProperty();
private Sql context;
// constructors
private ProvidedExecutablePropertyImpl( Sql context ) {
this.context = context;
m_Id = UniqueId.random();
ref_ExecutableProperty_Id = UniqueId.random();
ref_Provision_Id = UniqueId.random();
R4501_implements_ExecutableProperty_inst = ExecutablePropertyImpl.EMPTY_EXECUTABLEPROPERTY;
R4501_is_implemented_by_Provision_inst = ProvisionImpl.EMPTY_PROVISION;
R4503_is_a_ProvidedOperation_inst = ProvidedOperationImpl.EMPTY_PROVIDEDOPERATION;
R4503_is_a_ProvidedSignal_inst = ProvidedSignalImpl.EMPTY_PROVIDEDSIGNAL;
R841_MessageValue_set = new MessageValueSetImpl();
}
private ProvidedExecutablePropertyImpl( Sql context, UniqueId instanceId, UniqueId m_Id, UniqueId ref_ExecutableProperty_Id, UniqueId ref_Provision_Id ) {
super(instanceId);
this.context = context;
this.m_Id = m_Id;
this.ref_ExecutableProperty_Id = ref_ExecutableProperty_Id;
this.ref_Provision_Id = ref_Provision_Id;
R4501_implements_ExecutableProperty_inst = ExecutablePropertyImpl.EMPTY_EXECUTABLEPROPERTY;
R4501_is_implemented_by_Provision_inst = ProvisionImpl.EMPTY_PROVISION;
R4503_is_a_ProvidedOperation_inst = ProvidedOperationImpl.EMPTY_PROVIDEDOPERATION;
R4503_is_a_ProvidedSignal_inst = ProvidedSignalImpl.EMPTY_PROVIDEDSIGNAL;
R841_MessageValue_set = new MessageValueSetImpl();
}
public static ProvidedExecutableProperty create( Sql context ) throws XtumlException {
ProvidedExecutableProperty newProvidedExecutableProperty = new ProvidedExecutablePropertyImpl( context );
if ( context.addInstance( newProvidedExecutableProperty ) ) {
newProvidedExecutableProperty.getRunContext().addChange(new InstanceCreatedDelta(newProvidedExecutableProperty, KEY_LETTERS));
return newProvidedExecutableProperty;
}
else throw new InstancePopulationException( "Instance already exists within this population." );
}
public static ProvidedExecutableProperty create( Sql context, UniqueId m_Id, UniqueId ref_ExecutableProperty_Id, UniqueId ref_Provision_Id ) throws XtumlException {
return create(context, UniqueId.random(), m_Id, ref_ExecutableProperty_Id, ref_Provision_Id);
}
public static ProvidedExecutableProperty create( Sql context, UniqueId instanceId, UniqueId m_Id, UniqueId ref_ExecutableProperty_Id, UniqueId ref_Provision_Id ) throws XtumlException {
ProvidedExecutableProperty newProvidedExecutableProperty = new ProvidedExecutablePropertyImpl( context, instanceId, m_Id, ref_ExecutableProperty_Id, ref_Provision_Id );
if ( context.addInstance( newProvidedExecutableProperty ) ) {
return newProvidedExecutableProperty;
}
else throw new InstancePopulationException( "Instance already exists within this population." );
}
// attributes
private UniqueId m_Id;
@Override
public UniqueId getId() throws XtumlException {
checkLiving();
return m_Id;
}
@Override
public void setId(UniqueId m_Id) throws XtumlException {
checkLiving();
if (m_Id.inequality( this.m_Id)) {
final UniqueId oldValue = this.m_Id;
this.m_Id = m_Id;
getRunContext().addChange(new AttributeChangedDelta(this, KEY_LETTERS, "m_Id", oldValue, this.m_Id));
if ( !R841_MessageValue().isEmpty() ) R841_MessageValue().setPEP_Id( m_Id );
if ( !R4503_is_a_ProvidedSignal().isEmpty() ) R4503_is_a_ProvidedSignal().setId( m_Id );
if ( !R4503_is_a_ProvidedOperation().isEmpty() ) R4503_is_a_ProvidedOperation().setId( m_Id );
}
}
private UniqueId ref_ExecutableProperty_Id;
@Override
public void setExecutableProperty_Id(UniqueId ref_ExecutableProperty_Id) throws XtumlException {
checkLiving();
if (ref_ExecutableProperty_Id.inequality( this.ref_ExecutableProperty_Id)) {
final UniqueId oldValue = this.ref_ExecutableProperty_Id;
this.ref_ExecutableProperty_Id = ref_ExecutableProperty_Id;
getRunContext().addChange(new AttributeChangedDelta(this, KEY_LETTERS, "ref_ExecutableProperty_Id", oldValue, this.ref_ExecutableProperty_Id));
}
}
@Override
public UniqueId getExecutableProperty_Id() throws XtumlException {
checkLiving();
return ref_ExecutableProperty_Id;
}
private UniqueId ref_Provision_Id;
@Override
public void setProvision_Id(UniqueId ref_Provision_Id) throws XtumlException {
checkLiving();
if (ref_Provision_Id.inequality( this.ref_Provision_Id)) {
final UniqueId oldValue = this.ref_Provision_Id;
this.ref_Provision_Id = ref_Provision_Id;
getRunContext().addChange(new AttributeChangedDelta(this, KEY_LETTERS, "ref_Provision_Id", oldValue, this.ref_Provision_Id));
}
}
@Override
public UniqueId getProvision_Id() throws XtumlException {
checkLiving();
return ref_Provision_Id;
}
// instance identifiers
@Override
public IInstanceIdentifier getId1() {
try {
return new InstanceIdentifier(getId());
}
catch ( XtumlException e ) {
getRunContext().getLog().error(e);
System.exit(1);
return null;
}
}
// operations
// static operations
// events
// selections
private ExecutableProperty R4501_implements_ExecutableProperty_inst;
@Override
public void setR4501_implements_ExecutableProperty( ExecutableProperty inst ) {
R4501_implements_ExecutableProperty_inst = inst;
}
@Override
public ExecutableProperty R4501_implements_ExecutableProperty() throws XtumlException {
return R4501_implements_ExecutableProperty_inst;
}
private Provision R4501_is_implemented_by_Provision_inst;
@Override
public void setR4501_is_implemented_by_Provision( Provision inst ) {
R4501_is_implemented_by_Provision_inst = inst;
}
@Override
public Provision R4501_is_implemented_by_Provision() throws XtumlException {
return R4501_is_implemented_by_Provision_inst;
}
private ProvidedOperation R4503_is_a_ProvidedOperation_inst;
@Override
public void setR4503_is_a_ProvidedOperation( ProvidedOperation inst ) {
R4503_is_a_ProvidedOperation_inst = inst;
}
@Override
public ProvidedOperation R4503_is_a_ProvidedOperation() throws XtumlException {
return R4503_is_a_ProvidedOperation_inst;
}
private ProvidedSignal R4503_is_a_ProvidedSignal_inst;
@Override
public void setR4503_is_a_ProvidedSignal( ProvidedSignal inst ) {
R4503_is_a_ProvidedSignal_inst = inst;
}
@Override
public ProvidedSignal R4503_is_a_ProvidedSignal() throws XtumlException {
return R4503_is_a_ProvidedSignal_inst;
}
private MessageValueSet R841_MessageValue_set;
@Override
public void addR841_MessageValue( MessageValue inst ) {
R841_MessageValue_set.add(inst);
}
@Override
public void removeR841_MessageValue( MessageValue inst ) {
R841_MessageValue_set.remove(inst);
}
@Override
public MessageValueSet R841_MessageValue() throws XtumlException {
return R841_MessageValue_set;
}
@Override
public IRunContext getRunContext() {
return context().getRunContext();
}
@Override
public Sql context() {
return context;
}
@Override
public String getKeyLetters() {
return KEY_LETTERS;
}
@Override
public ProvidedExecutableProperty self() {
return this;
}
@Override
public ProvidedExecutableProperty 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_PROVIDEDEXECUTABLEPROPERTY;
}
}
class EmptyProvidedExecutableProperty extends ModelInstance implements ProvidedExecutableProperty {
// attributes
public UniqueId getId() throws XtumlException {
throw new EmptyInstanceException( "Cannot get attribute of empty instance." );
}
public void setId( UniqueId m_Id ) throws XtumlException {
throw new EmptyInstanceException( "Cannot set attribute of empty instance." );
}
public void setExecutableProperty_Id( UniqueId ref_ExecutableProperty_Id ) throws XtumlException {
throw new EmptyInstanceException( "Cannot set attribute of empty instance." );
}
public UniqueId getExecutableProperty_Id() throws XtumlException {
throw new EmptyInstanceException( "Cannot get attribute of empty instance." );
}
public void setProvision_Id( UniqueId ref_Provision_Id ) throws XtumlException {
throw new EmptyInstanceException( "Cannot set attribute of empty instance." );
}
public UniqueId getProvision_Id() throws XtumlException {
throw new EmptyInstanceException( "Cannot get attribute of empty instance." );
}
// operations
// selections
@Override
public ExecutableProperty R4501_implements_ExecutableProperty() {
return ExecutablePropertyImpl.EMPTY_EXECUTABLEPROPERTY;
}
@Override
public Provision R4501_is_implemented_by_Provision() {
return ProvisionImpl.EMPTY_PROVISION;
}
@Override
public ProvidedOperation R4503_is_a_ProvidedOperation() {
return ProvidedOperationImpl.EMPTY_PROVIDEDOPERATION;
}
@Override
public ProvidedSignal R4503_is_a_ProvidedSignal() {
return ProvidedSignalImpl.EMPTY_PROVIDEDSIGNAL;
}
@Override
public MessageValueSet R841_MessageValue() {
return (new MessageValueSetImpl());
}
@Override
public String getKeyLetters() {
return ProvidedExecutablePropertyImpl.KEY_LETTERS;
}
@Override
public ProvidedExecutableProperty self() {
return this;
}
@Override
public boolean isEmpty() {
return true;
}
@Override
public ProvidedExecutableProperty oneWhere(IWhere condition) throws XtumlException {
if (null == condition) throw new XtumlException("Null condition passed to selection.");
return ProvidedExecutablePropertyImpl.EMPTY_PROVIDEDEXECUTABLEPROPERTY;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy