Referencia de ActionScript® 3.0 para la plataforma de Adobe® Flash®
Inicio  |  Ocultar lista de paquetes y clases |  Paquetes  |  Clases  |  Novedades  |  Índice  |  Apéndices  |  ¿Por qué hay texto en inglés?
Filtros: Recuperando datos del servidor...
Recuperando datos del servidor...
mx.olap 

IOLAPCube  - AS3 Flex

Paquetemx.olap
Interfazpublic interface IOLAPCube
Implementadores OLAPCube

Versión del lenguaje: ActionScript 3.0
Versión de producto: Flex 3
Versiones de motor de ejecución: Flash Player 9, AIR 1.1

The IOLAPCube interface represents an OLAP cube that holds an N-dimensional representation of a flat data set. You use an OLAP schema to define how the cube represents the input flat data set.

An OLAP cube is analogous to a table in a relational database. Where a table in a relational database has two dimensions, an OLAP cube can have any number of dimensions. In its simplest form, the dimensions of an OLAP cube correspond to a field of the flat data set.

After setting the schema of the OLAP cube, you must call the IOLAPCube.refresh() method to build the cube. Upon completion of cube initialization, the OLAP cube dispatches the complete event to signal that the cube is ready to query.

Elementos de API relacionados



Propiedades públicas
 PropiedadDefinido por
  dimensions : IList
[solo lectura] All dimensions in the cube, as a list of IOLAPDimension instances.
IOLAPCube
  name : String
[solo lectura] The name of the OLAP cube.
IOLAPCube
Métodos públicos
 MétodoDefinido por
  
Aborts a query that has been submitted for execution.
IOLAPCube
  
Aborts the current cube refresh, if one is executing.
IOLAPCube
  
Queues an OLAP query for execution.
IOLAPCube
  
Returns the dimension with the given name within the OLAP cube.
IOLAPCube
  
Refreshes the cube from the data provider.
IOLAPCube
Información sobre propiedades

dimensions

propiedad
dimensions:IList  [solo lectura]

Versión del lenguaje: ActionScript 3.0
Versión de producto: Flex 3
Versiones de motor de ejecución: Flash Player 9, AIR 1.1

All dimensions in the cube, as a list of IOLAPDimension instances.



Implementación
    public function get dimensions():IList

name

propiedad 
name:String  [solo lectura]

Versión del lenguaje: ActionScript 3.0
Versión de producto: Flex 3
Versiones de motor de ejecución: Flash Player 9, AIR 1.1

The name of the OLAP cube.



Implementación
    public function get name():String
Información sobre métodos

cancelQuery

()método
public function cancelQuery(query:IOLAPQuery):void

Versión del lenguaje: ActionScript 3.0
Versión de producto: Flex 3
Versiones de motor de ejecución: Flash Player 9, AIR 1.1

Aborts a query that has been submitted for execution.

Parámetros

query:IOLAPQuery — The query to abort.

cancelRefresh

()método 
public function cancelRefresh():void

Versión del lenguaje: ActionScript 3.0
Versión de producto: Flex 3
Versiones de motor de ejecución: Flash Player 9, AIR 1.1

Aborts the current cube refresh, if one is executing.

execute

()método 
public function execute(query:IOLAPQuery):mx.rpc:AsyncToken

Versión del lenguaje: ActionScript 3.0
Versión de producto: Flex 3
Versiones de motor de ejecución: Flash Player 9, AIR 1.1

Queues an OLAP query for execution. After you call the refresh() method to update the cube, you must wait for a complete event before you call the execute() method.

OLAP cubes can be complex, so you do not want your application to pause while Flex calculates the results of your OLAP query. The execute() method returns an instance of the AsyncToken class, which lets you set up handlers for asynchronous operations so that your application can continue to execute during query processing.

When using the AsyncToken class, you set up two functions to handle the query results. In this example, the showResult() function handles the query results when the query succeeds, and the showFault() function handles any errors detected during query execution:

      <mx:Script>
              
              // Function to execute a query.
              private function runQuery(cube:IOLAPCube):void {
                  // Create a query instance.
                  var query:IOLAPQuery = getQuery(cube);
                  // Execute the query.
                  var token:AsyncToken = cube.execute(query);
                  // Set up handlers for the query results.
                  token.addResponder(new AsyncResponder(showResult, showFault));
              }
              
              // Handle a query fault.
              private function showFault(result:FaultEvent, token:Object):void {
                  Alert.show("Error in query.");
              }
      
              // Handle a query success.
              private function showResult(result:Object, token:Object):void {
                  if (!result) {
                      Alert.show("No results from query.");
                      return;
                  }
      
                  myOLAPDG.dataProvider= result as OLAPResult;            
              }        
      </mx:Script>
      
      <mx:OLAPDataGrid id="myOLAPDG" width="100%" height="100%" />
      

Parámetros

query:IOLAPQuery — The query to execute, represented by an IOLAPQuery instance.

Valor devuelto
mx.rpc:AsyncToken — An AsyncToken instance.

Elementos de API relacionados

findDimension

()método 
public function findDimension(name:String):IOLAPDimension

Versión del lenguaje: ActionScript 3.0
Versión de producto: Flex 3
Versiones de motor de ejecución: Flash Player 9, AIR 1.1

Returns the dimension with the given name within the OLAP cube.

Parámetros

name:String — The name of the dimension.

Valor devuelto
IOLAPDimension — An IOLAPDimension instance representing the dimension, or null if a dimension is not found.

refresh

()método 
public function refresh():void

Versión del lenguaje: ActionScript 3.0
Versión de producto: Flex 3
Versiones de motor de ejecución: Flash Player 9, AIR 1.1

Refreshes the cube from the data provider. After setting the cube's schema, you must call this method to build the cube.

This method dispatches a progress event to indicate progress, and dispatches a complete event when the cube is complete and ready to execute queries. You must wait for a complete event before you call the execute() method to run a query.

Elementos de API relacionados





[ X ]¿Por qué hay texto en inglés?
Cierto contenido de la Referencia de ActionScript 3.0 se muestra en inglés

No todo el contenido de la Referencia de ActionScript 3.0 se traduce a todos los idiomas. Si un elemento del lenguaje no se traduce, aparecerá en inglés. Por ejemplo, la clase ga.controls.HelpBox no está traducida en ningún idioma. Por lo tanto, en la versión en español de la referencia, la clase ga.controls.HelpBox aparecerá en inglés.