Summer.Batch.Infrastructure.Item.ExecutionContext Class Reference

Object representing a context for an IItemStream. It is a thin wrapper for a dictionary that allows optionally for type safety on reads. It also allows for dirty checking by setting a 'dirty' flag whenever any put is called. More...

Inheritance diagram for Summer.Batch.Infrastructure.Item.ExecutionContext:

Public Member Functions

 ExecutionContext ()
 Default constructor. More...
 
void Empty ()
 Empty the context. Used by ContextManager. More...
 
 ExecutionContext (IDictionary< string, Object > map)
 Custom constructor More...
 
 ExecutionContext (ExecutionContext executionContext)
 Custom constructor with given map More...
 
void PutString (string key, string value)
 Store a string value in context. More...
 
void PutLong (string key, long value)
 Store a long value in context. More...
 
void PutInt (string key, int value)
 
void PutDouble (string key, double value)
 Store a double value in context. More...
 
void Put (string key, Object value)
 Add an Object value to the context. Putting null value for a given key removes the key. More...
 
string GetString (string key)
 Typesafe getter More...
 
string GetString (string key, string defaultString)
 Typesafe getter with default value if key is not represented More...
 
long GetLong (string key)
 Typesafe getter More...
 
long GetLong (string key, long defaultLong)
 Typesafe getter with default value if key is not represented More...
 
int GetInt (string key)
 Typesafe getter More...
 
int GetInt (string key, int defaultInt)
 Typesafe getter with default value if key is not represented More...
 
double GetDouble (string key)
 Typesafe getter More...
 
double GetDouble (string key, double defaultDouble)
 Typesafe getter with default value if key is not represented More...
 
Object Get (string key)
 Getter for the value represented by the provided key. More...
 
bool IsEmpty ()
 Checks if inner storage is empty. More...
 
void ClearDirtyFlag ()
 Clears the dirty flag. More...
 
bool ContainsKey (string key)
 Checks if inner storage contains the given key. More...
 
Object Remove (string key)
 Remove item referenced by given key from inner storage. More...
 
bool ContainsValue (Object value)
 Checks if inner storage contains the given value. More...
 
override bool Equals (Object obj)
 Equals override More...
 
override int GetHashCode ()
 GetHashCode override More...
 
override string ToString ()
 ToString override More...
 
int Size ()
 Returns the size of the inner storage. More...
 
IEnumerator< KeyValuePair< string, object > > GetEnumerator ()
 

Properties

bool Dirty [get]
 Dirty property. More...
 
KeyValuePair< string, Object >[] EntrySet [get]
 Inner storage as array. More...
 

Detailed Description

Object representing a context for an IItemStream. It is a thin wrapper for a dictionary that allows optionally for type safety on reads. It also allows for dirty checking by setting a 'dirty' flag whenever any put is called.

Note that putting null value is equivalent to removing the entry for the given key.

Constructor & Destructor Documentation

Summer.Batch.Infrastructure.Item.ExecutionContext.ExecutionContext ( )

Default constructor.

Summer.Batch.Infrastructure.Item.ExecutionContext.ExecutionContext ( IDictionary< string, Object >  map)

Custom constructor

Parameters
map
Summer.Batch.Infrastructure.Item.ExecutionContext.ExecutionContext ( ExecutionContext  executionContext)

Custom constructor with given map

Parameters
executionContext

Member Function Documentation

void Summer.Batch.Infrastructure.Item.ExecutionContext.ClearDirtyFlag ( )

Clears the dirty flag.

bool Summer.Batch.Infrastructure.Item.ExecutionContext.ContainsKey ( string  key)

Checks if inner storage contains the given key.

Parameters
key
Returns
bool Summer.Batch.Infrastructure.Item.ExecutionContext.ContainsValue ( Object  value)

Checks if inner storage contains the given value.

Parameters
value
Returns
void Summer.Batch.Infrastructure.Item.ExecutionContext.Empty ( )

Empty the context. Used by ContextManager.

override bool Summer.Batch.Infrastructure.Item.ExecutionContext.Equals ( Object  obj)

Equals override

Parameters
obj
Returns
Object Summer.Batch.Infrastructure.Item.ExecutionContext.Get ( string  key)

Getter for the value represented by the provided key.

Parameters
key
Returns
double Summer.Batch.Infrastructure.Item.ExecutionContext.GetDouble ( string  key)

Typesafe getter

Parameters
key
Returns
double Summer.Batch.Infrastructure.Item.ExecutionContext.GetDouble ( string  key,
double  defaultDouble 
)

Typesafe getter with default value if key is not represented

Parameters
key
defaultDouble
Returns
IEnumerator<KeyValuePair<string, object> > Summer.Batch.Infrastructure.Item.ExecutionContext.GetEnumerator ( )

See also
IEnumerator::GetEnumerator
Returns
override int Summer.Batch.Infrastructure.Item.ExecutionContext.GetHashCode ( )

GetHashCode override

Returns
int Summer.Batch.Infrastructure.Item.ExecutionContext.GetInt ( string  key)

Typesafe getter

Parameters
key
Returns
int Summer.Batch.Infrastructure.Item.ExecutionContext.GetInt ( string  key,
int  defaultInt 
)

Typesafe getter with default value if key is not represented

Parameters
key
defaultInt
Returns
long Summer.Batch.Infrastructure.Item.ExecutionContext.GetLong ( string  key)

Typesafe getter

Parameters
key
Returns
long Summer.Batch.Infrastructure.Item.ExecutionContext.GetLong ( string  key,
long  defaultLong 
)

Typesafe getter with default value if key is not represented

Parameters
key
defaultLong
Returns
string Summer.Batch.Infrastructure.Item.ExecutionContext.GetString ( string  key)

Typesafe getter

Parameters
key
Returns
string Summer.Batch.Infrastructure.Item.ExecutionContext.GetString ( string  key,
string  defaultString 
)

Typesafe getter with default value if key is not represented

Parameters
key
defaultString
Returns
bool Summer.Batch.Infrastructure.Item.ExecutionContext.IsEmpty ( )

Checks if inner storage is empty.

Returns
void Summer.Batch.Infrastructure.Item.ExecutionContext.Put ( string  key,
Object  value 
)

Add an Object value to the context. Putting null value for a given key removes the key.

Parameters
key
value
void Summer.Batch.Infrastructure.Item.ExecutionContext.PutDouble ( string  key,
double  value 
)

Store a double value in context.

Parameters
key
value
void Summer.Batch.Infrastructure.Item.ExecutionContext.PutInt ( string  key,
int  value 
)

Parameters
key
value
void Summer.Batch.Infrastructure.Item.ExecutionContext.PutLong ( string  key,
long  value 
)

Store a long value in context.

Parameters
key
value
void Summer.Batch.Infrastructure.Item.ExecutionContext.PutString ( string  key,
string  value 
)

Store a string value in context.

Parameters
key
value
Object Summer.Batch.Infrastructure.Item.ExecutionContext.Remove ( string  key)

Remove item referenced by given key from inner storage.

Parameters
key
Returns
int Summer.Batch.Infrastructure.Item.ExecutionContext.Size ( )

Returns the size of the inner storage.

Returns
override string Summer.Batch.Infrastructure.Item.ExecutionContext.ToString ( )

ToString override

Returns

Property Documentation

bool Summer.Batch.Infrastructure.Item.ExecutionContext.Dirty
get

Dirty property.

KeyValuePair<string, Object> [] Summer.Batch.Infrastructure.Item.ExecutionContext.EntrySet
get

Inner storage as array.


The documentation for this class was generated from the following file:
  • Summer.Batch.Infrastructure/Item/ExecutionContext.cs