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