| :_basedir: |
| :_imagesdir: images/ |
| :notoc: |
| :notitle: |
| :grid: cols |
| :query: |
| |
| [[index]] |
| |
| == JDO Extentsanchor:JDO_Extents[] |
| |
| JDO implementations manage the persistence of objects into the |
| datastore. An *Extent* is a collection of objects of a particular type |
| of object that have been persisted. When you define the MetaData for a |
| class you can define if the class requires an Extent. The default is |
| true. You access the Extent as follows |
| |
| .... |
| Extent e = pm.getExtent(MyClass.class, true); |
| |
| .... |
| |
| This example will return an Extent that contains all persisted instances |
| of the class _MyClass_ and its subclasses (the second argument in the |
| call). An Extent is useful where you want to restrict a Query to query |
| over just that set of objects. It can also be used where you just want |
| to retrieve all persisted objects of a type (as an alternative to using |
| a Query). |
| |