Example usage for org.hibernate.boot.model.naming ImplicitJoinTableNameSource getOwningPhysicalTableName

List of usage examples for org.hibernate.boot.model.naming ImplicitJoinTableNameSource getOwningPhysicalTableName

Introduction

In this page you can find the example usage for org.hibernate.boot.model.naming ImplicitJoinTableNameSource getOwningPhysicalTableName.

Prototype

public String getOwningPhysicalTableName();

Source Link

Document

Access to the physical name of the owning entity's primary table.

Usage

From source file:com.devnexus.ting.core.hibernate.DevNexusSpringImplicitNamingStrategy.java

License:Apache License

@Override
public Identifier determineJoinTableName(ImplicitJoinTableNameSource source) {
    String name = source.getOwningPhysicalTableName() + "_"
            + source.getAssociationOwningAttributePath().getProperty();
    return toIdentifier(name, source.getBuildingContext());
}

From source file:com.evolveum.midpoint.repo.sql.util.MidPointImplicitNamingStrategy.java

License:Apache License

@Override
public Identifier determineJoinTableName(ImplicitJoinTableNameSource source) {
    Identifier i = super.determineJoinTableName(source);

    LOGGER.trace("determineJoinTableName {} {} {} {} {} -> {}", source.getOwningEntityNaming(),
            source.getOwningPhysicalTableName(), source.getNonOwningEntityNaming(),
            source.getNonOwningPhysicalTableName(), source.getAssociationOwningAttributePath(), i);

    return i;//from www .  j  a v  a 2  s . c o m
}

From source file:com.example.ejb3.auction.NamingStrategy.java

License:Apache License

@Override
public Identifier determineJoinTableName(ImplicitJoinTableNameSource source) {
    if (source.getAssociationOwningAttributePath() != null) {
        final String name = source.getOwningPhysicalTableName() + '_'
                + transformAttributePath(source.getAssociationOwningAttributePath());

        return toIdentifier(name, source.getBuildingContext());
    }/*w  w w . j  a  v a  2 s.c  o  m*/

    return super.determineJoinTableName(source);
}

From source file:org.ligoj.bootstrap.core.dao.ImplicitNamingStrategyNiceJpaImpl.java

License:MIT License

@Override
public Identifier determineJoinTableName(final ImplicitJoinTableNameSource source) {
    final var name = source.getOwningPhysicalTableName() + '_'
            + transformAttributePath(source.getAssociationOwningAttributePath());
    return toIdentifier(name, source.getBuildingContext());
}