private static < T > boolean canGenerate ( final DynamoDBMapperTableModel < T > model , final T object , final SaveBehavior saveBehavior , final DynamoDBMapperFieldModel < T , Object > field ) { if ( field . getGenerateStrategy ( ) == null ) { return false ; } else if ( field . getGenerateStrategy ( ) == DynamoDBAutoGenerateStrategy . ALWAYS ) { return true ; } else if ( field . get ( object ) != null ) { return false ; } else if ( field . keyType ( ) != null || field . indexed ( ) ) { return true ; } else if ( saveBehavior == SaveBehavior . CLOBBER || saveBehavior == SaveBehavior . UPDATE || saveBehavior == SaveBehavior . PUT ) { return true ; } else if ( anyKeyGeneratable ( model , object , saveBehavior ) ) { return true ; } return false ; }
Determines if the mapping value can be auto - generated .