[Opensource] DBObject.haveAllKeys() test?

Mike Traum mtraum at jgroup.net
Mon Feb 9 09:53:02 PST 2004


I think this is done because this test is performed in DBObject.add()
before the auto-inc field is automatically generated.

mike

On Sun, 2004-02-08 at 03:36, larry hamel wrote:
> The second test below in haveAllKeys() doesn't make sense to me.  seems like DBObject.haveAllKeys() should not care about && isAutoIncremented() in that test.
> 
> am I missing something?
> 
> larry
> --------------------------------
> 
>     public boolean haveAllKeys()
>             throws DBException {
>         DBField oneField = null;
> 
>         for (Iterator i = this.getJDBCMetaData().getAllKeysMap().values().iterator(); i.hasNext();) {
>             oneField = (DBField) i.next();
>             DataField df = this.getDataField(oneField.getName());
>             if (df == null || ((df.isNull() && !oneField.isAutoIncremented()))) {
>                 return false;
>             }
>         }
> 
>         return true;
>     } /* haveAllKeys() */
> 
> 
> Larry Hamel
> ----------------------
> Free link-test tool (special handling for Expresso sites): http://morebot.org
> Custom web site development: http://codeguild.com
> 
> _______________________________________________
> Opensource mailing list
> Opensource at jcorporate.com
> http://mailman.jcorporate.com/mailman/listinfo/opensource
-- 

Mike Traum
--
JGroup Expert 
Expresso Core Developer 
Providing support and development services - Available Now!




More information about the Opensource mailing list