| //////////////////////////////////////////////////////////////////////////////// |
| // |
| // 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. To customize behavior
|
| * of this service wrapper you may modify the generated sub-class of this class - EmployeeService.as.
|
| */
|
| package services.employeeservice
|
| {
|
| import com.adobe.fiber.core.model_internal;
|
| import com.adobe.fiber.services.wrapper.RemoteObjectServiceWrapper;
|
| import com.adobe.serializers.utility.TypeUtility;
|
| import mx.rpc.AbstractOperation;
|
| import mx.rpc.AsyncToken;
|
| import mx.rpc.remoting.Operation;
|
| import mx.rpc.remoting.RemoteObject;
|
| import valueObjects.Employee;
|
|
|
| import mx.collections.ItemResponder;
|
| import com.adobe.fiber.valueobjects.AvailablePropertyIterator;
|
|
|
| [ExcludeClass]
|
| internal class _Super_EmployeeService extends com.adobe.fiber.services.wrapper.RemoteObjectServiceWrapper
|
| {
|
|
|
| // Constructor
|
| public function _Super_EmployeeService()
|
| {
|
| // initialize service control
|
| _serviceControl = new mx.rpc.remoting.RemoteObject();
|
|
|
| // initialize RemoteClass alias for all entities returned by functions of this service
|
| valueObjects.Employee._initRemoteClassAlias();
|
|
|
| var operations:Object = new Object();
|
| var operation:mx.rpc.remoting.Operation;
|
|
|
| operation = new mx.rpc.remoting.Operation(null, "getEmployees");
|
| operation.resultElementType = Object;
|
| operations["getEmployees"] = operation;
|
| operation = new mx.rpc.remoting.Operation(null, "getEmployeesSummary");
|
| operation.resultElementType = valueObjects.Employee;
|
| operations["getEmployeesSummary"] = operation;
|
| operation = new mx.rpc.remoting.Operation(null, "getDepartments");
|
| operation.resultElementType = Object;
|
| operations["getDepartments"] = operation;
|
| operation = new mx.rpc.remoting.Operation(null, "getEmployeesByID");
|
| operation.resultType = valueObjects.Employee;
|
| operations["getEmployeesByID"] = operation;
|
| operation = new mx.rpc.remoting.Operation(null, "getEmployeesByName");
|
| operation.resultElementType = Object;
|
| operations["getEmployeesByName"] = operation;
|
| operation = new mx.rpc.remoting.Operation(null, "getEmployeesSummaryByName");
|
| operation.resultElementType = valueObjects.Employee;
|
| operations["getEmployeesSummaryByName"] = operation;
|
| operation = new mx.rpc.remoting.Operation(null, "createEmployee");
|
| operation.resultType = Object;
|
| operations["createEmployee"] = operation;
|
| operation = new mx.rpc.remoting.Operation(null, "deleteEmployee");
|
| operation.resultType = Object;
|
| operations["deleteEmployee"] = operation;
|
| operation = new mx.rpc.remoting.Operation(null, "updateEmployee");
|
| operation.resultType = Object;
|
| operations["updateEmployee"] = operation;
|
|
|
| _serviceControl.operations = operations;
|
| _serviceControl.convertResultHandler = com.adobe.serializers.utility.TypeUtility.convertResultHandler;
|
| _serviceControl.source = "EmployeeService";
|
| _serviceControl.endpoint = "http://localhost:10088/TestDrive/public/gateway.php";
|
|
|
|
|
| preInitializeService();
|
| model_internal::initialize();
|
| }
|
|
|
| //init initialization routine here, child class to override
|
| protected function preInitializeService():void
|
| {
|
| destination = "EmployeeService";
|
|
|
| }
|
|
|
|
|
| /**
|
| * This method is a generated wrapper used to call the 'getEmployees' operation. It returns an mx.rpc.AsyncToken whose
|
| * result property will be populated with the result of the operation when the server response is received.
|
| * To use this result from MXML code, define a CallResponder component and assign its token property to this method's return value.
|
| * You can then bind to CallResponder.lastResult or listen for the CallResponder.result or fault events.
|
| *
|
| * @see mx.rpc.AsyncToken
|
| * @see mx.rpc.CallResponder
|
| *
|
| * @return an mx.rpc.AsyncToken whose result property will be populated with the result of the operation when the server response is received.
|
| */
|
| public function getEmployees() : mx.rpc.AsyncToken
|
| {
|
| var _internal_operation:mx.rpc.AbstractOperation = _serviceControl.getOperation("getEmployees");
|
| var _internal_token:mx.rpc.AsyncToken = _internal_operation.send() ;
|
| return _internal_token;
|
| }
|
|
|
| /**
|
| * This method is a generated wrapper used to call the 'getEmployeesSummary' operation. It returns an mx.rpc.AsyncToken whose
|
| * result property will be populated with the result of the operation when the server response is received.
|
| * To use this result from MXML code, define a CallResponder component and assign its token property to this method's return value.
|
| * You can then bind to CallResponder.lastResult or listen for the CallResponder.result or fault events.
|
| *
|
| * @see mx.rpc.AsyncToken
|
| * @see mx.rpc.CallResponder
|
| *
|
| * @return an mx.rpc.AsyncToken whose result property will be populated with the result of the operation when the server response is received.
|
| */
|
| public function getEmployeesSummary() : mx.rpc.AsyncToken
|
| {
|
| var _internal_operation:mx.rpc.AbstractOperation = _serviceControl.getOperation("getEmployeesSummary");
|
| var _internal_token:mx.rpc.AsyncToken = _internal_operation.send() ;
|
| return _internal_token;
|
| }
|
|
|
| /**
|
| * This method is a generated wrapper used to call the 'getDepartments' operation. It returns an mx.rpc.AsyncToken whose
|
| * result property will be populated with the result of the operation when the server response is received.
|
| * To use this result from MXML code, define a CallResponder component and assign its token property to this method's return value.
|
| * You can then bind to CallResponder.lastResult or listen for the CallResponder.result or fault events.
|
| *
|
| * @see mx.rpc.AsyncToken
|
| * @see mx.rpc.CallResponder
|
| *
|
| * @return an mx.rpc.AsyncToken whose result property will be populated with the result of the operation when the server response is received.
|
| */
|
| public function getDepartments() : mx.rpc.AsyncToken
|
| {
|
| var _internal_operation:mx.rpc.AbstractOperation = _serviceControl.getOperation("getDepartments");
|
| var _internal_token:mx.rpc.AsyncToken = _internal_operation.send() ;
|
| return _internal_token;
|
| }
|
|
|
| /**
|
| * This method is a generated wrapper used to call the 'getEmployeesByID' operation. It returns an mx.rpc.AsyncToken whose
|
| * result property will be populated with the result of the operation when the server response is received.
|
| * To use this result from MXML code, define a CallResponder component and assign its token property to this method's return value.
|
| * You can then bind to CallResponder.lastResult or listen for the CallResponder.result or fault events.
|
| *
|
| * @see mx.rpc.AsyncToken
|
| * @see mx.rpc.CallResponder
|
| *
|
| * @return an mx.rpc.AsyncToken whose result property will be populated with the result of the operation when the server response is received.
|
| */
|
| public function getEmployeesByID(itemID:int) : mx.rpc.AsyncToken
|
| {
|
| var _internal_operation:mx.rpc.AbstractOperation = _serviceControl.getOperation("getEmployeesByID");
|
| var _internal_token:mx.rpc.AsyncToken = _internal_operation.send(itemID) ;
|
| return _internal_token;
|
| }
|
|
|
| /**
|
| * This method is a generated wrapper used to call the 'getEmployeesByName' operation. It returns an mx.rpc.AsyncToken whose
|
| * result property will be populated with the result of the operation when the server response is received.
|
| * To use this result from MXML code, define a CallResponder component and assign its token property to this method's return value.
|
| * You can then bind to CallResponder.lastResult or listen for the CallResponder.result or fault events.
|
| *
|
| * @see mx.rpc.AsyncToken
|
| * @see mx.rpc.CallResponder
|
| *
|
| * @return an mx.rpc.AsyncToken whose result property will be populated with the result of the operation when the server response is received.
|
| */
|
| public function getEmployeesByName(searchStr:Object) : mx.rpc.AsyncToken
|
| {
|
| var _internal_operation:mx.rpc.AbstractOperation = _serviceControl.getOperation("getEmployeesByName");
|
| var _internal_token:mx.rpc.AsyncToken = _internal_operation.send(searchStr) ;
|
| return _internal_token;
|
| }
|
|
|
| /**
|
| * This method is a generated wrapper used to call the 'getEmployeesSummaryByName' operation. It returns an mx.rpc.AsyncToken whose
|
| * result property will be populated with the result of the operation when the server response is received.
|
| * To use this result from MXML code, define a CallResponder component and assign its token property to this method's return value.
|
| * You can then bind to CallResponder.lastResult or listen for the CallResponder.result or fault events.
|
| *
|
| * @see mx.rpc.AsyncToken
|
| * @see mx.rpc.CallResponder
|
| *
|
| * @return an mx.rpc.AsyncToken whose result property will be populated with the result of the operation when the server response is received.
|
| */
|
| public function getEmployeesSummaryByName(searchStr:String) : mx.rpc.AsyncToken
|
| {
|
| var _internal_operation:mx.rpc.AbstractOperation = _serviceControl.getOperation("getEmployeesSummaryByName");
|
| var _internal_token:mx.rpc.AsyncToken = _internal_operation.send(searchStr) ;
|
| return _internal_token;
|
| }
|
|
|
| /**
|
| * This method is a generated wrapper used to call the 'createEmployee' operation. It returns an mx.rpc.AsyncToken whose
|
| * result property will be populated with the result of the operation when the server response is received.
|
| * To use this result from MXML code, define a CallResponder component and assign its token property to this method's return value.
|
| * You can then bind to CallResponder.lastResult or listen for the CallResponder.result or fault events.
|
| *
|
| * @see mx.rpc.AsyncToken
|
| * @see mx.rpc.CallResponder
|
| *
|
| * @return an mx.rpc.AsyncToken whose result property will be populated with the result of the operation when the server response is received.
|
| */
|
| public function createEmployee(item:Object) : mx.rpc.AsyncToken
|
| {
|
| var _internal_operation:mx.rpc.AbstractOperation = _serviceControl.getOperation("createEmployee");
|
| var _internal_token:mx.rpc.AsyncToken = _internal_operation.send(item) ;
|
| return _internal_token;
|
| }
|
|
|
| /**
|
| * This method is a generated wrapper used to call the 'deleteEmployee' operation. It returns an mx.rpc.AsyncToken whose
|
| * result property will be populated with the result of the operation when the server response is received.
|
| * To use this result from MXML code, define a CallResponder component and assign its token property to this method's return value.
|
| * You can then bind to CallResponder.lastResult or listen for the CallResponder.result or fault events.
|
| *
|
| * @see mx.rpc.AsyncToken
|
| * @see mx.rpc.CallResponder
|
| *
|
| * @return an mx.rpc.AsyncToken whose result property will be populated with the result of the operation when the server response is received.
|
| */
|
| public function deleteEmployee(itemID:Object) : mx.rpc.AsyncToken
|
| {
|
| var _internal_operation:mx.rpc.AbstractOperation = _serviceControl.getOperation("deleteEmployee");
|
| var _internal_token:mx.rpc.AsyncToken = _internal_operation.send(itemID) ;
|
| return _internal_token;
|
| }
|
|
|
| /**
|
| * This method is a generated wrapper used to call the 'updateEmployee' operation. It returns an mx.rpc.AsyncToken whose
|
| * result property will be populated with the result of the operation when the server response is received.
|
| * To use this result from MXML code, define a CallResponder component and assign its token property to this method's return value.
|
| * You can then bind to CallResponder.lastResult or listen for the CallResponder.result or fault events.
|
| *
|
| * @see mx.rpc.AsyncToken
|
| * @see mx.rpc.CallResponder
|
| *
|
| * @return an mx.rpc.AsyncToken whose result property will be populated with the result of the operation when the server response is received.
|
| */
|
| public function updateEmployee(item:Object) : mx.rpc.AsyncToken
|
| {
|
| var _internal_operation:mx.rpc.AbstractOperation = _serviceControl.getOperation("updateEmployee");
|
| var _internal_token:mx.rpc.AsyncToken = _internal_operation.send(item) ;
|
| return _internal_token;
|
| }
|
|
|
| }
|
|
|
| }
|