Class SequenceManagerMSSQLGuidImpl

  extended by
      extended by
All Implemented Interfaces:

public class SequenceManagerMSSQLGuidImpl
extends AbstractSequenceManager

An Implementation Class that will retrieve a valid new value for a PK field that is of type 'uniqueidentifier'. Since values for these types are generated through a 'newid()' call to MSSQL Server, this class is only valid for MSSQL Server 7.0 and up.
This SequenceManager can be used for any classes that have their PK defined as a 'uniqueidetifier'

$Id: 365232 2005-12-21 22:36:07Z tomdz $
Andrew Clute

Field Summary
Fields inherited from class
Constructor Summary
SequenceManagerMSSQLGuidImpl(PersistenceBroker broker)
          Constructor used by SequenceManagerFactory
Method Summary
 java.lang.Object getUniqueValue(FieldDescriptor field)
          Returns a unique object for the given field attribute.
Methods inherited from class
afterStore, calculateSequenceName, getBrokerForClass, getConfigurationProperties, getConfigurationProperty, getPlatform, setConfigurationProperties, setConfigurationProperty, setReferenceFKs, useAutoNaming
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public SequenceManagerMSSQLGuidImpl(PersistenceBroker broker)
Constructor used by SequenceManagerFactory

broker - PB instance to perform the id generation.
Method Detail


public java.lang.Object getUniqueValue(FieldDescriptor field)
                                throws SequenceManagerException
Description copied from class: AbstractSequenceManager
Returns a unique object for the given field attribute. The returned value takes in account the jdbc-type and the FieldConversion.sql2java() conversion defined for field. The returned object is unique accross all tables in the extent of class the field belongs to.

Specified by:
getUniqueValue in interface SequenceManager
getUniqueValue in class AbstractSequenceManager

(C) 2002 - 2006 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
Version: 1.0.4, 2005-12-30