Created
December 5, 2019 13:32
-
-
Save sebersole/32e8c18911112e837a211f93c03abbc0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TableGroupImpl ... { | |
private final TableReference primaryRef; | |
private final BiFunction<TableReference,String,TableReferenceJoin> joinCreator; | |
private List<TableReferenceJoin> tableJoins; | |
... | |
@Override | |
public TableReference resolveTableReference(String tableExpression) { | |
if ( primaryRef... ) { | |
... | |
} | |
TableReferenceJoin existing = null; | |
if ( tableJoins == null ) { | |
tableJoins = new ...; | |
} | |
else { | |
for (TableReferenceJoin trj : tableJoins ) { | |
if ( ... ) { | |
existing = trj; | |
break; | |
} | |
} | |
} | |
if ( existing != null ) { | |
return existing; | |
} | |
final TableReferenceJoin trj = joinCreator.apply( primaryRef, tableExpression ); | |
tableJoins.add( trj ); | |
return trj; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment