Factory method for obtaining named cascade styles
STYLES.put( "all", ALL );
STYLES.put( "all-delete-orphan", ALL_DELETE_ORPHAN );
STYLES.put( "save-update", UPDATE );
STYLES.put( "persist", PERSIST );
STYLES.put( "merge", MERGE );
STYLES.put( "lock", LOCK );
STYLES.put( "refresh", REFRESH );
STYLES.put( "replicate", REPLICATE );
STYLES.put( "evict", EVICT );
STYLES.put( "delete", DELETE );
STYLES.put( "remove", DELETE ); // adds remove as a sort-of alias for delete...
STYLES.put( "delete-orphan", DELETE_ORPHAN );
STYLES.put( "none", NONE );
CascadeStyle style = (CascadeStyle) STYLES.get(cascade);
if (style==null) {
throw new MappingException("Unsupported cascade style: " + cascade);
}
else {
return style;
}