public String updateCollection(final Key key) {
        if (key.getCollection() == null && key.getType() == null) {
            throw new IllegalStateException("Key is invalid! " + toString());
        } else if (key.getCollection() == null) {
            key.setCollection(getMappedClass(key.getType()).getCollectionName());
        }

        return key.getCollection();
    }
public String updateCollection ( final Key key ) { if ( key . getCollection ( ) == null && key . getType ( ) == null ) { throw new IllegalStateException ( "Key is invalid! " + toString ( ) ) ; } else if ( key . getCollection ( ) == null ) { key . setCollection ( getMappedClass ( key . getType ( ) ) . getCollectionName ( ) ) ; } return key . getCollection ( ) ; }
Updates the collection value on a Key with the mapped value on the Key's type Class

@param key the Key to update
@return the collection name on the Key