org.geotools.data.store
Class ContentEntry

Object
  extended by ContentEntry

public final class ContentEntry
extends Object

An entry for a type or feature source provided by a datastore.

This class is only of concern to subclasses, client code should never see this class.

An entry maintains state on a per-transaction basis. The getState(Transaction) method is used to get at this state.

   
   ContentEntry entry = ...;
   
   Transaction tx1 = new Transaction();
   Transaction tx2 = new Transaction();
   
   ContentState s1 = entry.getState( tx1 );
   ContentState s2 = entry.getState( tx2 );
   
   s1 != s2;
   
 

Author:
Jody Garnett, Refractions Research Inc., Justin Deoliveira, The Open Planning Project
Module:
modules/library/data (gt-data.jar)

Constructor Summary
ContentEntry(ContentDataStore dataStore, Name typeName)
          Creates the entry.
 
Method Summary
 void dispose()
          Disposes the entry by disposing all maintained state.
 ContentDataStore getDataStore()
          Backpointer to datastore.
 Name getName()
          Qualified name of the entry.
 ContentState getState(Transaction transaction)
          Returns state for the entry for a particular transaction.
 String getTypeName()
          Unqualified name of the entry.
 String toString()
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ContentEntry

public ContentEntry(ContentDataStore dataStore,
                    Name typeName)
Creates the entry.

Parameters:
dataStore - The datastore of the entry.
typeName - The name of the entry.
Method Detail

getName

public Name getName()
Qualified name of the entry.


getTypeName

public String getTypeName()
Unqualified name of the entry.

Equivalent to: getName().getLocalPart().


getDataStore

public ContentDataStore getDataStore()
Backpointer to datastore.


getState

public ContentState getState(Transaction transaction)
Returns state for the entry for a particular transaction.

In the event that no state exists for the supplied transaction one will be created by copying the state of Transaction.AUTO_COMMIT.

Parameters:
transaction - A transaction.
Returns:
The state for the transaction.

dispose

public void dispose()
Disposes the entry by disposing all maintained state.


toString

public String toString()
Overrides:
toString in class Object


Copyright © 1996-2009 Geotools. All Rights Reserved.