org.jomc.sequences.ri
Class DefaultSequenceDirectory

Package class diagram package DefaultSequenceDirectory
java.lang.Object
  extended by org.jomc.sequences.ri.DefaultSequenceDirectory
All Implemented Interfaces:
org.jomc.sequences.SequenceDirectory, org.jomc.sequences.SequenceOperations

@Generated(value="org.jomc.tools.SourceFileProcessor 1.0",
           comments="See http://jomc.sourceforge.net/jomc/1.0/jomc-tools")
public class DefaultSequenceDirectory
extends Object
implements org.jomc.sequences.SequenceDirectory, org.jomc.sequences.SequenceOperations

SequenceDirectory reference implementation.

Specifications

Properties

Dependencies

Messages

Version:
$Id: DefaultSequenceDirectory.java 2247 2010-06-29 08:01:42Z schulte2005 $
Author:
Christian Schulte 1.0

Constructor Summary
Constructor and Description
DefaultSequenceDirectory()
          Creates a new DefaultSequenceDirectory instance.
 
Method Summary
Modifier and Type Method and Description
 org.jomc.sequences.Sequence addSequence(org.jomc.sequences.Sequence sequence)
           
 org.jomc.sequences.Sequence deleteSequence(String name, long revision)
           
 org.jomc.sequences.Sequence editSequence(String name, long revision, org.jomc.sequences.Sequence sequence)
           
protected  void fireSequenceChange(org.jomc.sequences.Sequence oldValue, org.jomc.sequences.Sequence newValue)
          Notifies all available SequenceChangeListeners about a changed sequence.
protected  void fireVetoableSequenceChange(org.jomc.sequences.Sequence oldValue, org.jomc.sequences.Sequence newValue)
          Notifies all available SequenceChangeListeners about a sequence about to change.
 BigInteger getCapacityLimit()
           
 long getNextSequenceValue(String sequenceName)
           
 long[] getNextSequenceValues(String sequenceName, int numValues)
           
 org.jomc.sequences.Sequence getSequence(String name)
           
 BigInteger getSequenceCount()
           
protected  org.jomc.sequences.model.SequencesType getSequencesType(String name)
          Gets a sequence directory entity for a given name.
protected  org.jomc.sequences.model.SequenceType getSequenceType(String name)
          Gets a sequence entity for a given name.
 Set<org.jomc.sequences.Sequence> searchSequences(String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSequenceDirectory

@Generated(value="org.jomc.tools.SourceFileProcessor 1.0",
           comments="See http://jomc.sourceforge.net/jomc/1.0/jomc-tools")
public DefaultSequenceDirectory()
Creates a new DefaultSequenceDirectory instance.

Method Detail

getSequenceCount

public BigInteger getSequenceCount()
Specified by:
getSequenceCount in interface org.jomc.sequences.SequenceDirectory

getCapacityLimit

public BigInteger getCapacityLimit()
Specified by:
getCapacityLimit in interface org.jomc.sequences.SequenceDirectory

getSequence

public org.jomc.sequences.Sequence getSequence(String name)
Specified by:
getSequence in interface org.jomc.sequences.SequenceDirectory

addSequence

public org.jomc.sequences.Sequence addSequence(org.jomc.sequences.Sequence sequence)
Specified by:
addSequence in interface org.jomc.sequences.SequenceDirectory

editSequence

public org.jomc.sequences.Sequence editSequence(String name,
                                                long revision,
                                                org.jomc.sequences.Sequence sequence)
Specified by:
editSequence in interface org.jomc.sequences.SequenceDirectory

deleteSequence

public org.jomc.sequences.Sequence deleteSequence(String name,
                                                  long revision)
Specified by:
deleteSequence in interface org.jomc.sequences.SequenceDirectory

searchSequences

public Set<org.jomc.sequences.Sequence> searchSequences(String name)
Specified by:
searchSequences in interface org.jomc.sequences.SequenceDirectory

getNextSequenceValue

public long getNextSequenceValue(String sequenceName)
Specified by:
getNextSequenceValue in interface org.jomc.sequences.SequenceOperations

getNextSequenceValues

public long[] getNextSequenceValues(String sequenceName,
                                    int numValues)
Specified by:
getNextSequenceValues in interface org.jomc.sequences.SequenceOperations

getSequenceType

protected org.jomc.sequences.model.SequenceType getSequenceType(String name)
Gets a sequence entity for a given name.

Parameters:
name - The name of the sequence entity to return.
Returns:
The sequence entity with name name, or null if no sequence entity matching name is found.

getSequencesType

protected org.jomc.sequences.model.SequencesType getSequencesType(String name)
Gets a sequence directory entity for a given name.

Parameters:
name - The name of the sequence directory entity to return.
Returns:
The sequence directory entity matching name; if no such sequence directory entity is found, a new entity is created.

fireSequenceChange

protected void fireSequenceChange(org.jomc.sequences.Sequence oldValue,
                                  org.jomc.sequences.Sequence newValue)
Notifies all available SequenceChangeListeners about a changed sequence.

Parameters:
oldValue - The entity having been changed or null if newValue got added to the directory.
newValue - The value oldValue got changed to or null if oldValue got removed from the directory.

fireVetoableSequenceChange

protected void fireVetoableSequenceChange(org.jomc.sequences.Sequence oldValue,
                                          org.jomc.sequences.Sequence newValue)
Notifies all available SequenceChangeListeners about a sequence about to change.

Parameters:
oldValue - The entity about to change or null if newValue is about to be added to the directory.
newValue - The value oldValue will change to or null if oldValue will be removed from the directory.
Throws:
org.jomc.sequences.SequenceVetoException - if any available SequenceChangeListener chooses to veto the sequence change.


Copyright © 2005-2010 The JOMC Project. All Rights Reserved.