org.apache.ojb.broker.util.sequence
Class SequenceManagerMySQLImpl

java.lang.Object
  extended byorg.apache.ojb.broker.util.sequence.SequenceManagerMySQLImpl
All Implemented Interfaces:
SequenceManager

Deprecated. this SequenceManager implementation is outdated and will be removed, use SequenceManagerNativeImpl instead

public class SequenceManagerMySQLImpl
extends java.lang.Object
implements SequenceManager

MySQL SequenceManager for use with auto_increment columns.

WARNING: Not thoroughly tested, use at own risk. ;-)
Native key generation is not extent aware if the extent persistent objects using different database tables.

Implementation configuration properties:

Property Key Property Values
none


Version:
$Id: SequenceManagerMySQLImpl.java,v 1.17 2004/01/07 20:10:45 arminw Exp $
Author:
Travis Reeder - travis@spaceprogram.com

Constructor Summary
SequenceManagerMySQLImpl(PersistenceBroker broker)
          Deprecated.  
 
Method Summary
 void afterStore(org.apache.ojb.broker.accesslayer.JdbcAccess dbAccess, ClassDescriptor cld, java.lang.Object obj)
          Deprecated. This is to support auto_increment columns on the db side *
 int getUniqueId(FieldDescriptor field)
          Deprecated. returns a unique int for class clazz and field fieldName.
 java.lang.Object getUniqueValue(FieldDescriptor field)
          Deprecated. Returns a unique object for the given field attribute.
 void setReferenceFKs(java.lang.Object obj, ClassDescriptor cld)
          Deprecated. This is used for database auto_increment/identity columns to set the reference foreign keys after they've been assigned by the db.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SequenceManagerMySQLImpl

public SequenceManagerMySQLImpl(PersistenceBroker broker)
Deprecated. 
Method Detail

getUniqueId

public int getUniqueId(FieldDescriptor field)
                throws SequenceManagerException
Deprecated. 
returns a unique int for class clazz and field fieldName. the returned uid is unique accross all tables in the extent of clazz.

Throws:
SequenceManagerException

afterStore

public void afterStore(org.apache.ojb.broker.accesslayer.JdbcAccess dbAccess,
                       ClassDescriptor cld,
                       java.lang.Object obj)
                throws SequenceManagerException
Deprecated. 
Description copied from interface: SequenceManager
This is to support auto_increment columns on the db side *

* high/low and other implementations may ignore this method. *

* Travis Reeder * * @param cld * @param obj

Specified by:
afterStore in interface SequenceManager
Throws:
SequenceManagerException

setReferenceFKs

public void setReferenceFKs(java.lang.Object obj,
                            ClassDescriptor cld)
                     throws SequenceManagerException
Deprecated. 
Description copied from interface: SequenceManager
This is used for database auto_increment/identity columns to set the reference foreign keys after they've been assigned by the db.

This can be ignored by high/low implementations

Travis Reeder

Specified by:
setReferenceFKs in interface SequenceManager
Parameters:
obj -
cld -
Throws:
SequenceManagerException

getUniqueValue

public java.lang.Object getUniqueValue(FieldDescriptor field)
                                throws SequenceManagerException
Deprecated. 
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
Throws:
SequenceManagerException


Authors: Thomas Mahler and others. (C) 2000 - 2003 Apache Software Foundation
All rights reserved. Published under the Apache License.
http://db.apache.org/ojb
Version: 1.0.rc5, 2003-12-14