Class ContentEntry

  • Direct Known Subclasses:
    MemoryEntry

    public 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.

    Each 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
    • 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.
      • clearTransaction

        public void clearTransaction​(Transaction transaction)
        Removes a closed transaction from the state cache.