1 28 29 package com.caucho.amber.query; 30 31 import com.caucho.util.L10N; 32 33 import com.caucho.amber.AmberRuntimeException; 34 35 import com.caucho.amber.field.AmberField; 36 37 40 abstract public class AbstractPathExpr extends AbstractAmberExpr 41 implements PathExpr { 42 private static final L10N L = new L10N(AbstractPathExpr.class); 43 44 47 public AmberExpr createField(QueryParser parser, String fieldName) 48 { 49 AmberField field = getTargetType().getField(fieldName); 50 51 if (field == null) 52 throw new AmberRuntimeException(L.l("'{0}' is an unknown field of '{1}'.", 53 fieldName, getTargetType().getName())); 54 55 return field.createExpr(parser, this); 56 } 57 58 61 public AmberExpr createArray(AmberExpr field) 62 { 63 throw new UnsupportedOperationException(getClass().getName()); 64 } 65 66 69 public PathExpr bindSelect(QueryParser parser, String tableName) 70 { 71 return this; 72 } 73 74 77 public FromItem bindSubPath(QueryParser parser) 78 { 79 return null; 80 } 81 82 85 public FromItem getChildFromItem() 86 { 87 throw new UnsupportedOperationException(getClass().getName()); 88 } 89 } 90 | Popular Tags |