How to use modeling to set the connection type as dashed ''Association'

image
How to use the api method to set the connection line type, such as dotted line. Who knows which api is used to set this

Do you want to override the style completely or do you want to be able to switch on demand?