|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ojb.broker.util.sequence.AbstractSequenceManager
org.apache.ojb.broker.util.sequence.SequenceManagerMSSQLGuidImpl
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'
Field Summary |
Fields inherited from class org.apache.ojb.broker.util.sequence.AbstractSequenceManager |
PROPERTY_AUTO_NAMING |
Constructor Summary | |
SequenceManagerMSSQLGuidImpl(PersistenceBroker broker)
Constructor used by SequenceManagerFactory |
Method Summary | |
protected int |
getUniqueId(FieldDescriptor field)
Returns a new unique int for the given Class and fieldname. |
protected long |
getUniqueLong(FieldDescriptor field)
Returns a new unique int for the given Class and fieldname. |
protected java.lang.String |
getUniqueString(FieldDescriptor field)
returns a unique String for given field. |
java.lang.Object |
getUniqueValue(FieldDescriptor field)
Returns a unique object for the given field attribute. |
Methods inherited from class org.apache.ojb.broker.util.sequence.AbstractSequenceManager |
afterStore, calculateSequenceName, getBrokerForClass, getConfigurationProperties, getConfigurationProperty, getPlatform, setConfigurationProperties, setConfigurationProperty, setReferenceFKs, useAutoNaming |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SequenceManagerMSSQLGuidImpl(PersistenceBroker broker)
SequenceManagerFactory
broker
- PB instance to perform the
id generation.Method Detail |
public java.lang.Object getUniqueValue(FieldDescriptor field) throws SequenceManagerException
AbstractSequenceManager
field
.
The returned object is unique accross all tables in the extent
of class the field belongs to.
getUniqueValue
in interface SequenceManager
getUniqueValue
in class AbstractSequenceManager
SequenceManagerException
protected java.lang.String getUniqueString(FieldDescriptor field) throws SequenceManagerException
SequenceManagerException
protected int getUniqueId(FieldDescriptor field) throws SequenceManagerException
SequenceManagerException
protected long getUniqueLong(FieldDescriptor field) throws SequenceManagerException
getUniqueLong
in class AbstractSequenceManager
SequenceManagerException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |