Products & Services Solutions Academia Support User Community Company

Learn more about MATLAB Compiler   

Creating a DAO for Deployment

To access business objects in .NET and Java environments, you must write a data access class or classes.

The code in these examples represents what exists within the data access section of an application since it bridges across MATLAB data and data types and Java and .NET data types.

Initializing a Component

Use these examples as a framework for initializing a component.

 Java

 .NET

Interacting with a Component

You interact with a component by passing inputs to a deployed application or producing MATLAB output from a deployed application. All of these examples fit where the comment block resides in Initializing a Componentand the same component class is used. The Java and .NE Builder infrastructure handles data marshalling when passing parameters to a component. Data conversion rules can be found in the MATLAB builder documentation. If a specific data type is required, you can use the MWArray objects and pass in the appropriate data type.

Converting an Integer to a MATLAB Data Type

Some of the ways to pass inputs to a deployed applications are demonstrated in these examples:

 Java

 .NET

Converting Array Data to a MATLAB Data Type

Arrays can be converted to several different MATLAB data types. An example of converting a String array into a cell array follows:

 Java

 .NET

Converting a List to a MATLAB Data Type

A list can be converted to several different MATLAB data types. An example of converting a List of Strings into a cell array follows:

 Java

 .NET

Converting Name Value Pairs to a MATLAB Data Type

 Java (Maps)

 .NET (Dictionaries)

Getting MATLAB Numerics from a Deployed Application

This code resides in the try block for an initialized component (see Initializing a Component).

 Java

 .NET

Getting MATLAB Strings from a Deployed Application

 Java

 .NET

Getting MATLAB Numeric Arrays from a Component

 Java

 .NET

Getting Character Arrays from a Component

 Java

 .NET

Getting Byte Arrays from a Component

 Java

 .NET

Getting Cell Arrays from a Component

 Java

 .NET

Getting Structures from a Component

 Java

 .NET

Getting a WebFigure from a Component and Attaching It to a Page

 Java

 .NET

Getting Encoded Image Bytes from an Image in a Component

 Java

 .NET

Getting a Buffered Image in a Component

 Java

 .NET

Getting Image Data from a WebFigure

The following example shows how to get image data from a WebFigure object. It also shows how to specify the image type and the orientation of the image.

 .NET

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS