Namespace: OpenEdge.Core.Collections
Class
AbstractTTCollection
Parent classes:
Inherits: Progress.Lang.Object
Implements: OpenEdge.Core.Collections.ICollection

Copyright (c) 2013-2017 by Progress Software Corporation. All rights reserved.
File:AbstractTTCollection
Author(s):hdaniels
Created:Sun Dec 16 22:41:40 EST 2007
Notes:This is an ABL specific abstraction that uses only dynamic
constructs to access temp-tables and buffers in order to
allow it to be reused by subclasses that have different
temp-tables.
- The most important behavioral encapsulation/reuse provided by
this is the management of the size().
Purpose: Abstract collection class
Notes: All temp-table operations are dynamic
Subclasses should define internal temp-table and pass the
handle to super the constructor. They must override
findBufferUseObject (see below) and could also override other
methods with static code for performance.




Method Summary
Options Name Purpose
LOGICAL Add (Object)
LOGICAL AddAll (ICollection)
LOGICAL AddArray (Object[])
Clear ()
Progress.Lang.Object Clone () /* Deep clone. or rather deep enough since we don't know what the elements' Clone() operations do, so this may end up being a memberwise clone */
CloneElements (ICollection)
LOGICAL Contains (Object)
LOGICAL ContainsAll (ICollection)
FindBufferUseObject (Object) /* override this in subclass - used by remove(obj) and others */
LOGICAL IsEmpty ()
OpenEdge.Core.Collections.IIterator Iterator () /* Returns a new IIterator over the collection. */
LOGICAL Remove (Object)
LOGICAL RemoveAll (ICollection)
Resize () /** Recalculates the Size of this collections. Used particularly by Lists since there are operations like Remove() that are index-based and not item-based. */
LOGICAL RetainAll (ICollection)
Progress.Lang.Object ToArray () /* ToArray should not be used with large collections If there is too much data the ABL will throw: Attempt to update data exceeding 32000. (12371) */
ToTable (table-handle)

Constructor Summary
Options Name Purpose
AbstractTTCollection () /* default public ctor for Serialization only */
AbstractTTCollection (handle, character) /* pass temp-table handle and name of object field */
AbstractTTCollection (handle, handle) /* pass temp-table handle and object field */
AbstractTTCollection (ICollection, handle, character) /* pass Collection */

Property Summary
Options Name Purpose
INTEGER Size


Method Detail
Top

PUBLIC LOGICAL Add (Object)

Parameters:
newObject Progress.Lang.Object
Returns LOGICAL
Top

PUBLIC LOGICAL AddAll (ICollection)

Parameters:
newCollection OpenEdge.Core.Collections.ICollection
Returns LOGICAL
Top

PUBLIC LOGICAL AddArray (Object[])

Parameters:
objectArray Progress.Lang.Object
Returns LOGICAL
Top

PUBLIC Clear ()

Top

PUBLIC Progress.Lang.Object Clone ()

/* Deep clone. or rather deep enough since we don't know what the elements' Clone()
operations do, so this may end up being a memberwise clone
Returns Progress.Lang.Object
Top

PROTECTED CloneElements (ICollection)

Parameters:
poClone OpenEdge.Core.Collections.ICollection
Top

PUBLIC LOGICAL Contains (Object)

Parameters:
checkObject Progress.Lang.Object
Returns LOGICAL
Top

PUBLIC LOGICAL ContainsAll (ICollection)

Parameters:
poCollection OpenEdge.Core.Collections.ICollection
Returns LOGICAL
Top

PROTECTED FindBufferUseObject (Object)

/* override this in subclass - used by remove(obj) and others
Parameters:
obj Progress.Lang.Object
Top

PUBLIC LOGICAL IsEmpty ()

Returns LOGICAL
Top

PUBLIC OpenEdge.Core.Collections.IIterator Iterator ()

/* Returns a new IIterator over the collection.
Returns OpenEdge.Core.Collections.IIterator
Top

PUBLIC LOGICAL Remove (Object)

Parameters:
oldObject Progress.Lang.Object
Returns LOGICAL
Top

PUBLIC LOGICAL RemoveAll (ICollection)

Parameters:
collection OpenEdge.Core.Collections.ICollection
Returns LOGICAL
Top

PROTECTED Resize ()

Purpose: Recalculates the Size of this collections.
Used particularly by Lists since there are operations
like Remove() that are index-based and not item-based.
Top

PUBLIC LOGICAL RetainAll (ICollection)

Parameters:
oCol OpenEdge.Core.Collections.ICollection
Returns LOGICAL
Top

PUBLIC Progress.Lang.Object ToArray ()

/* ToArray should not be used with large collections
If there is too much data the ABL will throw:
Attempt to update data exceeding 32000. (12371)
Returns Progress.Lang.Object
Top

PUBLIC ToTable (table-handle)

Parameters:
tt TABLE-HANDLE


Constructor Detail
Top

PUBLIC AbstractTTCollection ()

/* default public ctor for Serialization only
Top

PROTECTED AbstractTTCollection (handle, character)

/* pass temp-table handle and name of object field
Parameters:
phtt HANDLE
pcField CHARACTER
Top

PROTECTED AbstractTTCollection (handle, handle)

/* pass temp-table handle and object field
Parameters:
phtt HANDLE
hField HANDLE
Top

PROTECTED AbstractTTCollection (ICollection, handle, character)

/* pass Collection
Parameters:
poCol OpenEdge.Core.Collections.ICollection
phtt HANDLE
pcField CHARACTER


Property Detail
Top

PUBLIC INTEGER Size

Returns INTEGER


Copyright © 2020 Progress Software Corporation. All rights Reserved.

Progress® OpenEdge® Release 12.2.0