Extent
The Extent instance has two possible uses:
Query
158159160161162163164165166167168
} static public void removeAllInstances(PersistenceManager pm) { //Extent e = pm.getExtent(org.objectweb.speedo.runtime.tck.InstanceCallbackClass.class, true); Extent e = pm.getExtent(org.objectweb.speedo.pobjects.tck.InstanceCallbackClass.class, false); Iterator i = e.iterator(); while( i.hasNext() ){ pm.deletePersistent(i.next()); } }
188189190191192193194195196197198
* {@link javax.jdo.Query#setFilter(java.lang.String) etc. * @param pm the persistence manager * @return the JDO query instance */ public Query getAPIQuery(PersistenceManager pm) { Extent extent = this.excludeSubClasses != null ? pm.getExtent(this.candidateClass, !this.excludeSubClasses.booleanValue()) : pm.getExtent(this.candidateClass); Query query = pm.newQuery(extent); if (this.unique != null) {
180181182183184185186187188189190
try { tx.begin(); Extent extent = pm.getExtent( ProjectGroup.class, true ); Query query = pm.newQuery( extent ); query.declareParameters( "int repositoryId" );
206207208209210211212213214215216
try { tx.begin(); Extent extent = pm.getExtent( Project.class, true ); Query query = pm.newQuery( extent ); query.declareParameters( "int scheduleId" );
280281282283284285286287288289290
try { tx.begin(); Extent extent = pm.getExtent( ProjectGroup.class, true ); Query query = pm.newQuery( extent ); query.declareParameters( "int scheduleId" );
100101102103104105106107108109110
try { tx.begin(); Extent extent = pm.getExtent( BuildDefinition.class, true ); Query query = pm.newQuery( extent ); List result = (List) query.execute();
126127128129130131132133134135136
try { tx.begin(); Extent extent = pm.getExtent( Project.class, true ); Query query = pm.newQuery( extent ); query.declareImports( "import org.apache.maven.continuum.model.project.BuildDefinition" );
177178179180181182183184185186187
try { tx.begin(); Extent extent = pm.getExtent( ProjectGroup.class, true ); Query query = pm.newQuery( extent ); query.declareImports( "import " + BuildDefinition.class.getName() );
228229230231232233234235236237238
try { tx.begin(); Extent extent = pm.getExtent( BuildDefinition.class, true ); Query query = pm.newQuery( extent ); query.declareImports( "import " + Project.class.getName() );
317318319320321322323324325326327
try { tx.begin(); Extent extent = pm.getExtent( BuildDefinition.class, true ); Query query = pm.newQuery( extent ); query.setFilter( "this.template == true" ); List result = (List) query.execute(); return result == null ? Collections.EMPTY_LIST : (List) pm.detachCopyAll( result );