Administration Guide
This chapter describes how to configure stored queries in Liquid Data. It contains the following sections:
You can also create, test, and deploy stored queries directly from the Data View Builder. For instructions on how to deploy a stored query from the Data View Builder, see Deploying a Query in Building Queries and Data Views.
A stored query in Liquid Data is a file in the Liquid Data repository that contains the XQuery text to submit a query to the Liquid Data server. Stored queries are stored in the following location:
LDRepository/stored_queries
where LDRepository
is the root-level directory of the Liquid Data repository. The location of the Liquid Data repository is specified in the General tab of the Liquid Data Administration Console.
You can deploy a stored query either from the Liquid Data Administration Console or from the Data View Builder. For details on using the Data View Builder to deploy stored queries, see Building Queries and Data Views. For details on deploying a stored query from the Liquid Data Administration Console, see Stored Query Configuration Tasks.
This section describes stored queries and includes the following subsections:
You use the Stored Query tab of the Liquid Data Administration Console to configure stored queries. The Stored Query tab displays all of the queries stored in the repository and allows you to configure the following for each query:
If the stored_queries
directory of the repository has subdirectories, any queries in a subdirectory is displayed in the stored query tab with a dot (.
) between each subdirectory and the query name. For example, if you have the following file in your Liquid Data repository:
LDRepository/stored_queries/rtl/electronics/orders.xq
The entry in the Stored Query tab appears as follows:
rtl.electronics.orders.xq
If you configure a security policy on stored queries that resides in subdirectories of the stored_queries
repository folder, they inherit any security policy that is configured from the folder(s) in which they reside. Stored queries do not inherit security policy from a security resource group. In the previous example, the stored query orders.xq
inherits security policy from the rtl
repository folder and from the electronics
repository folder. For details on configuring a security policy on a repository folder, see Configuring Secure Access to Items in the Server Repository and Assigning Security Policies to Liquid Data Objects.
Note: Because you can generate Web Services from stored queries, stored queries must have names that conform to the XML Schema specification. For example, the names must begin with an alphabetic character (letter)—not a number, and they must not have any special characters such as hyphens. For more information, see Naming Conventions for Stored Queries and the W3C XML Schema document at http://www.w3.org/XML/Schema.
You can access stored queries programmatically with the Liquid Data EJB API. If you are using the Liquid Data Control in WebLogic Workshop, the queries must have a schema file associated with them. The Liquid Data Control requires the schema file because it generates an XMLBean
Java classes corresponding to the schema definitions. The XMLBean
compiler requires the schema for the file. The generated XMLBean
Java classes allow an interface to the data, which makes it easier to display data from a Liquid Data query in an application.
The following table describes the fields in the Configure Stored Query screen of the Liquid Data Administration Console.
The name of the stored query saved in the repository. The name includes any subdirectories with a dot (.) between the directory hierarchies. For an example of the dot notation, see Stored Queries in Liquid Data. |
|
Identifies the name of the schema file associated with the query. You can find the Either enter the schema file name or click Browse Repository to browse the schema folder. |
|
Identifies the full target namespace of the Stored Query schema file. Example: Note: If a namespace is provided, the schema root element name must also be supplied. If it is not provided, Liquid Data determines the namespace from the schema file. |
|
Identifies a unique root element in the schema file. Many schemas only have one root. In cases where there are more than one root, only sub-elements of the identified root will be part of the schema used in the stored query. You must specify the root element if there is more than one root element to ensure that Liquid Data uses the correct element for the schema. Note: If the schema root element name is entered, a namespace must also be provided. |
This section includes procedures for the following tasks related to stored queries:
Note: You can also create, test, and deploy stored queries directly from the Data View Builder. For instructions on how to deploy a stored query from the Data View Builder, see Deploying a Query in Building Queries and Data Views.
Perform the following steps to configure a stored query in Liquid Data.
stored_queries
folder of the Liquid Data repository. For details about the Liquid Data repository, see Managing the Liquid Data Server Repository.A table containing links to all of the query files in the stored_queries
folder of the Liquid Data repository appears.
Figure 16-2 Edit Stored Query Screen
Perform the following steps to use the Administration Console to create a Data View from a stored query.
Note: You can create and deploy a Data View directly from the Data View Builder instead of going to the Administration Console. For details, see Building Queries and Data Views.
Perform the following steps to create a Web Service from a stored query:
Figure 16-3 Successful Web Service Generation
When you delete the stored query definition (by clicking the trash can icon), the Administration Console deletes the association between the stored query file and the schema definition. If you have created a Data View and a Web Service from the query, those objects are not deleted when you click the trash can. To delete those objects, you must go to the Data View and Web Services tabs of the Liquid Data Administration Console.
Perform the following steps to delete a stored query configuration:
The definition for the stored query is deleted, but the stored query file remains in the repository. If you click the link for the stored query, the Configure Stored Query screen appears and you can reconfigure it.