Chili.Opf3 Send comments on this topic.
ObjectExpression Class
See Also  Members   Example 
Chili.Opf3.Query Namespace : ObjectExpression Class




Represents a parsed ObjectQuery.

Object Model


Syntax

Visual Basic (Declaration) 
Public NotInheritable Class ObjectExpression 
   Inherits Expression
   Implements IQuery 
Visual Basic (Usage)Copy Code
Dim instance As ObjectExpression
C# 
public sealed class ObjectExpression : Expression, IQuery  
Managed Extensions for C++ 
public __gc __sealed class ObjectExpression : public Expression, IQuery  
C++/CLI 
public ref class ObjectExpression sealed : public Expression, IQuery  

Example

The following example shows how to create a ObjectExpression by using the OPath class. The ObjectExpression is then also compiled afterwards.
C#Copy Code
// ... Other code 
 
// Create an ObjectQuery for User persistent objects. 
// Add a condition to load only user with a name that contains "hri" 
ObjectQuery<User> objectQuery =  
new ObjectQuery<User>("UserName like {0}", "%hri%"); 
 
// Create an ObjectExpression by parsing the ObjectQuery. 
ObjectExpression objectExpresion = OPath.Parse(objectQuery); 
 
// Compile the ObjectExpression to get a CompildQuery. 
// You have to set the storage that is used to compile the query. 
CompiledQuery compiled = objectExpression.ToCompiledQuery(ObjectContext.Storage); 
 
// ... Other code

Remarks

Attention: This class could change in future versions.

This class represents a parsed ObjectQuery. To create an ObjectExpression you have to use the Parse method of the OPath class. A parsed ObjectQuery is still storage independent but is faster executed on the storage, since parsing of the content is no longer required.

Inheritance Hierarchy

System.Object
   Chili.Opf3.Query.Expression
      Chili.Opf3.Query.ObjectExpression

Requirements

Namespace: Chili.Opf3.Query

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: Chili.Opf3 (in Chili.Opf3.dll)

See Also