Example usage for org.hibernate.mapping Value setTypeUsingReflection

List of usage examples for org.hibernate.mapping Value setTypeUsingReflection

Introduction

In this page you can find the example usage for org.hibernate.mapping Value setTypeUsingReflection.

Prototype

public void setTypeUsingReflection(String className, String propertyName) throws MappingException;

Source Link

Usage

From source file:org.codehaus.groovy.grails.orm.hibernate.cfg.AbstractGrailsDomainBinder.java

License:Apache License

protected Property createProperty(Value value, PersistentClass persistentClass,
        GrailsDomainClassProperty grailsProperty, Mappings mappings) {
    // set type/*from w  w  w  .j  a  v  a2  s  . c  o m*/
    value.setTypeUsingReflection(persistentClass.getClassName(), grailsProperty.getName());

    if (value.getTable() != null) {
        value.createForeignKey();
    }

    Property prop = new Property();
    prop.setValue(value);
    bindProperty(grailsProperty, prop, mappings);
    return prop;
}

From source file:org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsDomainBinder.java

License:Apache License

private static Property createProperty(Value value, PersistentClass persistentClass,
        GrailsDomainClassProperty grailsProperty, Mappings mappings) {
    // set type//from  www.j a va2 s  .  c o  m
    value.setTypeUsingReflection(persistentClass.getClassName(), grailsProperty.getName());

    if (value.getTable() != null) {
        value.createForeignKey();
    }

    Property prop = new Property();
    prop.setValue(value);
    bindProperty(grailsProperty, prop, mappings);
    return prop;
}

From source file:org.grails.orm.hibernate.cfg.AbstractGrailsDomainBinder.java

License:Apache License

protected Property createProperty(Value value, PersistentClass persistentClass,
        PersistentProperty grailsProperty, Mappings mappings) {
    // set type/*ww  w.ja  v  a2  s  .  c  o  m*/
    value.setTypeUsingReflection(persistentClass.getClassName(), grailsProperty.getName());

    if (value.getTable() != null) {
        value.createForeignKey();
    }

    Property prop = new Property();
    prop.setValue(value);
    bindProperty(grailsProperty, prop, mappings);
    return prop;
}

From source file:org.grails.orm.hibernate.cfg.GrailsDomainBinder.java

License:Apache License

protected Property createProperty(Value value, PersistentClass persistentClass,
        PersistentProperty grailsProperty, InFlightMetadataCollector mappings) {
    // set type/*w w w .  j a v  a2s  .co m*/
    value.setTypeUsingReflection(persistentClass.getClassName(), grailsProperty.getName());

    if (value.getTable() != null) {
        value.createForeignKey();
    }

    Property prop = new Property();
    prop.setValue(value);
    bindProperty(grailsProperty, prop, mappings);
    return prop;
}