1 28 29 package com.caucho.amber.query; 30 31 import com.caucho.util.L10N; 32 33 36 public class OneToManySchemaExpr extends SchemaExpr { 37 private static final L10N L = new L10N(OneToManySchemaExpr.class); 38 39 private OneToManyExpr _expr; 40 41 44 public OneToManySchemaExpr(OneToManyExpr expr) 45 { 46 _expr = expr; 47 } 48 49 52 public String getTailName() 53 { 54 throw new UnsupportedOperationException(); 56 } 57 58 61 public SchemaExpr createField(QueryParser parser, String name) 62 throws QueryParseException 63 { 64 throw parser.error(L.l("collections in FROM may not be sub-collected.")); 65 } 66 67 70 public FromItem addFromItem(QueryParser parser, String id) 71 throws QueryParseException 72 { 73 _expr.bindSelect(parser, id); 74 75 FromItem fromItem = _expr.getChildFromItem(); 76 77 return fromItem; 78 } 79 } 80 | Popular Tags |