Java 类org.hibernate.boot.model.naming.ImplicitJoinTableNameSource 实例源码

项目:bootstrap    文件:ImplicitNamingStrategyNiceJpaImplTest.java   
@Test
public void determineJoinTableName() {
    final ImplicitJoinTableNameSource source = Mockito.mock(ImplicitJoinTableNameSource.class);
    mockContext(source);
    final AttributePath attributePath= Mockito.mock(AttributePath.class);
    Mockito.when(attributePath.getProperty()).thenReturn("myProperty");
    Mockito.when(source.getAssociationOwningAttributePath()).thenReturn(attributePath);
    Mockito.when(source.getOwningPhysicalTableName()).thenReturn("Table1");
    final Identifier identifier = new ImplicitNamingStrategyNiceJpaImpl().determineJoinTableName(source);
    Assert.assertEquals("Table1_my_property", identifier.getText());
}
项目:springuni-particles    文件:ImprovedImplicitNamingStrategy.java   
@Override
public Identifier determineJoinTableName(ImplicitJoinTableNameSource source) {
  String name = source.getOwningPhysicalTableName() + "_"
      + source.getAssociationOwningAttributePath().getProperty();
  return toIdentifier(name, source.getBuildingContext());
}
项目:bootstrap    文件:ImplicitNamingStrategyNiceJpaImpl.java   
@Override
public Identifier determineJoinTableName(final ImplicitJoinTableNameSource source) {
    final String name = source.getOwningPhysicalTableName() + '_' + transformAttributePath(source.getAssociationOwningAttributePath());
    return toIdentifier(name, source.getBuildingContext());
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:SpringImplicitNamingStrategy.java   
@Override
public Identifier determineJoinTableName(ImplicitJoinTableNameSource source) {
    String name = source.getOwningPhysicalTableName() + "_"
            + source.getAssociationOwningAttributePath().getProperty();
    return toIdentifier(name, source.getBuildingContext());
}
项目:spring-boot-concourse    文件:SpringImplicitNamingStrategy.java   
@Override
public Identifier determineJoinTableName(ImplicitJoinTableNameSource source) {
    String name = source.getOwningPhysicalTableName() + "_"
            + source.getAssociationOwningAttributePath().getProperty();
    return toIdentifier(name, source.getBuildingContext());
}