package app.vo { import mx.collections.ArrayCollection; [Bindable] public class UserGroup extends NamedEntity { public var ownerId:int; public var groupType:String; public var owner:User; public var members:ArrayCollection; public var memberCount:int; public var bikeCount:int; public var rideCount:int; public var totalTimeElapsed:int; public var totalMileage:Number; public var averageSpeed:Number; public function UserGroup(state:*=null) { super(state); } public override function initialize(state:*):void { super.initialize(state); if (state != null) { this.ownerId = state.ownerId; this.groupType = state.groupType; if (state.hasOwnProperty("memberCount")) { this.memberCount = state.memberCount; } if (state.hasOwnProperty("bikeCount")) { this.bikeCount = state.bikeCount; } if (state.hasOwnProperty("rideCount")) { this.rideCount = state.rideCount; } if (state.hasOwnProperty("totalMileage")) { this.totalMileage = state.totalMileage; } if (state.hasOwnProperty("averageSpeed")) { this.averageSpeed = state.averageSpeed; } if (state.hasOwnProperty("totalTimeElapsed")) { this.totalTimeElapsed = state.totalTimeElapsed; } } } } }