JeeWiz Home  
The Model-Driven System Builder

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


14.21 End Object

Used on
relation
SuperclassassociationEnd
DescriptionSpecifies the participation of an entity in a relationship. This adds a special default for the accessor, which will be the lower-cased name of the entity.

For example, say we have a Order-Customer relation which is many-to-one (many orders can be from one customer, but each order can only come from one customer).

This would be specified as with the order end labelled as multiple, as you would expect.

This produces
  • a get/setCustomer() method on the Order object which takes a single value representing the Customer
  • a get/setOrder() method on the Customer object which takes a Collection in .NET, or a Set or Collection in J2EE depending on whether duplicates are allowed.
e.g. very roughly !:

class Order { Customer get/setCustomer(); } class Customer { Collection get/setOrder(); }

Note that the accessor names should reflect 'how you traverse the relationship'. In other words, how you get from the current End's to the object(s) at the other end. For example, the accessor generated by default end labelled 'entity="Order"' will be called 'customer'. This leads to the get/setCustomer methods being generated on the Order.
Contained
Lists
1
Name  style
Type  String
Inherited from  internalClass
 
2
Name  rolesReadonly
Type  String
Inherited from  entity
 
3
Name  rolesAllowed
Type  String
Inherited from  entity
 
4
Name  rolesBlocked
Type  String
Inherited from  entity
 
5
Name  keyMap
Type  keyMap
Description  A list of foreign-key/related-key fields to map from this end's entity to related entities.
GenerateAllList  false
Validation 1.   The entity property does not name an entity in this jar/assembly
2.   The accessor property after defaults are applied must be non-null
3.   The accessor property after defaults are applied must be non-empty
4.   The accessor must start with a lower-case letter or '_'
5.   end has multiplicity of 'One' and has keymaps - this is incompatible with the other end being 'Many'
6.   if both ends of a relationship are 'One', only one of the ends can have keymaps
7.   If an end has keymaps, the number of keymaps on the end must match the size of the key list on the other end's entity.
Inherited
properties
name from associationEnd.name

description from associationEnd.description

template (base property)

text (base property)

jwpattern (base property)

allowDuplicates from associationEnd.allowDuplicates

required from associationEnd.required

useOnSummary from associationEnd.useOnSummary

useOnSearch from associationEnd.useOnSearch

accessor from associationEnd.accessor

roleName from associationEnd.roleName

initialRoleName from associationEnd.initialRoleName

access from businessMethod.access

package from baseViewRelation.package

readable from baseViewRelation.readable

writeable from baseViewRelation.writeable

uid from constraint.uid

 14.21.1  Property 'entity'
 14.21.2  Property 'multiplicity'
 14.21.3  Property 'externalName'
 14.21.4  Property 'cascadeDelete'
 14.21.5  Property 'accessNo'

14.21.1  Property 'entity'
DescriptionThe name of the participating entity (i.e. the one at 'this end' of the relationship).

The entity must be in the same jar/assembly/ejb-jar as the 'end' object.
TypeString
Requiredtrue

14.21.2  Property 'multiplicity'
OverridesassociationEnd.multiplicity
DescriptionSpecifies the multiplicity of the named entity in the relationship. This can be One or Many.
TypeString
Choices One (default)
Many
Requiredtrue

14.21.3  Property 'externalName'
DescriptionThis is the external name for the relationship and its accessor, as it will appear on pages if the relationship is used on a page.
TypeString

14.21.4  Property 'cascadeDelete'
Description'cascade-delete' specifies whether to cascade the delete of this end's entity to the related entity.
Typeboolean
Defaultfalse

14.21.5  Property 'accessNo'
Description A number placed on the end by the entity, unique to the entity to give a shorter name for paths than the accessor.
Typeint
 


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