The typical responsibilities of Party, Place, Thing classes expressed as typcial attributes, operations and associations.

The Party, Place, Thing class archetype is one of four class archetypes in Peter Coad's 'modeling in color' object-oriented analysis and design technique.

A Party, Place, Thing class models someone or something who plays different roles. [Coad99]

Like all the class archetypes in 'modeling in color', the usefulness of the Party, Place, Thing class archetype in reviewing and building object models is due to its typical responsibilities, and the lists of typical attributes, operations and associations that represent those responsibilities.

Party, Place, Thingtypical responsibilities
Figure 1: The Typical Responsibilities of a Party, Place, Thing


Typical Attributes

The typical attributes of Party, Place Thing classes include:

Name
Description
Related Operations
Related Associations

identityNumber

Party, Place, Thing objects are responsible for being able to be matched with their real-world counterparts. For places, this is often an address, lot or bin number, or a set of coordinates.

For things this normally means remembering a serial number of some sort. Occasionally, however, we might need to generate a separate identity number for Things. These may be needed in the absence of a suitable externally supplied identity number or as a much simpler identifier if external identifiers for the objects involved are complex or vary in format. One example might be producing simple bar code values for videos, CD's and DVD's in a media rental shop so that returned items can be identified and processed quickly.

None

None

name

People use names to identify themselves. The name attribute can be used by a Party object to answer the question 'Which real world person or organization do you represent?'. Unfortunately, as many of us know all too well, names do not necessarily uniquely identify people. Therefore, name attributes also play an important part in search services that locate possible matching objects given a real world party's name or part of that name. It should comes as no surprise then that the Party, Place, Thing and Description archetypes suggest operations that list sets of Party, Place, Thing objects satisfying various criteria.

For Things names are often no more complex than a single, simple string of characters. For parties, it is not always that easy.

None

   None

address

Another typical responsibility of a role-player class like a party, place or thing, is to remember information that helps locate and contact their real-world counterparts. This is recognised by the presence of the address attribute in the list of typical attributes of the Party, Place, Thing class archetype.

The address could be a postal address of some sort that enables a party to be contacted using traditional mail services. The address could also represent an e-mail address used to contact a party by e-mail. It can also represent other forms of electronic address such as phone numbers, fax numbers, and instant messaging names.

The address can also specify the location of a place, such as a building in a city, a storage bin in a warehouse, and so on.

None None

customValue

A Party, Place or Thing object often represents a specific member of a set of items all of which have some similar characteristics. The customValue attribute reminds us to look for attributes that store values that differ from the norm for that set.

For example, the set of all the cars of a specific make and model all have similar characteristics. However, the owners of specific members of that set may have chosen to add some optional extras that differ from the standard fittings. For example, alloy wheels with low profile tyres instead of the steel wheels that come as standard. A Thing class modelling the car for insurance purposes would typically need to include attributes to track any of these custom values that might affect the insurance premium.

getCustomElse
DefaultValue

Party, Place, Thing - Description


Typical Operations

The typical operations of Party, Place Thing classes include:


Name
Description
Related
Attributes
Related
Associations

assessAcrossRoles

To make intelligent decisions about the performance of a Party, Place, Thing there is typically a need to compute some sort of assessment across all the roles a Party, Place or Thing currently plays or has played over a given period time. The assessAcrossRoles() operation reminds us to look for this sort of responsibility when considering role-player classes.

None

Party, Place, Thing - Role

getCustomElse
DefaultValue

Given that a Party, Place, Thing object often holds custom values that differ from default values stored in an associated Description object, a party, place, Thing class typically needs operations that check to see if there is a custom value in a particular attribute returning that its result if indeed there is one, or returning instead the relevant default value from the associated Description object.

None

Party, Place, Thing - Description

listRoles

It is frequently necessary to be able to list all, or subsets that match certain criteria, of the Role objects played by a Party, Place or Thing object. The listRoles() operation reminds of this typical responsibility.

None

Party, Place, Thing - Role

listInstances

The listInstances() operation is a class scope operation. It reminds us that a typical responsibility of a role-player class, like those of any of the class archetypes, is to be able to search for, find, and list subsets of its instances that match some set of criteria.

None

None

assessAcrossInstances

The assessAcrossInstances() operation is a class scope operation. It reminds us that a typical responsibility of a role-player class, like those of any of the class archetypes, is to be able to assess the performance of a subset of its instances that match some set of criteria.

None

None


Typical Associations

The typical assosciations of Party, Place, Thing classes include:


Name
Description
Related Attributes
Related Operations

Party, Place, Thing
- Role

A Role is a way in which someone, some place or some thing participates, so there is typically an association from the Role to the Party, Place, Thing class that is playing the role.

None

listRoles

assessAcross
Roles

Party, Place, Thing
- Description


customValue

getCustomElse
DefaultValue

Follow me on Twitter...