}
@Override
public TableSource getPrimaryTable() {
if ( JaxbJoinedSubclassElement.class.isInstance( entityElement() ) ) {
return new TableSource() {
@Override
public String getExplicitSchemaName() {
return ( (JaxbJoinedSubclassElement) entityElement() ).getSchema();
}
@Override
public String getExplicitCatalogName() {
return ( (JaxbJoinedSubclassElement) entityElement() ).getCatalog();
}
@Override
public String getExplicitTableName() {
return ( (JaxbJoinedSubclassElement) entityElement() ).getTable();
}
@Override
public String getLogicalName() {
// logical name for the primary table is null
return null;
}
};
}
else if ( JaxbUnionSubclassElement.class.isInstance( entityElement() ) ) {
return new TableSource() {
@Override
public String getExplicitSchemaName() {
return ( (JaxbUnionSubclassElement) entityElement() ).getSchema();
}