MetaDone
metadone.metabusiness.syntax.AbstractView Class Reference
Inheritance diagram for metadone.metabusiness.syntax.AbstractView:
Collaboration diagram for metadone.metabusiness.syntax.AbstractView:

List of all members.

Public Member Functions

 AbstractView (ConcreteModel target) throws BadPreCondition
final ConcreteModel getTarget ()
final< E extends
InternalViewElement > E 
produceElement (Class< E > cl, ConcreteObject expression, ConcreteObject co) throws BadPreCondition
List< InternalViewElementgetElements () throws BadPreCondition
void deleteView () throws BadPreCondition
int hashCode ()
boolean equals (Object obj)
String toString ()

Protected Member Functions

abstract
< EextendsInternalViewElement >
createElement (Class< E > cl, ConcreteObject expression, ConcreteObject co) throws BadPreCondition

Package Functions

public< E extends
InternalViewElement > E 
getElement (Class< E > cl, ConcreteObject expression, ConcreteObject co) throws BadPreCondition
public< E extends
InternalViewElement > List< E > 
getElements (Class< E > cl) throws BadPreCondition

Private Attributes

final ConcreteModel target

Detailed Description

An abstract implementation of the view.

The user of this class must not forget to override one of the methods getElements() or getElements(Class).

Author:
kma

Constructor & Destructor Documentation

metadone.metabusiness.syntax.AbstractView.AbstractView ( ConcreteModel  target) throws BadPreCondition

Member Function Documentation

abstract <EextendsInternalViewElement> E metadone.metabusiness.syntax.AbstractView.createElement ( Class< E >  cl,
ConcreteObject  expression,
ConcreteObject  co 
) throws BadPreCondition [protected, pure virtual]
void metadone.metabusiness.syntax.AbstractView.deleteView ( ) throws BadPreCondition
boolean metadone.metabusiness.syntax.AbstractView.equals ( Object  obj)
public<E extends InternalViewElement> E metadone.metabusiness.syntax.AbstractView.getElement ( Class< E >  cl,
ConcreteObject  expression,
ConcreteObject  co 
) throws BadPreCondition [package]

Returns a view element.

Parameters:
<E>The type of the element
clThe class
expressionThe expression
coThe concrete object or null
Returns:
An element of the given class or null if it was not found
Exceptions:
BadPreCondition

Implements metadone.metabusiness.syntax.View.

References metadone.util.Objects.equal(), and metadone.metabusiness.syntax.AbstractView.getElements().

Referenced by metadone.metabusiness.syntax.AbstractView.produceElement().

List<InternalViewElement> metadone.metabusiness.syntax.AbstractView.getElements ( ) throws BadPreCondition

Gets the list of all elements in this view.

This is equivalent to:

return getElements(InternalViewElement.class);
Returns:
The list of elements
Exceptions:
BadPreCondition
See also:
getElements(Class)

Implements metadone.metabusiness.syntax.View.

Referenced by metadone.metabusiness.syntax.AbstractView.getElement(), and metadone.metabusiness.syntax.AbstractView.getElements().

public<E extends InternalViewElement> List<E> metadone.metabusiness.syntax.AbstractView.getElements ( Class< E >  cl) throws BadPreCondition [package]

Gets the list of all elements in this view that are instances of a class.

Returns all the view elements that are instances of the given class.

Parameters:
<E>The type of the elements
clThe class
Returns:
The list of elements
Exceptions:
BadPreCondition

Implements metadone.metabusiness.syntax.View.

Reimplemented in metadone.metabusiness.syntax.grasyla.AbstractGrasylaView.

References metadone.metabusiness.syntax.AbstractView.getElements().

int metadone.metabusiness.syntax.AbstractView.hashCode ( )
final<E extends InternalViewElement> E metadone.metabusiness.syntax.AbstractView.produceElement ( Class< E >  cl,
ConcreteObject  expression,
ConcreteObject  co 
) throws BadPreCondition

Retrieves or creates a view element.

If the element already exists, it is returned.

Parameters:
<E>The type of the element
clThe class
expressionThe expression
coThe concrete object or null
Returns:
An element of the given class
Exceptions:
BadPreConditionwhen the element couldn't be created
See also:
#getElement(Class, ConcreteObject, ConcreteObject)

Implements metadone.metabusiness.syntax.View.

References metadone.metabusiness.syntax.AbstractView.createElement(), and metadone.metabusiness.syntax.AbstractView.getElement().

String metadone.metabusiness.syntax.AbstractView.toString ( )

Member Data Documentation


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations