uk.nominet.catnap.profile
Class CatnapOperationProfile

java.lang.Object
  extended byuk.nominet.catnap.profile.CatnapOperationProfile
All Implemented Interfaces:
CatnapOperationProfileContainer

public class CatnapOperationProfile
extends java.lang.Object
implements CatnapOperationProfileContainer

Data class representing a catnap operation profile


Field Summary
static int CATNAP_CREATE_OPERATION
           
static int CATNAP_FINDER_OPERATION
           
static int CATNAP_REMOVER_OPERATION
           
static int CATNAP_UPDATE_OPERATION
           
 
Constructor Summary
CatnapOperationProfile(EntityDef operationEntity, java.lang.String finderName, java.lang.Object[] args)
          Constructor used for bespoke finders
CatnapOperationProfile(int operationType, EntityDef operationEntity, java.lang.Object[] args)
          Constructor used for default finders and all writers and removers.
 
Method Summary
 void addSubOperationProfile(CatnapOperationProfile cop)
          Add a nested operation profile to this profile
 long getPostInterceptorDuration()
          Get the time spent executing the post interceptor if applicable
 long getPreInterceptorDuration()
          Get the time spent executing the pre interceptor if applicable
 long getThisRDBMSMappingDuration()
          Calculated method, which works out time spent on RDMBS and mapping for this objects pl/sql operation alone (deducting all sub calls made) and any time spent in interceptos.
 long getTotalOperationDuration()
          Get the total operation duration
 void setPostInterceptorDuration(long postInterceptorDuration)
          Set the time spent executing the post interceptor if applicable
 void setPreInterceptorDuration(long preInterceptorDuration)
          Set the time spent executing the pre interceptor if applicable
 void setTotalOperationDuration(long totalOperationDuration)
          Set the total operation duration
 void writeToStream(java.io.OutputStream outputStream, int indentChars)
          Write the profile to an arbitrary stream indenting by the number of chars supplied.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CATNAP_FINDER_OPERATION

public static final int CATNAP_FINDER_OPERATION
See Also:
Constant Field Values

CATNAP_CREATE_OPERATION

public static final int CATNAP_CREATE_OPERATION
See Also:
Constant Field Values

CATNAP_UPDATE_OPERATION

public static final int CATNAP_UPDATE_OPERATION
See Also:
Constant Field Values

CATNAP_REMOVER_OPERATION

public static final int CATNAP_REMOVER_OPERATION
See Also:
Constant Field Values
Constructor Detail

CatnapOperationProfile

public CatnapOperationProfile(int operationType,
                              EntityDef operationEntity,
                              java.lang.Object[] args)
Constructor used for default finders and all writers and removers.

Parameters:
operationType -
operationEntity -

CatnapOperationProfile

public CatnapOperationProfile(EntityDef operationEntity,
                              java.lang.String finderName,
                              java.lang.Object[] args)
Constructor used for bespoke finders

Parameters:
operationEntity -
finderName -
Method Detail

getTotalOperationDuration

public long getTotalOperationDuration()
Get the total operation duration

Returns:

setTotalOperationDuration

public void setTotalOperationDuration(long totalOperationDuration)
Set the total operation duration

Parameters:
totalOperationDuration -

getPreInterceptorDuration

public long getPreInterceptorDuration()
Get the time spent executing the pre interceptor if applicable

Returns:

setPreInterceptorDuration

public void setPreInterceptorDuration(long preInterceptorDuration)
Set the time spent executing the pre interceptor if applicable

Parameters:
preInterceptorDuration -

getPostInterceptorDuration

public long getPostInterceptorDuration()
Get the time spent executing the post interceptor if applicable

Returns:

setPostInterceptorDuration

public void setPostInterceptorDuration(long postInterceptorDuration)
Set the time spent executing the post interceptor if applicable

Parameters:
postInterceptorDuration -

getThisRDBMSMappingDuration

public long getThisRDBMSMappingDuration()
Calculated method, which works out time spent on RDMBS and mapping for this objects pl/sql operation alone (deducting all sub calls made) and any time spent in interceptos.

Returns:

addSubOperationProfile

public void addSubOperationProfile(CatnapOperationProfile cop)
Add a nested operation profile to this profile

Specified by:
addSubOperationProfile in interface CatnapOperationProfileContainer
Parameters:
cop -

writeToStream

public void writeToStream(java.io.OutputStream outputStream,
                          int indentChars)
                   throws java.io.IOException
Write the profile to an arbitrary stream indenting by the number of chars supplied.

Parameters:
outputStream -
indentChars -
Throws:
java.io.IOException