/** * Find a BeanProperty including searching the inheritance hierarchy. * <p> * This searches this BeanDescriptor and then searches further down the * inheritance tree (not up). * </p> */ @Override public BeanProperty findProperty(String propName) { int basePos = propName.indexOf('.'); if (basePos > -1) { // embedded property String baseName = propName.substring(0, basePos); return _findBeanProperty(baseName); } return _findBeanProperty(propName); }
/** * Return a property that is part of the SQL tree. * <p> * The property can be a dynamic formula or a well known bean property. */ @Override public STreeProperty findPropertyWithDynamic(String propName, String path) { if (propName.indexOf('(') > -1) { return findSqlTreeFormula(propName, path); } return _findBeanProperty(propName); }
/** * Return the bean property traversing the object graph and taking into * account inheritance. */ @Override public BeanProperty findPropertyFromPath(String path) { BeanDescriptor<?> other = this; while (true) { String[] split = SplitName.splitBegin(path); if (split[1] == null) { return other._findBeanProperty(split[0]); } BeanPropertyAssoc<?> assocProp = (BeanPropertyAssoc<?>) other._findBeanProperty(split[0]); BeanDescriptor<?> targetDesc = assocProp.getTargetDescriptor(); path = split[1]; other = targetDesc; } }
BeanProperty assocProp = _findBeanProperty(baseName); if (assocProp == null) { return null; BeanProperty property = _findBeanProperty(propName); if (chain == null) { return property;
BeanProperty targetProperty = descriptor._findBeanProperty(logicalName); String parsedAggregation = buildFormula(parsed); return new DynamicPropertyAggregationFormula(logicalName, scalarType, parsedAggregation, isAggregate(), targetProperty, alias);
/** * Find a BeanProperty including searching the inheritance hierarchy. * <p> * This searches this BeanDescriptor and then searches further down the * inheritance tree (not up). * </p> */ @Override public BeanProperty findProperty(String propName) { int basePos = propName.indexOf('.'); if (basePos > -1) { // embedded property String baseName = propName.substring(0, basePos); return _findBeanProperty(baseName); } return _findBeanProperty(propName); }
/** * Return a property that is part of the SQL tree. * <p> * The property can be a dynamic formula or a well known bean property. */ @Override public STreeProperty findPropertyWithDynamic(String propName, String path) { if (propName.indexOf('(') > -1) { return findSqlTreeFormula(propName, path); } return _findBeanProperty(propName); }
/** * Return the bean property traversing the object graph and taking into * account inheritance. */ @Override public BeanProperty findPropertyFromPath(String path) { BeanDescriptor<?> other = this; while (true) { String[] split = SplitName.splitBegin(path); if (split[1] == null) { return other._findBeanProperty(split[0]); } BeanPropertyAssoc<?> assocProp = (BeanPropertyAssoc<?>) other._findBeanProperty(split[0]); BeanDescriptor<?> targetDesc = assocProp.getTargetDescriptor(); path = split[1]; other = targetDesc; } }
BeanProperty assocProp = _findBeanProperty(baseName); if (assocProp == null) { return null; BeanProperty property = _findBeanProperty(propName); if (chain == null) { return property;
BeanProperty targetProperty = descriptor._findBeanProperty(logicalName); String parsedAggregation = buildFormula(parsed); return new DynamicPropertyAggregationFormula(logicalName, scalarType, parsedAggregation, isAggregate(), targetProperty, alias);