/** * <p>Return the value of the specified property of the specified bean, * no matter which property reference format is used, with no * type conversions.</p> * * <p>For more details see <code>PropertyUtilsBean</code>.</p> * * @param bean Bean whose property is to be extracted * @param name Possibly indexed and/or nested name of the property * to be extracted * @return the property value * * @throws IllegalAccessException if the caller does not have * access to the property accessor method * @throws IllegalArgumentException if <code>bean</code> or * <code>name</code> is null * @throws InvocationTargetException if the property accessor method * throws an exception * @throws NoSuchMethodException if an accessor method for this * propety cannot be found * @see PropertyUtilsBean#getProperty */ public static Object getProperty(final Object bean, final String name) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { return (PropertyUtilsBean.getInstance().getProperty(bean, name)); }
for (DynaProperty descriptor : descriptors) { final String name = descriptor.getName(); description.put(name, getProperty(bean, name)); final String name = descriptor.getName(); if (descriptor.getReadMethod() != null) { description.put(name, getProperty(bean, name));
final Object nestedBean = getProperty(bean, next); if (nestedBean == null) { throw new NestedNullException
final Object nestedBean = getProperty(bean, next); if (nestedBean == null) { throw new NestedNullException
/** * <p>Return the value of the specified property of the specified bean, * no matter which property reference format is used, with no * type conversions.</p> * * <p>For more details see <code>PropertyUtilsBean</code>.</p> * * @param bean Bean whose property is to be extracted * @param name Possibly indexed and/or nested name of the property * to be extracted * @return the property value * * @throws IllegalAccessException if the caller does not have * access to the property accessor method * @throws IllegalArgumentException if <code>bean</code> or * <code>name</code> is null * @throws InvocationTargetException if the property accessor method * throws an exception * @throws NoSuchMethodException if an accessor method for this * propety cannot be found * @see PropertyUtilsBean#getProperty */ public static Object getProperty(final Object bean, final String name) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { return (PropertyUtilsBean.getInstance().getProperty(bean, name)); }
for (DynaProperty descriptor : descriptors) { final String name = descriptor.getName(); description.put(name, getProperty(bean, name)); final String name = descriptor.getName(); if (descriptor.getReadMethod() != null) { description.put(name, getProperty(bean, name));
while (resolver.hasNested(name)) { try { target = getPropertyUtils().getProperty(target, resolver.next(name)); name = resolver.remove(name); } catch (final NoSuchMethodException e) {
private Object getProperty(Object object, String propertyPath) { try { return beanUtilsBean.getPropertyUtils().getProperty(object, propertyPath); } catch (Exception e) { throw new ConfigurationException("Unable to access property '" + propertyPath + "'", e); } }
Object nestedBean = null; try { nestedBean = getProperty(bean, next); } catch (final IllegalAccessException e) { return false;
NoSuchMethodException { final Object value = getPropertyUtils().getProperty(bean, name); if (value == null) { return (null);
Object nestedBean = null; try { nestedBean = getProperty(bean, next); } catch (final IllegalAccessException e) { return false;
NoSuchMethodException { final Object value = getPropertyUtils().getProperty(bean, name); if (value == null) { return (null);
Object nestedBean = null; try { nestedBean = getProperty(bean, next); } catch (final IllegalAccessException e) { return false;
@SuppressWarnings("unchecked") protected boolean doRWAccess(FieldScopeDataAccessConfig access, AuthorizingContext context, Object controller) { //获取注解 Object id = context.getParamContext().<String>getParameter(context.getDefinition().getDataAccessDefinition().getIdParameterName()).orElse(null); //通过QueryController获取QueryService //然后调用selectByPk 查询旧的数据,进行对比 if (controller instanceof QueryController) { QueryService queryService = (QueryService) ((QueryController) controller).getService(); Object oldData = queryService.selectByPk(id); if (oldData != null) { try { Object value = propertyUtilsBean.getProperty(oldData, access.getField()); return access.getScope().contains(value); } catch (Exception e) { logger.error("can't read property {}", access.getField(), e); } return false; } } else { logger.warn("controller is not instanceof QueryController"); } return true; }
Object nestedBean = null; try { nestedBean = getProperty(bean, next); } catch (final IllegalAccessException e) { return false;
while (resolver.hasNested(name)) { try { target = getPropertyUtils().getProperty(target, resolver.next(name)); name = resolver.remove(name); } catch (final NoSuchMethodException e) {
while (resolver.hasNested(name)) { try { target = getPropertyUtils().getProperty(target, resolver.next(name)); name = resolver.remove(name); } catch (final NoSuchMethodException e) {
final Object nestedBean = getProperty(bean, next); if (nestedBean == null) { throw new NestedNullException
final Object nestedBean = getProperty(bean, next); if (nestedBean == null) { throw new NestedNullException
value = propertyUtils.getProperty(param.getData(), columnMetaData.getAlias()); if (value == null) { return;