Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


org.eclipse.emf.validation.model
Class EvaluationMode<T>


java.lang.Object
  extended by 
org.eclipse.emf.validation.model.EvaluationMode<T>
Type Parameters:
T - the kind of object that is validated in an evaluation mode
All Implemented Interfaces:
Serializable

public final class EvaluationMode<T>
extends Object
implements Serializable

Describes the context in which a IModelConstraint is evaluated. See the individual value descriptions for more information.

Note that both batch and live constraints are evaluated in batch mode. This serves applications that do not work in a transactional context, but still want critical constraints to be evaluated on batch invocations.

See Also:
Serialized Form

Field Summary
static  EvaluationMode< EObject> BATCH
          Constraints executed in the "Batch" context are intended to be constraints that are evaluated on demand (when the user elects to evaluate them).
static  EvaluationMode< Notification> LIVE
           Constraints executed in the "Live" context are intended to be constraints that are requirements for committing a transaction in an application that implements a transactional model for changes to the data.
static  EvaluationMode< Void> NULL
          This special value is a pointer-safe null value according to the Null Object pattern.
 
Method Summary
static  List< EvaluationMode<?>> getAllInstances ()
          Obtains all of the enumeration values.
static
<T> EvaluationMode<T>
getInstance ( String name)
          Obtains the named instance.
  String getLocalizedName ()
          Obtains my localized name, for display to the user.
  String getName ()
          Obtains my symbolic name.
 boolean isBatch ()
          Queries whether I am evaluated in batch mode.
 boolean isBatchOnly ()
          Queries whether I am evaluated in batch mode only (not also in live mode).
 boolean isLive ()
          Queries whether I am evaluated in live mode.
 boolean isNull ()
          Queries whether I am the Null Object of this enumeration.
  String toString ()
           
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LIVE

public static final 
EvaluationMode<
Notification> LIVE

Constraints executed in the "Live" context are intended to be constraints that are requirements for committing a transaction in an application that implements a transactional model for changes to the data. The intent is that if any live constraints fail, the transaction may not be committed and may have to be rolled back if the application cannot fix the data.

Note that "live" mode constraints are also evaluated in batch contexts.


BATCH

public static final 
EvaluationMode<
EObject> BATCH
Constraints executed in the "Batch" context are intended to be constraints that are evaluated on demand (when the user elects to evaluate them). These do not, therefore, usually define conditions for data integrity, but rather semantic rules that guide a user to creating a better model.


NULL

public static final 
EvaluationMode<
Void> NULL
This special value is a pointer-safe null value according to the Null Object pattern. It is not a valid evaluation mode for a constraint.

Method Detail

getInstance

public static <T> 
EvaluationMode<T> getInstance(
String name)
Obtains the named instance. If the specified name is not recognized as the name of a valid instance or is null, then the result is the special NULL instance.

Parameters:
name - the name of the instance to retrieve (not case-sensitive)
Returns:
the named instance, or NULL if no such instance exists

getAllInstances

public static final 
List<
EvaluationMode<?>> getAllInstances()
Obtains all of the enumeration values.

Returns:
all values

getName

public final 
String getName()
Obtains my symbolic name.

Returns:
my name
See Also:
getInstance(java.lang.String)

getLocalizedName

public final 
String getLocalizedName()
Obtains my localized name, for display to the user.

Returns:
my localized name

isNull

public boolean isNull()
Queries whether I am the Null Object of this enumeration. In general, null pointers are never used with this type.

Returns:
whether I am the NULL instance

isLive

public boolean isLive()
Queries whether I am evaluated in live mode.

Returns:
whether I support live evaluation

isBatch

public boolean isBatch()
Queries whether I am evaluated in batch mode.

Returns:
whether I support batch evaluation

isBatchOnly

public boolean isBatchOnly()
Queries whether I am evaluated in batch mode only (not also in live mode).

Returns:
whether I support only batch evaluation

toString

public 
String toString()
Overrides:
toString in class Object

Copyright 2002, 2007 IBM Corporation and others.
All Rights Reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire