String name = parseIdentifier();
SchemaExpr schema = null;
if (! isIn) {
AmberEntityHome home = _persistenceUnit.getHomeBySchema(name);
if (home != null) {
EntityType type = home.getEntityType();
schema = new TableIdExpr(home.getEntityType(),
type.getTable().getName());
}
}
IdExpr id = null;
if (schema == null) {
id = getIdentifier(name);
if (id != null)
schema = new FromIdSchemaExpr(id);
}
if (! isIn && schema == null) {
while (peekToken() == '.') {
scanToken();
String segment = parseIdentifier();
name = name + '.' + segment;
AmberEntityHome home = _persistenceUnit.getHomeBySchema(name);
if (home != null) {
schema = new TableIdExpr(home.getEntityType(), name);
break;
}
}
}