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