HHH-15251 - Unified mapping XSD based on JPA 3.1
- more work on HbmXmlTransformer
This commit is contained in:
parent
309edd9e32
commit
19f513dde2
|
@ -229,7 +229,10 @@ public class HbmXmlTransformer {
|
|||
}
|
||||
|
||||
private <T> void transfer(Supplier<T> source, Consumer<T> target) {
|
||||
target.accept( source.get() );
|
||||
final T value = source.get();
|
||||
if ( value != null ) {
|
||||
target.accept( value );
|
||||
}
|
||||
}
|
||||
|
||||
private void handleUnsupportedContent(String description) {
|
||||
|
@ -808,15 +811,14 @@ public class HbmXmlTransformer {
|
|||
if ( hbmClass.getTable() != null ) {
|
||||
entity.setTable( new JaxbTable() );
|
||||
transfer( hbmClass::getTable, entity.getTable()::setName );
|
||||
}
|
||||
else {
|
||||
transfer( hbmClass::getSubselect, entity::setTableExpression );
|
||||
}
|
||||
|
||||
transfer( hbmClass::getCatalog, entity.getTable()::setCatalog );
|
||||
transfer( hbmClass::getSchema, entity.getTable()::setSchema );
|
||||
transfer( hbmClass::getComment, entity.getTable()::setComment );
|
||||
transfer( hbmClass::getCheck, entity.getTable()::setCheck );
|
||||
}
|
||||
else {
|
||||
transfer( hbmClass::getSubselect, entity::setTableExpression );
|
||||
}
|
||||
|
||||
for ( JaxbHbmSynchronizeType hbmSync : hbmClass.getSynchronize() ) {
|
||||
final JaxbSynchronizedTable sync = new JaxbSynchronizedTable();
|
||||
|
|
Loading…
Reference in New Issue