JeeWiz Home  
The Model-Driven System Builder

JeeWiz Architect's Guide
 
Contents  >   14.  'Business Object' Reference
 


14.32 Query Object

Used on
entity
DescriptionThe query object defines a 'find' method.

Queries will be used to locate instances of a container-managed entity bean for users of the bean.

The database query can be specified in either an or element (but not both).

This version of JeeWiz does not support the automatic generation of 'select' methods.
Contained
Lists
1
Name  parameter
Type  parameter
Description  Parameters to query method.
GenerateAllList  false
Validation A query's name must begin with 'find'
Inherited
properties
description (base property)

template (base property)

text (base property)

jwpattern (base property)

 14.32.1  Property 'name'
 14.32.2  Property 'queryStatement'
 14.32.3  Property 'remote'
 14.32.4  Property 'permissionGroup'
 14.32.5  Property 'returns'
 14.32.6  Property 'allowDuplicates'
 14.32.7  Property 'uid'

14.32.1  Property 'name'
DescriptionThe name of a query becomes the name of the finder. It should begin with 'find'.
TypeString
Requiredtrue

14.32.2  Property 'queryStatement'
DescriptionOptional query which will be used to locate instances of the entity (e.g. by selecting from the underlying table).
TypeString

14.32.3  Property 'remote'
DescriptionDefines whether the query is to be available remotely.

For example, if this is set in a J2EE deployment, the generated query method will be available on the remote interface.

If possible, the generated query method is available locally as well.

The remote flag also affects the code generated for parameters whose type value is the name of a business-object in the current ejb-jar, if J2EE is being used:

  • if the remote flag is true, the remote interface of the name EJB is used
  • if the remote flag is false, the local interface of the name EJB is used
Typeboolean
Defaultfalse

14.32.4  Property 'permissionGroup'
DescriptionThe permission-group references a group name defined in in the parent .

This defines the default access to methods on the session bean. If omitted, access is unchecked, i.e. no security is applied.
TypeString

14.32.5  Property 'returns'
DescriptionDefines whether the relationship retrieves a single object or a collection. 'One' means that the relationship returns one object, or none (return is null). 'Many' means that the relationship returns any number of instances (in a collection).
TypeString
Choices Many (default)
One
Requiredtrue

14.32.6  Property 'allowDuplicates'
DescriptionOnly applicable to queries that return many instances.

Specifies whether an enity may appear more than once in the result collection.

When duplicates are allowed, the return value from the query is a collection; if not, the return value is a set.
Typeboolean
Defaulttrue

14.32.7  Property 'uid'
DescriptionThe 'uid' is a Unique IDentifier for a methods in the business object model (and derivatives like J2EE).

The 'uid' uniquely identifies the method, even if the name or signature of the method changes.

This will normally be generated by the modelling tool; if not, it can be entered manually (but make sure it is unique!).
TypeString
 


Copyright (c) 2001-2008 New Technology/enterprise Ltd.