# Methods

`-addObject:`
  adds an object to this chunk. Does *not* store the result in the database! Call storeChunk for this purpose
`-containsObject:`
`-count`
`-initForDatabase`
  internal method call
`-initForDatabase:atRecordNumber:loadContent:`
  internal method call
`-loadChunk`
  Loads the chunk from the database
`-objects`
  get all objects stored in this chunk lresult all objects stored in this chunk
`-recordNumber`
`-removeObject:`
  removes the specified objects. Operation is ignored if given object is not to be found in the chunk
`-storeChunk`
  this method is used to store the content of the chunk into the database

### addObject:

adds an object to this chunk. Does *not* store the result in the database! Call storeChunk for this purpose

>     - addObject: (id) anObject;

##### Parameter Descriptions

> `anObject`
>   given object must implement NSCoding

method result
  self

### containsObject:

>     - (BOOL) containsObject: (id) anObject;

method result
  YES if the given object is to be found in the chunk

### count

>     - (unsigned) count;

method result
  number of objects in this chunk

### initForDatabase

internal method call

See Also:

> initForDatabase:atRecordNumber:loadContent:

>     - initForDatabase: (BDBDatabase *) aDatabase atRecordNumber: (unsigned) a_record_nr loadContent: (BOOL) doLoad;

##### Parameter Descriptions

> `aDatabase`
>   database to use
> `a_record_nr`
>   record number to use
> `doLoad`
>   if YES then the content will be read from the database

method result
  self

##### Discussion

if doLoad equals NO then the record will be created. In this case this method will write an empty record to the database in order to reserve the record number

### initForDatabase:atRecordNumber:loadContent:

internal method call

See Also:

> initForDatabase

>     - initForDatabase: (BDBDatabase *) aDatabase atRecordNumber: (unsigned) a_record_nr loadContent: (BOOL) doLoad;

##### Parameter Descriptions

> `aDatabase`
>   database to use
> `a_record_nr`
>   record number to use
> `doLoad`
>   if YES then the content will be read from the database

##### Discussion

if doLoad equals NO then the record will be created. In this case this method will write an empty record to the database in order to reserve the record number

### loadChunk

Loads the chunk from the database

>     - loadChunk;

method result
  self

### objects

get all objects stored in this chunk lresult all objects stored in this chunk

>     - (NSArray *) objects;

### recordNumber

>     - (unsigned) recordNumber;

method result
  number of BDB record used for storing the chunk

### removeObject:

removes the specified objects. Operation is ignored if given object is not to be found in the chunk

>     - removeObject: (id) anObject;

method result
  self

### storeChunk

this method is used to store the content of the chunk into the database

>     - storeChunk;

method result
  self

© 2004, 2005, 2006 Free Software Foundation, Inc.
Author: Oliver Langer
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

      -------------------------------------------------------------------------
      Modification history

      30.03.06 ola     initial version
      -------------------------------------------------------------------------

(Last Updated June 05, 2006)