| //////////////////////////////////////////////////////////////////////////////// |
| // |
| // Licensed to the Apache Software Foundation (ASF) under one or more |
| // contributor license agreements. See the NOTICE file distributed with |
| // this work for additional information regarding copyright ownership. |
| // The ASF licenses this file to You under the Apache License, Version 2.0 |
| // (the "License"); you may not use this file except in compliance with |
| // the License. You may obtain a copy of the License at |
| // |
| // http://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, software |
| // distributed under the License is distributed on an "AS IS" BASIS, |
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| // See the License for the specific language governing permissions and |
| // limitations under the License. |
| // |
| //////////////////////////////////////////////////////////////////////////////// |
|
|
| /**
|
| * This is a generated class and is not intended for modification.
|
| */
|
| package valueObjects
|
| {
|
| import com.adobe.fiber.styles.IStyle;
|
| import com.adobe.fiber.styles.Style;
|
| import com.adobe.fiber.styles.StyleValidator;
|
| import com.adobe.fiber.valueobjects.AbstractEntityMetadata;
|
| import com.adobe.fiber.valueobjects.AvailablePropertyIterator;
|
| import com.adobe.fiber.valueobjects.IPropertyIterator;
|
| import mx.events.ValidationResultEvent;
|
| import com.adobe.fiber.core.model_internal;
|
| import com.adobe.fiber.valueobjects.IModelType;
|
| import mx.events.PropertyChangeEvent;
|
|
|
| use namespace model_internal;
|
|
|
| [ExcludeClass]
|
| internal class _DepartmentEntityMetadata extends com.adobe.fiber.valueobjects.AbstractEntityMetadata
|
| {
|
| private static var emptyArray:Array = new Array();
|
|
|
| model_internal static var allProperties:Array = new Array("businessunit", "budget", "manager", "actualcontractors", "actualsalary", "esttravel", "estcontractors", "actualexpenses", "id", "estsalary", "actualsupplies", "name", "costcenter", "actualtravel", "estsupplies");
|
| model_internal static var allAssociationProperties:Array = new Array();
|
| model_internal static var allRequiredProperties:Array = new Array("businessunit", "budget", "manager", "actualcontractors", "actualsalary", "esttravel", "estcontractors", "actualexpenses", "id", "estsalary", "actualsupplies", "name", "costcenter", "actualtravel", "estsupplies");
|
| model_internal static var allAlwaysAvailableProperties:Array = new Array("businessunit", "budget", "manager", "actualcontractors", "actualsalary", "esttravel", "estcontractors", "actualexpenses", "id", "estsalary", "actualsupplies", "name", "costcenter", "actualtravel", "estsupplies");
|
| model_internal static var guardedProperties:Array = new Array();
|
| model_internal static var dataProperties:Array = new Array("businessunit", "budget", "manager", "actualcontractors", "actualsalary", "esttravel", "estcontractors", "actualexpenses", "id", "estsalary", "actualsupplies", "name", "costcenter", "actualtravel", "estsupplies");
|
| model_internal static var sourceProperties:Array = emptyArray
|
| model_internal static var nonDerivedProperties:Array = new Array("businessunit", "budget", "manager", "actualcontractors", "actualsalary", "esttravel", "estcontractors", "actualexpenses", "id", "estsalary", "actualsupplies", "name", "costcenter", "actualtravel", "estsupplies");
|
| model_internal static var derivedProperties:Array = new Array();
|
| model_internal static var collectionProperties:Array = new Array();
|
| model_internal static var collectionBaseMap:Object;
|
| model_internal static var entityName:String = "Department";
|
| model_internal static var dependentsOnMap:Object;
|
| model_internal static var dependedOnServices:Array = new Array();
|
| model_internal static var propertyTypeMap:Object;
|
|
|
|
|
| model_internal var _businessunitIsValid:Boolean;
|
| model_internal var _businessunitValidator:com.adobe.fiber.styles.StyleValidator;
|
| model_internal var _businessunitIsValidCacheInitialized:Boolean = false;
|
| model_internal var _businessunitValidationFailureMessages:Array;
|
|
|
| model_internal var _managerIsValid:Boolean;
|
| model_internal var _managerValidator:com.adobe.fiber.styles.StyleValidator;
|
| model_internal var _managerIsValidCacheInitialized:Boolean = false;
|
| model_internal var _managerValidationFailureMessages:Array;
|
|
|
| model_internal var _nameIsValid:Boolean;
|
| model_internal var _nameValidator:com.adobe.fiber.styles.StyleValidator;
|
| model_internal var _nameIsValidCacheInitialized:Boolean = false;
|
| model_internal var _nameValidationFailureMessages:Array;
|
|
|
| model_internal var _instance:_Super_Department;
|
| model_internal static var _nullStyle:com.adobe.fiber.styles.Style = new com.adobe.fiber.styles.Style();
|
|
|
| public function _DepartmentEntityMetadata(value : _Super_Department)
|
| {
|
| // initialize property maps
|
| if (model_internal::dependentsOnMap == null)
|
| {
|
| // dependents map
|
| model_internal::dependentsOnMap = new Object();
|
| model_internal::dependentsOnMap["businessunit"] = new Array();
|
| model_internal::dependentsOnMap["budget"] = new Array();
|
| model_internal::dependentsOnMap["manager"] = new Array();
|
| model_internal::dependentsOnMap["actualcontractors"] = new Array();
|
| model_internal::dependentsOnMap["actualsalary"] = new Array();
|
| model_internal::dependentsOnMap["esttravel"] = new Array();
|
| model_internal::dependentsOnMap["estcontractors"] = new Array();
|
| model_internal::dependentsOnMap["actualexpenses"] = new Array();
|
| model_internal::dependentsOnMap["id"] = new Array();
|
| model_internal::dependentsOnMap["estsalary"] = new Array();
|
| model_internal::dependentsOnMap["actualsupplies"] = new Array();
|
| model_internal::dependentsOnMap["name"] = new Array();
|
| model_internal::dependentsOnMap["costcenter"] = new Array();
|
| model_internal::dependentsOnMap["actualtravel"] = new Array();
|
| model_internal::dependentsOnMap["estsupplies"] = new Array();
|
|
|
| // collection base map
|
| model_internal::collectionBaseMap = new Object();
|
| }
|
|
|
| // Property type Map
|
| model_internal::propertyTypeMap = new Object();
|
| model_internal::propertyTypeMap["businessunit"] = "String";
|
| model_internal::propertyTypeMap["budget"] = "int";
|
| model_internal::propertyTypeMap["manager"] = "String";
|
| model_internal::propertyTypeMap["actualcontractors"] = "int";
|
| model_internal::propertyTypeMap["actualsalary"] = "int";
|
| model_internal::propertyTypeMap["esttravel"] = "int";
|
| model_internal::propertyTypeMap["estcontractors"] = "int";
|
| model_internal::propertyTypeMap["actualexpenses"] = "int";
|
| model_internal::propertyTypeMap["id"] = "int";
|
| model_internal::propertyTypeMap["estsalary"] = "int";
|
| model_internal::propertyTypeMap["actualsupplies"] = "int";
|
| model_internal::propertyTypeMap["name"] = "String";
|
| model_internal::propertyTypeMap["costcenter"] = "int";
|
| model_internal::propertyTypeMap["actualtravel"] = "int";
|
| model_internal::propertyTypeMap["estsupplies"] = "int";
|
|
|
| model_internal::_instance = value;
|
| model_internal::_businessunitValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForBusinessunit);
|
| model_internal::_businessunitValidator.required = true;
|
| model_internal::_businessunitValidator.requiredFieldError = "businessunit is required";
|
| //model_internal::_businessunitValidator.source = model_internal::_instance;
|
| //model_internal::_businessunitValidator.property = "businessunit";
|
| model_internal::_managerValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForManager);
|
| model_internal::_managerValidator.required = true;
|
| model_internal::_managerValidator.requiredFieldError = "manager is required";
|
| //model_internal::_managerValidator.source = model_internal::_instance;
|
| //model_internal::_managerValidator.property = "manager";
|
| model_internal::_nameValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForName);
|
| model_internal::_nameValidator.required = true;
|
| model_internal::_nameValidator.requiredFieldError = "name is required";
|
| //model_internal::_nameValidator.source = model_internal::_instance;
|
| //model_internal::_nameValidator.property = "name";
|
| }
|
|
|
| override public function getEntityName():String
|
| {
|
| return model_internal::entityName;
|
| }
|
|
|
| override public function getProperties():Array
|
| {
|
| return model_internal::allProperties;
|
| }
|
|
|
| override public function getAssociationProperties():Array
|
| {
|
| return model_internal::allAssociationProperties;
|
| }
|
|
|
| override public function getRequiredProperties():Array
|
| {
|
| return model_internal::allRequiredProperties;
|
| }
|
|
|
| override public function getDataProperties():Array
|
| {
|
| return model_internal::dataProperties;
|
| }
|
|
|
| public function getSourceProperties():Array
|
| {
|
| return model_internal::sourceProperties;
|
| }
|
|
|
| public function getNonDerivedProperties():Array
|
| {
|
| return model_internal::nonDerivedProperties;
|
| }
|
|
|
| override public function getGuardedProperties():Array
|
| {
|
| return model_internal::guardedProperties;
|
| }
|
|
|
| override public function getUnguardedProperties():Array
|
| {
|
| return model_internal::allAlwaysAvailableProperties;
|
| }
|
|
|
| override public function getDependants(propertyName:String):Array
|
| {
|
| if (model_internal::nonDerivedProperties.indexOf(propertyName) == -1)
|
| throw new Error(propertyName + " is not a data property of entity Department");
|
|
|
| return model_internal::dependentsOnMap[propertyName] as Array;
|
| }
|
|
|
| override public function getDependedOnServices():Array
|
| {
|
| return model_internal::dependedOnServices;
|
| }
|
|
|
| override public function getCollectionProperties():Array
|
| {
|
| return model_internal::collectionProperties;
|
| }
|
|
|
| override public function getCollectionBase(propertyName:String):String
|
| {
|
| if (model_internal::collectionProperties.indexOf(propertyName) == -1)
|
| throw new Error(propertyName + " is not a collection property of entity Department");
|
|
|
| return model_internal::collectionBaseMap[propertyName];
|
| }
|
|
|
| override public function getPropertyType(propertyName:String):String
|
| {
|
| if (model_internal::allProperties.indexOf(propertyName) == -1)
|
| throw new Error(propertyName + " is not a property of Department");
|
|
|
| return model_internal::propertyTypeMap[propertyName];
|
| }
|
|
|
| override public function getAvailableProperties():com.adobe.fiber.valueobjects.IPropertyIterator
|
| {
|
| return new com.adobe.fiber.valueobjects.AvailablePropertyIterator(this);
|
| }
|
|
|
| override public function getValue(propertyName:String):*
|
| {
|
| if (model_internal::allProperties.indexOf(propertyName) == -1)
|
| {
|
| throw new Error(propertyName + " does not exist for entity Department");
|
| }
|
|
|
| return model_internal::_instance[propertyName];
|
| }
|
|
|
| override public function setValue(propertyName:String, value:*):void
|
| {
|
| if (model_internal::nonDerivedProperties.indexOf(propertyName) == -1)
|
| {
|
| throw new Error(propertyName + " is not a modifiable property of entity Department");
|
| }
|
|
|
| model_internal::_instance[propertyName] = value;
|
| }
|
|
|
| override public function getMappedByProperty(associationProperty:String):String
|
| {
|
| switch(associationProperty)
|
| {
|
| default:
|
| {
|
| return null;
|
| }
|
| }
|
| }
|
|
|
| override public function getPropertyLength(propertyName:String):int
|
| {
|
| switch(propertyName)
|
| {
|
| default:
|
| {
|
| return 0;
|
| }
|
| }
|
| }
|
|
|
| override public function isAvailable(propertyName:String):Boolean
|
| {
|
| if (model_internal::allProperties.indexOf(propertyName) == -1)
|
| {
|
| throw new Error(propertyName + " does not exist for entity Department");
|
| }
|
|
|
| if (model_internal::allAlwaysAvailableProperties.indexOf(propertyName) != -1)
|
| {
|
| return true;
|
| }
|
|
|
| switch(propertyName)
|
| {
|
| default:
|
| {
|
| return true;
|
| }
|
| }
|
| }
|
|
|
| override public function getIdentityMap():Object
|
| {
|
| var returnMap:Object = new Object();
|
|
|
| return returnMap;
|
| }
|
|
|
| [Bindable(event="propertyChange")]
|
| override public function get invalidConstraints():Array
|
| {
|
| if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
|
| {
|
| return model_internal::_instance.model_internal::_invalidConstraints;
|
| }
|
| else
|
| {
|
| // recalculate isValid
|
| model_internal::_instance.model_internal::_isValid = model_internal::_instance.model_internal::calculateIsValid();
|
| return model_internal::_instance.model_internal::_invalidConstraints;
|
| }
|
| }
|
|
|
| [Bindable(event="propertyChange")]
|
| override public function get validationFailureMessages():Array
|
| {
|
| if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
|
| {
|
| return model_internal::_instance.model_internal::_validationFailureMessages;
|
| }
|
| else
|
| {
|
| // recalculate isValid
|
| model_internal::_instance.model_internal::_isValid = model_internal::_instance.model_internal::calculateIsValid();
|
| return model_internal::_instance.model_internal::_validationFailureMessages;
|
| }
|
| }
|
|
|
| override public function getDependantInvalidConstraints(propertyName:String):Array
|
| {
|
| var dependants:Array = getDependants(propertyName);
|
| if (dependants.length == 0)
|
| {
|
| return emptyArray;
|
| }
|
|
|
| var currentlyInvalid:Array = invalidConstraints;
|
| if (currentlyInvalid.length == 0)
|
| {
|
| return emptyArray;
|
| }
|
|
|
| var filterFunc:Function = function(element:*, index:int, arr:Array):Boolean
|
| {
|
| return dependants.indexOf(element) > -1;
|
| }
|
|
|
| return currentlyInvalid.filter(filterFunc);
|
| }
|
|
|
| /**
|
| * isValid
|
| */
|
| [Bindable(event="propertyChange")]
|
| public function get isValid() : Boolean
|
| {
|
| if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
|
| {
|
| return model_internal::_instance.model_internal::_isValid;
|
| }
|
| else
|
| {
|
| // recalculate isValid
|
| model_internal::_instance.model_internal::_isValid = model_internal::_instance.model_internal::calculateIsValid();
|
| return model_internal::_instance.model_internal::_isValid;
|
| }
|
| }
|
|
|
| [Bindable(event="propertyChange")]
|
| public function get isBusinessunitAvailable():Boolean
|
| {
|
| return true;
|
| }
|
|
|
| [Bindable(event="propertyChange")]
|
| public function get isBudgetAvailable():Boolean
|
| {
|
| return true;
|
| }
|
|
|
| [Bindable(event="propertyChange")]
|
| public function get isManagerAvailable():Boolean
|
| {
|
| return true;
|
| }
|
|
|
| [Bindable(event="propertyChange")]
|
| public function get isActualcontractorsAvailable():Boolean
|
| {
|
| return true;
|
| }
|
|
|
| [Bindable(event="propertyChange")]
|
| public function get isActualsalaryAvailable():Boolean
|
| {
|
| return true;
|
| }
|
|
|
| [Bindable(event="propertyChange")]
|
| public function get isEsttravelAvailable():Boolean
|
| {
|
| return true;
|
| }
|
|
|
| [Bindable(event="propertyChange")]
|
| public function get isEstcontractorsAvailable():Boolean
|
| {
|
| return true;
|
| }
|
|
|
| [Bindable(event="propertyChange")]
|
| public function get isActualexpensesAvailable():Boolean
|
| {
|
| return true;
|
| }
|
|
|
| [Bindable(event="propertyChange")]
|
| public function get isIdAvailable():Boolean
|
| {
|
| return true;
|
| }
|
|
|
| [Bindable(event="propertyChange")]
|
| public function get isEstsalaryAvailable():Boolean
|
| {
|
| return true;
|
| }
|
|
|
| [Bindable(event="propertyChange")]
|
| public function get isActualsuppliesAvailable():Boolean
|
| {
|
| return true;
|
| }
|
|
|
| [Bindable(event="propertyChange")]
|
| public function get isNameAvailable():Boolean
|
| {
|
| return true;
|
| }
|
|
|
| [Bindable(event="propertyChange")]
|
| public function get isCostcenterAvailable():Boolean
|
| {
|
| return true;
|
| }
|
|
|
| [Bindable(event="propertyChange")]
|
| public function get isActualtravelAvailable():Boolean
|
| {
|
| return true;
|
| }
|
|
|
| [Bindable(event="propertyChange")]
|
| public function get isEstsuppliesAvailable():Boolean
|
| {
|
| return true;
|
| }
|
|
|
|
|
| /**
|
| * derived property recalculation
|
| */
|
| public function invalidateDependentOnBusinessunit():void
|
| {
|
| if (model_internal::_businessunitIsValidCacheInitialized )
|
| {
|
| model_internal::_instance.model_internal::_doValidationCacheOfBusinessunit = null;
|
| model_internal::calculateBusinessunitIsValid();
|
| }
|
| }
|
| public function invalidateDependentOnManager():void
|
| {
|
| if (model_internal::_managerIsValidCacheInitialized )
|
| {
|
| model_internal::_instance.model_internal::_doValidationCacheOfManager = null;
|
| model_internal::calculateManagerIsValid();
|
| }
|
| }
|
| public function invalidateDependentOnName():void
|
| {
|
| if (model_internal::_nameIsValidCacheInitialized )
|
| {
|
| model_internal::_instance.model_internal::_doValidationCacheOfName = null;
|
| model_internal::calculateNameIsValid();
|
| }
|
| }
|
|
|
| model_internal function fireChangeEvent(propertyName:String, oldValue:Object, newValue:Object):void
|
| {
|
| this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, propertyName, oldValue, newValue));
|
| }
|
|
|
| [Bindable(event="propertyChange")]
|
| public function get businessunitStyle():com.adobe.fiber.styles.Style
|
| {
|
| return model_internal::_nullStyle;
|
| }
|
|
|
| public function get businessunitValidator() : StyleValidator
|
| {
|
| return model_internal::_businessunitValidator;
|
| }
|
|
|
| model_internal function set _businessunitIsValid_der(value:Boolean):void
|
| {
|
| var oldValue:Boolean = model_internal::_businessunitIsValid;
|
| if (oldValue !== value)
|
| {
|
| model_internal::_businessunitIsValid = value;
|
| this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "businessunitIsValid", oldValue, value));
|
| }
|
| }
|
|
|
| [Bindable(event="propertyChange")]
|
| public function get businessunitIsValid():Boolean
|
| {
|
| if (!model_internal::_businessunitIsValidCacheInitialized)
|
| {
|
| model_internal::calculateBusinessunitIsValid();
|
| }
|
|
|
| return model_internal::_businessunitIsValid;
|
| }
|
|
|
| model_internal function calculateBusinessunitIsValid():void
|
| {
|
| var valRes:ValidationResultEvent = model_internal::_businessunitValidator.validate(model_internal::_instance.businessunit)
|
| model_internal::_businessunitIsValid_der = (valRes.results == null);
|
| model_internal::_businessunitIsValidCacheInitialized = true;
|
| if (valRes.results == null)
|
| model_internal::businessunitValidationFailureMessages_der = emptyArray;
|
| else
|
| {
|
| var _valFailures:Array = new Array();
|
| for (var a:int = 0 ; a<valRes.results.length ; a++)
|
| {
|
| _valFailures.push(valRes.results[a].errorMessage);
|
| }
|
| model_internal::businessunitValidationFailureMessages_der = _valFailures;
|
| }
|
| }
|
|
|
| [Bindable(event="propertyChange")]
|
| public function get businessunitValidationFailureMessages():Array
|
| {
|
| if (model_internal::_businessunitValidationFailureMessages == null)
|
| model_internal::calculateBusinessunitIsValid();
|
|
|
| return _businessunitValidationFailureMessages;
|
| }
|
|
|
| model_internal function set businessunitValidationFailureMessages_der(value:Array) : void
|
| {
|
| var oldValue:Array = model_internal::_businessunitValidationFailureMessages;
|
|
|
| var needUpdate : Boolean = false;
|
| if (oldValue == null)
|
| needUpdate = true;
|
|
|
| // avoid firing the event when old and new value are different empty arrays
|
| if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
|
| {
|
| if (oldValue.length == value.length)
|
| {
|
| for (var a:int=0; a < oldValue.length; a++)
|
| {
|
| if (oldValue[a] !== value[a])
|
| {
|
| needUpdate = true;
|
| break;
|
| }
|
| }
|
| }
|
| else
|
| {
|
| needUpdate = true;
|
| }
|
| }
|
|
|
| if (needUpdate)
|
| {
|
| model_internal::_businessunitValidationFailureMessages = value;
|
| this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "businessunitValidationFailureMessages", oldValue, value));
|
| // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
|
| // the entire entity.
|
| if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
|
| {
|
| model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
|
| }
|
| }
|
| }
|
|
|
| [Bindable(event="propertyChange")]
|
| public function get budgetStyle():com.adobe.fiber.styles.Style
|
| {
|
| return model_internal::_nullStyle;
|
| }
|
|
|
| [Bindable(event="propertyChange")]
|
| public function get managerStyle():com.adobe.fiber.styles.Style
|
| {
|
| return model_internal::_nullStyle;
|
| }
|
|
|
| public function get managerValidator() : StyleValidator
|
| {
|
| return model_internal::_managerValidator;
|
| }
|
|
|
| model_internal function set _managerIsValid_der(value:Boolean):void
|
| {
|
| var oldValue:Boolean = model_internal::_managerIsValid;
|
| if (oldValue !== value)
|
| {
|
| model_internal::_managerIsValid = value;
|
| this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "managerIsValid", oldValue, value));
|
| }
|
| }
|
|
|
| [Bindable(event="propertyChange")]
|
| public function get managerIsValid():Boolean
|
| {
|
| if (!model_internal::_managerIsValidCacheInitialized)
|
| {
|
| model_internal::calculateManagerIsValid();
|
| }
|
|
|
| return model_internal::_managerIsValid;
|
| }
|
|
|
| model_internal function calculateManagerIsValid():void
|
| {
|
| var valRes:ValidationResultEvent = model_internal::_managerValidator.validate(model_internal::_instance.manager)
|
| model_internal::_managerIsValid_der = (valRes.results == null);
|
| model_internal::_managerIsValidCacheInitialized = true;
|
| if (valRes.results == null)
|
| model_internal::managerValidationFailureMessages_der = emptyArray;
|
| else
|
| {
|
| var _valFailures:Array = new Array();
|
| for (var a:int = 0 ; a<valRes.results.length ; a++)
|
| {
|
| _valFailures.push(valRes.results[a].errorMessage);
|
| }
|
| model_internal::managerValidationFailureMessages_der = _valFailures;
|
| }
|
| }
|
|
|
| [Bindable(event="propertyChange")]
|
| public function get managerValidationFailureMessages():Array
|
| {
|
| if (model_internal::_managerValidationFailureMessages == null)
|
| model_internal::calculateManagerIsValid();
|
|
|
| return _managerValidationFailureMessages;
|
| }
|
|
|
| model_internal function set managerValidationFailureMessages_der(value:Array) : void
|
| {
|
| var oldValue:Array = model_internal::_managerValidationFailureMessages;
|
|
|
| var needUpdate : Boolean = false;
|
| if (oldValue == null)
|
| needUpdate = true;
|
|
|
| // avoid firing the event when old and new value are different empty arrays
|
| if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
|
| {
|
| if (oldValue.length == value.length)
|
| {
|
| for (var a:int=0; a < oldValue.length; a++)
|
| {
|
| if (oldValue[a] !== value[a])
|
| {
|
| needUpdate = true;
|
| break;
|
| }
|
| }
|
| }
|
| else
|
| {
|
| needUpdate = true;
|
| }
|
| }
|
|
|
| if (needUpdate)
|
| {
|
| model_internal::_managerValidationFailureMessages = value;
|
| this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "managerValidationFailureMessages", oldValue, value));
|
| // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
|
| // the entire entity.
|
| if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
|
| {
|
| model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
|
| }
|
| }
|
| }
|
|
|
| [Bindable(event="propertyChange")]
|
| public function get actualcontractorsStyle():com.adobe.fiber.styles.Style
|
| {
|
| return model_internal::_nullStyle;
|
| }
|
|
|
| [Bindable(event="propertyChange")]
|
| public function get actualsalaryStyle():com.adobe.fiber.styles.Style
|
| {
|
| return model_internal::_nullStyle;
|
| }
|
|
|
| [Bindable(event="propertyChange")]
|
| public function get esttravelStyle():com.adobe.fiber.styles.Style
|
| {
|
| return model_internal::_nullStyle;
|
| }
|
|
|
| [Bindable(event="propertyChange")]
|
| public function get estcontractorsStyle():com.adobe.fiber.styles.Style
|
| {
|
| return model_internal::_nullStyle;
|
| }
|
|
|
| [Bindable(event="propertyChange")]
|
| public function get actualexpensesStyle():com.adobe.fiber.styles.Style
|
| {
|
| return model_internal::_nullStyle;
|
| }
|
|
|
| [Bindable(event="propertyChange")]
|
| public function get idStyle():com.adobe.fiber.styles.Style
|
| {
|
| return model_internal::_nullStyle;
|
| }
|
|
|
| [Bindable(event="propertyChange")]
|
| public function get estsalaryStyle():com.adobe.fiber.styles.Style
|
| {
|
| return model_internal::_nullStyle;
|
| }
|
|
|
| [Bindable(event="propertyChange")]
|
| public function get actualsuppliesStyle():com.adobe.fiber.styles.Style
|
| {
|
| return model_internal::_nullStyle;
|
| }
|
|
|
| [Bindable(event="propertyChange")]
|
| public function get nameStyle():com.adobe.fiber.styles.Style
|
| {
|
| return model_internal::_nullStyle;
|
| }
|
|
|
| public function get nameValidator() : StyleValidator
|
| {
|
| return model_internal::_nameValidator;
|
| }
|
|
|
| model_internal function set _nameIsValid_der(value:Boolean):void
|
| {
|
| var oldValue:Boolean = model_internal::_nameIsValid;
|
| if (oldValue !== value)
|
| {
|
| model_internal::_nameIsValid = value;
|
| this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "nameIsValid", oldValue, value));
|
| }
|
| }
|
|
|
| [Bindable(event="propertyChange")]
|
| public function get nameIsValid():Boolean
|
| {
|
| if (!model_internal::_nameIsValidCacheInitialized)
|
| {
|
| model_internal::calculateNameIsValid();
|
| }
|
|
|
| return model_internal::_nameIsValid;
|
| }
|
|
|
| model_internal function calculateNameIsValid():void
|
| {
|
| var valRes:ValidationResultEvent = model_internal::_nameValidator.validate(model_internal::_instance.name)
|
| model_internal::_nameIsValid_der = (valRes.results == null);
|
| model_internal::_nameIsValidCacheInitialized = true;
|
| if (valRes.results == null)
|
| model_internal::nameValidationFailureMessages_der = emptyArray;
|
| else
|
| {
|
| var _valFailures:Array = new Array();
|
| for (var a:int = 0 ; a<valRes.results.length ; a++)
|
| {
|
| _valFailures.push(valRes.results[a].errorMessage);
|
| }
|
| model_internal::nameValidationFailureMessages_der = _valFailures;
|
| }
|
| }
|
|
|
| [Bindable(event="propertyChange")]
|
| public function get nameValidationFailureMessages():Array
|
| {
|
| if (model_internal::_nameValidationFailureMessages == null)
|
| model_internal::calculateNameIsValid();
|
|
|
| return _nameValidationFailureMessages;
|
| }
|
|
|
| model_internal function set nameValidationFailureMessages_der(value:Array) : void
|
| {
|
| var oldValue:Array = model_internal::_nameValidationFailureMessages;
|
|
|
| var needUpdate : Boolean = false;
|
| if (oldValue == null)
|
| needUpdate = true;
|
|
|
| // avoid firing the event when old and new value are different empty arrays
|
| if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
|
| {
|
| if (oldValue.length == value.length)
|
| {
|
| for (var a:int=0; a < oldValue.length; a++)
|
| {
|
| if (oldValue[a] !== value[a])
|
| {
|
| needUpdate = true;
|
| break;
|
| }
|
| }
|
| }
|
| else
|
| {
|
| needUpdate = true;
|
| }
|
| }
|
|
|
| if (needUpdate)
|
| {
|
| model_internal::_nameValidationFailureMessages = value;
|
| this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "nameValidationFailureMessages", oldValue, value));
|
| // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
|
| // the entire entity.
|
| if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
|
| {
|
| model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
|
| }
|
| }
|
| }
|
|
|
| [Bindable(event="propertyChange")]
|
| public function get costcenterStyle():com.adobe.fiber.styles.Style
|
| {
|
| return model_internal::_nullStyle;
|
| }
|
|
|
| [Bindable(event="propertyChange")]
|
| public function get actualtravelStyle():com.adobe.fiber.styles.Style
|
| {
|
| return model_internal::_nullStyle;
|
| }
|
|
|
| [Bindable(event="propertyChange")]
|
| public function get estsuppliesStyle():com.adobe.fiber.styles.Style
|
| {
|
| return model_internal::_nullStyle;
|
| }
|
|
|
|
|
| /**
|
| *
|
| * @inheritDoc
|
| */
|
| override public function getStyle(propertyName:String):com.adobe.fiber.styles.IStyle
|
| {
|
| switch(propertyName)
|
| {
|
| default:
|
| {
|
| return null;
|
| }
|
| }
|
| }
|
|
|
| /**
|
| *
|
| * @inheritDoc
|
| *
|
| */
|
| override public function getPropertyValidationFailureMessages(propertyName:String):Array
|
| {
|
| switch(propertyName)
|
| {
|
| case("businessunit"):
|
| {
|
| return businessunitValidationFailureMessages;
|
| }
|
| case("manager"):
|
| {
|
| return managerValidationFailureMessages;
|
| }
|
| case("name"):
|
| {
|
| return nameValidationFailureMessages;
|
| }
|
| default:
|
| {
|
| return emptyArray;
|
| }
|
| }
|
| }
|
|
|
| }
|
|
|
| }
|