1 28 29 package com.caucho.amber.expr; 30 31 import com.caucho.amber.query.FromItem; 32 import com.caucho.amber.query.QueryParseException; 33 import com.caucho.amber.query.QueryParser; 34 import com.caucho.util.L10N; 35 36 39 public class OneToManySchemaExpr extends SchemaExpr { 40 private static final L10N L = new L10N(OneToManySchemaExpr.class); 41 42 private OneToManyExpr _expr; 43 44 47 public OneToManySchemaExpr(OneToManyExpr expr) 48 { 49 _expr = expr; 50 } 51 52 55 public String getTailName() 56 { 57 throw new UnsupportedOperationException (); 59 } 60 61 64 public SchemaExpr createField(QueryParser parser, String name) 65 throws QueryParseException 66 { 67 throw parser.error(L.l("collections in FROM may not be sub-collected.")); 68 } 69 70 73 public FromItem addFromItem(QueryParser parser, String id) 74 throws QueryParseException 75 { 76 _expr.bindSelect(parser, id); 77 78 FromItem fromItem = _expr.getChildFromItem(); 79 80 return fromItem; 81 } 82 } 83 | Popular Tags |