SRJRCFrames
v0.1.296

de.schwarzrot.data.transaction
Class TOCount<E extends Entity>

java.lang.Object
  extended by de.schwarzrot.data.transaction.support.AbstractTransactionalOperation<E>
      extended by de.schwarzrot.data.transaction.support.AbstractConditionTransactionalOperation<E>
          extended by de.schwarzrot.data.transaction.TOCount<E>
Type Parameters:
E - entity of involved instance
All Implemented Interfaces:
TransactionalOperation<E>

public class TOCount<E extends Entity>
extends AbstractConditionTransactionalOperation<E>

describes an operation, bound in a transaction, that is used to count all persistent instances of given Entity. The optional condition can be used to filter the instances, that should get counted.

Author:
Reinhard Mantey

Nested Class Summary
 
Nested classes/interfaces inherited from interface de.schwarzrot.data.transaction.TransactionalOperation
TransactionalOperation.DataDirection
 
Constructor Summary
TOCount(Class<E> entityType)
          creates a counting operation for a transaction.
TOCount(Class<E> entityType, ConditionElement arg)
          creates a counting operation for a transaction.
TOCount(Class<E> entityType, List<ConditionElement> args)
          creates a counting operation for a transaction.
 
Method Summary
 long getResult()
           
 void setResult(long result)
           
 
Methods inherited from class de.schwarzrot.data.transaction.support.AbstractConditionTransactionalOperation
addCondition, clearCondition, getConditionArgs, setConditionArgs
 
Methods inherited from class de.schwarzrot.data.transaction.support.AbstractTransactionalOperation
getDataDirection, getEntityType, getOperationProperty, getResource, getTransaction, setEntityType, setOperationProperty, setResource, setTransaction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TOCount

public TOCount(Class<E> entityType)
creates a counting operation for a transaction. Using this constructor, all persistent instances of the given entityType will be counted.

Parameters:
entityType - the type of the instances to be counted

TOCount

public TOCount(Class<E> entityType,
               ConditionElement arg)
creates a counting operation for a transaction. Using this constructor, all persistent instances of the given entityType will be counted, that match given condition. This is constructor is for convenience, when condition is just a single element.

Parameters:
entityType - the type of the instances to be counted
arg - condition, the persistend instances must match

TOCount

public TOCount(Class<E> entityType,
               List<ConditionElement> args)
creates a counting operation for a transaction. Using this constructor, all persistent instances of the given entityType will be counted, that match given condition.

Parameters:
entityType - the type of the instances to be counted
args - condition, the persistent instances must match
Method Detail

getResult

public final long getResult()

setResult

public final void setResult(long result)

SRJRCFrames
v0.1.296

hosted at
Find SRJRCFrames at SourceForge.net. Fast, secure and free:
           Open Source Software download
Submit a bug or request a feature

SRJRCFrames is published according to the GNU General Public License
Copyright 2005-2012 Reinhard Mantey - some rights reserved.