/* Generated by JSDAI Express Compiler, version 3.5, build 225, 2003-04-23 */

// Java class implementing entity first_entity

package jsdai.SExample_1;
import jsdai.lang.*;

public class CFirst_entity extends CEntity implements EFirst_entity {
	public static final jsdai.dictionary.CEntity_definition definition = initEntityDefinition(CFirst_entity.class, SExample_1.ss);

	/*----------------------------- Attributes -----------*/

	protected int a0; // attr_1 - current entity - INTEGER
	protected static final jsdai.dictionary.CExplicit_attribute a0$ = CEntity.initExplicitAttribute(definition, 0);

	public jsdai.dictionary.EEntity_definition getInstanceType() {
		return definition;
	}

	protected void changeReferences(InverseEntity old, InverseEntity newer) throws SdaiException {
	}

	/*----------- Methods for attribute access -----------*/

	/// methods for attribute: attr_1, base type: INTEGER
	public boolean testAttr_1(EFirst_entity type) throws SdaiException {
		return test_integer(a0);
	}
	public int getAttr_1(EFirst_entity type) throws SdaiException {
		return get_integer(a0);
	}
	public void setAttr_1(EFirst_entity type, int value) throws SdaiException {
		a0 = set_integer(value);
	}
	public void unsetAttr_1(EFirst_entity type) throws SdaiException {
		a0 = unset_integer();
	}
	public static jsdai.dictionary.EAttribute attributeAttr_1(EFirst_entity type) throws SdaiException {
		return a0$;
	}


	/*---------------------- setAll() --------------------*/

	protected void setAll(ComplexEntityValue av) throws SdaiException {
		if (av == null) {
			a0 = Integer.MIN_VALUE;
			return;
		}
		a0 = av.entityValues[0].getInteger(0);
	}

	/*---------------------- getAll() --------------------*/

	protected void getAll(ComplexEntityValue av) throws SdaiException {
		// partial entity: first_entity
		av.entityValues[0].setInteger(0, a0);
	}
}
