package Pixco.Framework.AssetManagement.Data.Codegen { import weborb.data.*; import Pixco.Framework.AssetManagement.Data.*; import mx.collections.ArrayCollection; import flash.utils.ByteArray; [Bindable] public dynamic class _ConversionSetConversion extends ActiveRecord { private var _uri:String = null; protected var _iD: int; protected var _sequence: int; protected var _createBy: int; protected var _createDate: Date; protected var _modifyBy: int; protected var _modifyDate: Date; // parent tables internal var _relatedConversion: Conversion = new Conversion() ; // parent tables internal var _relatedConversionSet: ConversionSet = new ConversionSet() ; public function get ID(): int { return _iD; } public function set ID(value:int):void { _isPrimaryKeyAffected = true; _uri = null; if(IsLoaded || IsLoading) { trace("Critical error: attempt to modify primary key in initialized object " + getURI()); return; } _iD = value; } public function get ConversionSetID(): int { if(_relatedConversionSet != null) return _relatedConversionSet.ID; return undefined; } protected function set ConversionSetID(value:int):void { if(_relatedConversionSet == null) _relatedConversionSet = new ConversionSet(); _relatedConversionSet.ID = value; } public function get ConversionID(): int { if(_relatedConversion != null) return _relatedConversion.ID; return undefined; } protected function set ConversionID(value:int):void { if(_relatedConversion == null) _relatedConversion = new Conversion(); _relatedConversion.ID = value; } public function get Sequence(): int { return _sequence; } public function set Sequence(value:int):void { _sequence = value; } public function get CreateBy(): int { return _createBy; } public function set CreateBy(value:int):void { _createBy = value; } public function get CreateDate(): Date { return _createDate; } public function set CreateDate(value:Date):void { _createDate = value; } public function get ModifyBy(): int { return _modifyBy; } public function set ModifyBy(value:int):void { _modifyBy = value; } public function get ModifyDate(): Date { return _modifyDate; } public function set ModifyDate(value:Date):void { _modifyDate = value; } public function get RelatedConversion():Conversion { if(IsLoaded && !(_relatedConversion.IsLoaded || _relatedConversion.IsLoading)) { _relatedConversion = DataMapperRegistry.Instance.Conversion.load(_relatedConversion); onParentChanged(_relatedConversion); } return _relatedConversion; } public function set RelatedConversion(value:Conversion):void { if( value != null ) { _relatedConversion = Conversion(IdentityMap.register( value )); onParentChanged(_relatedConversion); } else _relatedConversion = null; } public function get RelatedConversionSet():ConversionSet { if(IsLoaded && !(_relatedConversionSet.IsLoaded || _relatedConversionSet.IsLoading)) { _relatedConversionSet = DataMapperRegistry.Instance.ConversionSet.load(_relatedConversionSet); onParentChanged(_relatedConversionSet); } return _relatedConversionSet; } public function set RelatedConversionSet(value:ConversionSet):void { if( value != null ) { _relatedConversionSet = ConversionSet(IdentityMap.register( value )); onParentChanged(_relatedConversionSet); } else _relatedConversionSet = null; } protected override function onDirtyChanged():void { if(RelatedConversion != null) RelatedConversion.onChildChanged(this); if(RelatedConversionSet != null) RelatedConversionSet.onChildChanged(this); } public override function extractRelevant(cascade:Boolean = false):Object { var object:ConversionSetConversion = new ConversionSetConversion(); object.ID = this.ID; object.ConversionSetID = this.ConversionSetID; object.ConversionID = this.ConversionID; object.Sequence = this.Sequence; object.CreateBy = this.CreateBy; object.CreateDate = this.CreateDate; object.ModifyBy = this.ModifyBy; object.ModifyDate = this.ModifyDate; object.ActiveRecordId = this.ActiveRecordId; return object; } public override function applyFields(object:Object):void { if(!IsPrimaryKeyInitialized) ID = object["ID"]; Sequence = object["Sequence"]; CreateBy = object["CreateBy"]; CreateDate = object["CreateDate"]; ModifyBy = object["ModifyBy"]; ModifyDate = object["ModifyDate"]; RelatedConversion = object.RelatedConversion; RelatedConversionSet = object.RelatedConversionSet; _uri = null; _isPrimaryKeyAffected = true; IsDirty = false; } protected override function get dataMapper():DataMapper { return DataMapperRegistry.Instance.ConversionSetConversion; } public override function getURI():String { if(_uri == null) { _uri = "AMF_dev.ConversionSetConversion" + "." + ID.toString() ; } return _uri; } } }