Example usage for org.hibernate.engine.spi CascadingActions PERSIST

List of usage examples for org.hibernate.engine.spi CascadingActions PERSIST

Introduction

In this page you can find the example usage for org.hibernate.engine.spi CascadingActions PERSIST.

Prototype

CascadingAction PERSIST

To view the source code for org.hibernate.engine.spi CascadingActions PERSIST.

Click Source Link

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);
}