All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
io.ciera.tool.templateengine.ooaofooa.instanceaccess.impl.CreateNoVariableImpl Maven / Gradle / Ivy
package io.ciera.tool.templateengine.ooaofooa.instanceaccess.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.UniqueId;
import io.ciera.tool.TemplateEngine;
import io.ciera.tool.templateengine.ooaofooa.body.ACT_SMT;
import io.ciera.tool.templateengine.ooaofooa.body.impl.ACT_SMTImpl;
import io.ciera.tool.templateengine.ooaofooa.instanceaccess.CreateNoVariable;
import io.ciera.tool.templateengine.ooaofooa.subsystem.ModelClass;
import io.ciera.tool.templateengine.ooaofooa.subsystem.impl.ModelClassImpl;
public class CreateNoVariableImpl extends ModelInstance implements CreateNoVariable {
public static final String KEY_LETTERS = "ACT_CNV";
public static final CreateNoVariable EMPTY_CREATENOVARIABLE = new EmptyCreateNoVariable();
private TemplateEngine context;
// constructors
private CreateNoVariableImpl( TemplateEngine context ) {
this.context = context;
ref_Statement_ID = UniqueId.random();
ref_Obj_ID = UniqueId.random();
m_modelClassKeyLettersLineNumber = 0;
m_modelClassKeyLettersColumn = 0;
R603_is_a_ACT_SMT_inst = ACT_SMTImpl.EMPTY_ACT_SMT;
R672_instance_of_ModelClass_inst = ModelClassImpl.EMPTY_MODELCLASS;
}
private CreateNoVariableImpl( TemplateEngine context, UniqueId instanceId, UniqueId ref_Statement_ID, UniqueId ref_Obj_ID, int m_modelClassKeyLettersLineNumber, int m_modelClassKeyLettersColumn ) {
super(instanceId);
this.context = context;
this.ref_Statement_ID = ref_Statement_ID;
this.ref_Obj_ID = ref_Obj_ID;
this.m_modelClassKeyLettersLineNumber = m_modelClassKeyLettersLineNumber;
this.m_modelClassKeyLettersColumn = m_modelClassKeyLettersColumn;
R603_is_a_ACT_SMT_inst = ACT_SMTImpl.EMPTY_ACT_SMT;
R672_instance_of_ModelClass_inst = ModelClassImpl.EMPTY_MODELCLASS;
}
public static CreateNoVariable create( TemplateEngine context ) throws XtumlException {
CreateNoVariable newCreateNoVariable = new CreateNoVariableImpl( context );
if ( context.addInstance( newCreateNoVariable ) ) {
newCreateNoVariable.getRunContext().addChange(new InstanceCreatedDelta(newCreateNoVariable, KEY_LETTERS));
return newCreateNoVariable;
}
else throw new InstancePopulationException( "Instance already exists within this population." );
}
public static CreateNoVariable create( TemplateEngine context, UniqueId instanceId, UniqueId ref_Statement_ID, UniqueId ref_Obj_ID, int m_modelClassKeyLettersLineNumber, int m_modelClassKeyLettersColumn ) throws XtumlException {
CreateNoVariable newCreateNoVariable = new CreateNoVariableImpl( context, instanceId, ref_Statement_ID, ref_Obj_ID, m_modelClassKeyLettersLineNumber, m_modelClassKeyLettersColumn );
if ( context.addInstance( newCreateNoVariable ) ) {
return newCreateNoVariable;
}
else throw new InstancePopulationException( "Instance already exists within this population." );
}
// attributes
private UniqueId ref_Statement_ID;
@Override
public void setStatement_ID( UniqueId ref_Statement_ID ) throws XtumlException {
checkLiving();
if ( ref_Statement_ID.inequality( this.ref_Statement_ID ) ) {
final UniqueId oldValue = this.ref_Statement_ID;
this.ref_Statement_ID = ref_Statement_ID;
getRunContext().addChange(new AttributeChangedDelta(this, KEY_LETTERS, "ref_Statement_ID", oldValue, this.ref_Statement_ID));
}
}
@Override
public UniqueId getStatement_ID() throws XtumlException {
checkLiving();
return ref_Statement_ID;
}
private UniqueId ref_Obj_ID;
@Override
public void setObj_ID( UniqueId ref_Obj_ID ) throws XtumlException {
checkLiving();
if ( ref_Obj_ID.inequality( this.ref_Obj_ID ) ) {
final UniqueId oldValue = this.ref_Obj_ID;
this.ref_Obj_ID = ref_Obj_ID;
getRunContext().addChange(new AttributeChangedDelta(this, KEY_LETTERS, "ref_Obj_ID", oldValue, this.ref_Obj_ID));
}
}
@Override
public UniqueId getObj_ID() throws XtumlException {
checkLiving();
return ref_Obj_ID;
}
private int m_modelClassKeyLettersLineNumber;
@Override
public void setModelClassKeyLettersLineNumber( int m_modelClassKeyLettersLineNumber ) throws XtumlException {
checkLiving();
if ( m_modelClassKeyLettersLineNumber != this.m_modelClassKeyLettersLineNumber ) {
final int oldValue = this.m_modelClassKeyLettersLineNumber;
this.m_modelClassKeyLettersLineNumber = m_modelClassKeyLettersLineNumber;
getRunContext().addChange(new AttributeChangedDelta(this, KEY_LETTERS, "m_modelClassKeyLettersLineNumber", oldValue, this.m_modelClassKeyLettersLineNumber));
}
}
@Override
public int getModelClassKeyLettersLineNumber() throws XtumlException {
checkLiving();
return m_modelClassKeyLettersLineNumber;
}
private int m_modelClassKeyLettersColumn;
@Override
public int getModelClassKeyLettersColumn() throws XtumlException {
checkLiving();
return m_modelClassKeyLettersColumn;
}
@Override
public void setModelClassKeyLettersColumn( int m_modelClassKeyLettersColumn ) throws XtumlException {
checkLiving();
if ( m_modelClassKeyLettersColumn != this.m_modelClassKeyLettersColumn ) {
final int oldValue = this.m_modelClassKeyLettersColumn;
this.m_modelClassKeyLettersColumn = m_modelClassKeyLettersColumn;
getRunContext().addChange(new AttributeChangedDelta(this, KEY_LETTERS, "m_modelClassKeyLettersColumn", oldValue, this.m_modelClassKeyLettersColumn));
}
}
// instance identifiers
@Override
public IInstanceIdentifier getId1() {
try {
return new InstanceIdentifier(getStatement_ID());
}
catch ( XtumlException e ) {
getRunContext().getLog().error(e);
System.exit(1);
return null;
}
}
// operations
// static operations
// events
// selections
private ACT_SMT R603_is_a_ACT_SMT_inst;
@Override
public void setR603_is_a_ACT_SMT( ACT_SMT inst ) {
R603_is_a_ACT_SMT_inst = inst;
}
@Override
public ACT_SMT R603_is_a_ACT_SMT() throws XtumlException {
return R603_is_a_ACT_SMT_inst;
}
private ModelClass R672_instance_of_ModelClass_inst;
@Override
public void setR672_instance_of_ModelClass( ModelClass inst ) {
R672_instance_of_ModelClass_inst = inst;
}
@Override
public ModelClass R672_instance_of_ModelClass() throws XtumlException {
return R672_instance_of_ModelClass_inst;
}
@Override
public IRunContext getRunContext() {
return context().getRunContext();
}
@Override
public TemplateEngine context() {
return context;
}
@Override
public String getKeyLetters() {
return KEY_LETTERS;
}
@Override
public CreateNoVariable value() {
return this;
}
@Override
public CreateNoVariable self() {
return this;
}
@Override
public CreateNoVariable oneWhere( IWhere condition ) throws XtumlException {
if ( null == condition ) throw new XtumlException( "Null condition passed to selection." );
if ( condition.evaluate( value() ) ) return value();
else return EMPTY_CREATENOVARIABLE;
}
}
class EmptyCreateNoVariable extends ModelInstance implements CreateNoVariable {
// attributes
public void setStatement_ID( UniqueId ref_Statement_ID ) throws XtumlException {
throw new EmptyInstanceException( "Cannot set attribute of empty instance." );
}
public UniqueId getStatement_ID() throws XtumlException {
throw new EmptyInstanceException( "Cannot get attribute of empty instance." );
}
public void setObj_ID( UniqueId ref_Obj_ID ) throws XtumlException {
throw new EmptyInstanceException( "Cannot set attribute of empty instance." );
}
public UniqueId getObj_ID() throws XtumlException {
throw new EmptyInstanceException( "Cannot get attribute of empty instance." );
}
public void setModelClassKeyLettersLineNumber( int m_modelClassKeyLettersLineNumber ) throws XtumlException {
throw new EmptyInstanceException( "Cannot set attribute of empty instance." );
}
public int getModelClassKeyLettersLineNumber() throws XtumlException {
throw new EmptyInstanceException( "Cannot get attribute of empty instance." );
}
public int getModelClassKeyLettersColumn() throws XtumlException {
throw new EmptyInstanceException( "Cannot get attribute of empty instance." );
}
public void setModelClassKeyLettersColumn( int m_modelClassKeyLettersColumn ) throws XtumlException {
throw new EmptyInstanceException( "Cannot set attribute of empty instance." );
}
// operations
// selections
@Override
public ACT_SMT R603_is_a_ACT_SMT() {
return ACT_SMTImpl.EMPTY_ACT_SMT;
}
@Override
public ModelClass R672_instance_of_ModelClass() {
return ModelClassImpl.EMPTY_MODELCLASS;
}
@Override
public String getKeyLetters() {
return CreateNoVariableImpl.KEY_LETTERS;
}
@Override
public CreateNoVariable value() {
return this;
}
@Override
public CreateNoVariable self() {
return this;
}
@Override
public boolean isEmpty() {
return true;
}
@Override
public CreateNoVariable oneWhere( IWhere condition ) throws XtumlException {
if ( null == condition ) throw new XtumlException( "Null condition passed to selection." );
return CreateNoVariableImpl.EMPTY_CREATENOVARIABLE;
}
}