org.datanucleus.store
Class AbstractExtent

java.lang.Object
  extended by org.datanucleus.store.AbstractExtent
All Implemented Interfaces:
Extent
Direct Known Subclasses:
DefaultCandidateExtent

public abstract class AbstractExtent
extends java.lang.Object
implements Extent

Abstract representation of a JDO Extent. Suitable for use with all datastores.


Field Summary
protected  java.lang.Class candidateClass
          The candidate class.
protected  AbstractClassMetaData cmd
          ClassMetaData for the candidate class.
protected  ExecutionContext ec
          ExecutionContext
protected static Localiser LOCALISER
          Localised messages source
protected  StoreManager storeMgr
          Manager for the Store.
protected  boolean subclasses
          Whether to include subclasses.
 
Constructor Summary
AbstractExtent(ExecutionContext ec, java.lang.Class cls, boolean subclasses, AbstractClassMetaData cmd)
          Constructor.
 
Method Summary
 java.lang.Class getCandidateClass()
          Accessor for the class of instances in this Extent.
 ExecutionContext getExecutionContext()
          Accessor for the owning execution context.
 boolean hasSubclasses()
          Returns whether this Extent was defined to contain subclasses.
 java.lang.String toString()
          Stringifier method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.datanucleus.store.Extent
close, closeAll, getFetchPlan, iterator
 

Field Detail

LOCALISER

protected static final Localiser LOCALISER
Localised messages source


ec

protected final ExecutionContext ec
ExecutionContext


candidateClass

protected final java.lang.Class candidateClass
The candidate class. We store the class since we need to retain it for class loading.


subclasses

protected final boolean subclasses
Whether to include subclasses.


cmd

protected final AbstractClassMetaData cmd
ClassMetaData for the candidate class.


storeMgr

protected final StoreManager storeMgr
Manager for the Store.

Constructor Detail

AbstractExtent

public AbstractExtent(ExecutionContext ec,
                      java.lang.Class cls,
                      boolean subclasses,
                      AbstractClassMetaData cmd)
Constructor.

Parameters:
ec - Execution Context
cls - candidate class
subclasses - Whether to include subclasses
cmd - MetaData for the candidate class
Method Detail

hasSubclasses

public boolean hasSubclasses()
Returns whether this Extent was defined to contain subclasses.

Specified by:
hasSubclasses in interface Extent
Returns:
true if this Extent was defined to include subclasses.

getCandidateClass

public java.lang.Class getCandidateClass()
Accessor for the class of instances in this Extent.

Specified by:
getCandidateClass in interface Extent
Returns:
the Class of instances of this Extent

getExecutionContext

public ExecutionContext getExecutionContext()
Accessor for the owning execution context.

Specified by:
getExecutionContext in interface Extent
Returns:
execution context

toString

public java.lang.String toString()
Stringifier method.

Overrides:
toString in class java.lang.Object
Returns:
Stringified form of this object


Copyright © 2011. All Rights Reserved.