Example usage for org.hibernate.engine.spi CascadeStyle doCascade

List of usage examples for org.hibernate.engine.spi CascadeStyle doCascade

Introduction

In this page you can find the example usage for org.hibernate.engine.spi CascadeStyle doCascade.

Prototype

public boolean doCascade(CascadingAction action);

Source Link

Document

For this style, should the given action be cascaded?

Usage

From source file:tools.xor.util.Hibernate4Support.java

License:Apache License

@Override
public boolean isCascaded(Configuration configuration, String entityName, String inputPropertyName) {

    if (configuration.getClassMapping(entityName) == null)
        return false;

    Property property = configuration.getClassMapping(entityName).getProperty(inputPropertyName);
    CascadeStyle style = property.getCascadeStyle();

    return style.doCascade(CascadingActions.SAVE_UPDATE) || style.doCascade(CascadingActions.PERSIST);
}