public FieldDescriptor getAutoIncrementField ( ) { if ( m_autoIncrementField == null ) { FieldDescriptor [ ] fds = getPkFields ( ) ; for ( int i = 0 ; i < fds . length ; i ++ ) { FieldDescriptor fd = fds [ i ] ; if ( fd . isAutoIncrement ( ) ) { m_autoIncrementField = fd ; break ; } } } if ( m_autoIncrementField == null ) { LoggerFactory . getDefaultLogger ( ) . warn ( this . getClass ( ) . getName ( ) + ": " + "Could not find autoincrement attribute for class: " + this . getClassNameOfObject ( ) ) ; } return m_autoIncrementField ; }
Returns the first found autoincrement field defined in this class descriptor . Use carefully when multiple autoincrement field were defined .