Project Wonder 2.0

er.extensions
Class ERXBatchingDisplayGroup

java.lang.Object
  extended bycom.webobjects.appserver.WODisplayGroup
      extended byer.extensions.ERXBatchingDisplayGroup
All Implemented Interfaces:
EOKeyValueArchiving, EOKeyValueArchiving.Awaking, NSDisposable, NSKeyValueCoding, NSKeyValueCoding.ErrorHandling, Serializable

public class ERXBatchingDisplayGroup
extends WODisplayGroup

Extends WODisplayGroup in order to provide real batching. This is done by adding database specific code to the select statement from the EOFetchSpecification from the WODisplayGroup's EODataSource which must be an EODatabaseDataSource.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class com.webobjects.appserver.WODisplayGroup
WODisplayGroup.Delegate
 
Nested classes inherited from class com.webobjects.foundation.NSKeyValueCoding
NSKeyValueCoding._BooleanFieldBinding, NSKeyValueCoding._BooleanMethodBinding, NSKeyValueCoding._FieldBinding, NSKeyValueCoding._ForwardingBinding, NSKeyValueCoding._KeyBinding, NSKeyValueCoding._KeyBindingCreation, NSKeyValueCoding._MethodBinding, NSKeyValueCoding._NumberFieldBinding, NSKeyValueCoding._NumberMethodBinding, NSKeyValueCoding._ReflectionKeyBindingCreation, NSKeyValueCoding.DefaultImplementation, NSKeyValueCoding.ErrorHandling, NSKeyValueCoding.Null, NSKeyValueCoding.UnknownKeyException, NSKeyValueCoding.Utility, NSKeyValueCoding.ValueAccessor
 
Nested classes inherited from class com.webobjects.eocontrol.EOKeyValueArchiving
EOKeyValueArchiving._NullValueSupport, EOKeyValueArchiving._NumberSupport, EOKeyValueArchiving._TimestampSupport, EOKeyValueArchiving.Awaking, EOKeyValueArchiving.FinishInitialization, EOKeyValueArchiving.Support
 
Field Summary
protected  NSArray _displayedObjects
          cache for the displayed objects
protected  Boolean _isBatching
           
protected  int _rowCount
          total number of rows
 
Fields inherited from class com.webobjects.appserver.WODisplayGroup
DisplayGroupWillFetchNotification
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding
_CLASS, NullValue
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding.ErrorHandling
_CLASS
 
Fields inherited from interface com.webobjects.foundation.NSDisposable
_CLASS
 
Fields inherited from interface com.webobjects.eocontrol.EOKeyValueArchiving
_CLASS
 
Fields inherited from interface com.webobjects.eocontrol.EOKeyValueArchiving.Awaking
_CLASS
 
Constructor Summary
ERXBatchingDisplayGroup()
           
 
Method Summary
 int batchCount()
          Overridden in order to use a custom method which determines the number of Objects / rows for the existing EODatabaseDataSource.
 EODatabaseDataSource databaseDataSource()
           
 NSArray displayedObjects()
          Overridden method in order to fetch -only- the rows that are needed.
 boolean isBatching()
          Determines if batching is possible.
 void redisplay()
           
 int rowCount()
          Returns the number of rows from the EODatabaseDataSource.
 void setCurrentBatchIndex(int index)
           
 void setDataSource(EODataSource eodatasource)
           
 void setIsBatching(boolean value)
           
 
Methods inherited from class com.webobjects.appserver.WODisplayGroup
_beginObserverNotification, _deleteObject, _insertObjectAtIndex, _lastObserverNotified, allObjects, allQualifierOperators, awakeFromKeyValueUnarchiver, clearSelection, currentBatchIndex, dataSource, decodeWithKeyValueUnarchiver, defaultStringMatchFormat, defaultStringMatchOperator, delegate, delete, deleteObjectAtIndex, deleteSelection, detailKey, displayBatchContainingSelectedObject, displayNextBatch, displayPreviousBatch, dispose, editingContextPresentErrorMessage, encodeWithCoder, encodeWithKeyValueArchiver, endEditing, fetch, fetchesOnLoad, finishInitialization, globalDefaultForValidatesChangesImmediately, globalDefaultStringMatchFormat, globalDefaultStringMatchOperator, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hasDetailDataSource, hasMultipleBatches, indexOfFirstDisplayedObject, indexOfLastDisplayedObject, initWithCoder, inQueryMode, insert, insertedObjectDefaultValues, insertNewObjectAtIndex, insertObjectAtIndex, localKeys, masterObject, numberOfObjectsPerBatch, objectsChangedInEditingContext, objectsInvalidatedInEditingContext, qualifier, qualifierFromQueryValues, qualifyDataSource, qualifyDisplayGroup, queryBindings, queryMatch, queryMax, queryMin, queryOperator, relationalQualifierOperators, selectedObject, selectedObjects, selectionIndexes, selectNext, selectObject, selectObjectsIdenticalTo, selectObjectsIdenticalToSelectFirstOnNoMatch, selectPrevious, selectsFirstObjectAfterFetch, setDefaultStringMatchFormat, setDefaultStringMatchOperator, setDelegate, setDetailKey, setFetchesOnLoad, setGlobalDefaultForValidatesChangesImmediately, setGlobalDefaultStringMatchFormat, setGlobalDefaultStringMatchOperator, setInQueryMode, setInsertedObjectDefaultValues, setLocalKeys, setMasterObject, setNumberOfObjectsPerBatch, setObjectArray, setQualifier, setSelectedObject, setSelectedObjects, setSelectionIndexes, setSelectsFirstObjectAfterFetch, setSortOrderings, setValidatesChangesImmediately, sortOrderings, stringQualifierOperators, takeValueForKey, toString, unableToSetNullForKey, undoManager, updateDisplayedObjects, validatesChangesImmediately, valueForKey, willChange
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_rowCount

protected int _rowCount
total number of rows


_displayedObjects

protected NSArray _displayedObjects
cache for the displayed objects


_isBatching

protected Boolean _isBatching
Constructor Detail

ERXBatchingDisplayGroup

public ERXBatchingDisplayGroup()
Method Detail

setIsBatching

public void setIsBatching(boolean value)

isBatching

public boolean isBatching()
Determines if batching is possible.

Returns:
true if dataSource is an instance of EODatabaseDataSource

setDataSource

public void setDataSource(EODataSource eodatasource)

batchCount

public int batchCount()
Overridden in order to use a custom method which determines the number of Objects / rows for the existing EODatabaseDataSource.

Returns:
the number of rows from the EODatabaseDataSource

rowCount

public int rowCount()
Returns the number of rows from the EODatabaseDataSource.

Returns:
the number of rows from the EODatabaseDataSource

databaseDataSource

public EODatabaseDataSource databaseDataSource()

redisplay

public void redisplay()

setCurrentBatchIndex

public void setCurrentBatchIndex(int index)

displayedObjects

public NSArray displayedObjects()
Overridden method in order to fetch -only- the rows that are needed. This is different to the editors methods because a WODisplayGroup would always fetch from the start until the end of the objects from the fetch limit.

Returns:
the objects that should be diplayed.

Last updated: Do, Dez 9, 2004 • 12:46 PM CET

Copyright © 2002 – 2004 Project Wonder.