public HibernateEntityValueEncoder(Class<E> entityClass, String identifierPropertyName, Session session, PropertyAccess propertyAccess, TypeCoercer typeCoercer, Logger logger) { this.entityClass = entityClass; this.session = session; this.typeCoercer = typeCoercer; this.logger = logger; propertyAdapter = propertyAccess.getAdapter(this.entityClass).getPropertyAdapter(identifierPropertyName); }
public void run() { propertyAccess.clearCache(); typeCoercer.clearCache(); } };
public HibernateEntityValueEncoder(Class<E> entityClass, String identifierPropertyName, Session session, PropertyAccess propertyAccess, TypeCoercer typeCoercer, Logger logger) { this.entityClass = entityClass; this.session = session; this.typeCoercer = typeCoercer; this.logger = logger; propertyAdapter = propertyAccess.getAdapter(this.entityClass).getPropertyAdapter(identifierPropertyName); }
public ExceptionAnalyzerImpl(PropertyAccess propertyAccess) { this.propertyAccess = propertyAccess; throwableProperties = CollectionFactory.newSet(this.propertyAccess.getAdapter(Throwable.class) .getPropertyNames()); }
public ExceptionAnalyzerImpl(PropertyAccess propertyAccess) { this.propertyAccess = propertyAccess; throwableProperties = CollectionFactory.newSet(this.propertyAccess.getAdapter(Throwable.class) .getPropertyNames()); }
protected final void train_getAdapter(PropertyAccess access, Object object, ClassPropertyAdapter classPropertyAdapter) { expect(access.getAdapter(object)).andReturn(classPropertyAdapter); }
ClassPropertyAdapter adapter = access.getAdapter(current);
public PropertyAdapter findPropertyAdapter(Type activeType, String propertyName) { Class activeClass = GenericsUtils.asClass(activeType); ClassPropertyAdapter classAdapter = access.getAdapter(activeClass); PropertyAdapter adapter = classAdapter.getPropertyAdapter(propertyName); if (adapter == null) { final List<String> names = classAdapter.getPropertyNames(); final String className = activeClass.getName(); throw new UnknownValueException(String.format( "Class %s does not contain a property (or public field) named '%s'.", className, propertyName), new AvailableValues("Properties (and public fields)", names)); } return adapter; }
final PropertyAdapter adapter = propertyAccess.getAdapter(sourceClass).getPropertyAdapter(propertyName);
final PropertyAdapter adapter = propertyAccess.getAdapter(sourceClass).getPropertyAdapter(propertyName);
@SuppressWarnings({ "unchecked", "rawtypes" }) public String getLabel(Object object) { final ClassPropertyAdapter classPropertyAdapter = this.propertyAccess.getAdapter(object); final PropertyAdapter propertyAdapter = classPropertyAdapter .getPropertyAdapter(labelProperty); final ValueEncoder encoder = this.valueEncoderSource.getValueEncoder(propertyAdapter .getType()); final Object label = propertyAdapter.get(object); return encoder.toClient(label); } }
ClassPropertyAdapter adapter = propertyAccess.getAdapter(t);
ClassPropertyAdapter adapter = propertyAccess.getAdapter(t);
public JpaValueEncoder(final EntityType<E> entity, final EntityManagerManager entityManagerManager, final String persistenceUnitName, final PropertyAccess propertyAccess, final TypeCoercer typeCoercer, final Logger logger) { super(); this.entity = entity; this.entityManagerManager = entityManagerManager; this.persistenceUnitName = persistenceUnitName; this.typeCoercer = typeCoercer; this.logger = logger; final Type<?> idType = this.entity.getIdType(); final SingularAttribute<? super E, ?> idAttribute = this.entity.getId(idType.getJavaType()); idPropertyName = idAttribute.getName(); propertyAdapter = propertyAccess.getAdapter(entity.getJavaType()).getPropertyAdapter( idPropertyName); }
public JpaValueEncoder(final EntityType<E> entity, final EntityManagerManager entityManagerManager, final String persistenceUnitName, final PropertyAccess propertyAccess, final TypeCoercer typeCoercer, final Logger logger) { super(); this.entity = entity; this.entityManagerManager = entityManagerManager; this.persistenceUnitName = persistenceUnitName; this.typeCoercer = typeCoercer; this.logger = logger; final Type<?> idType = this.entity.getIdType(); final SingularAttribute<? super E, ?> idAttribute = this.entity.getId(idType.getJavaType()); idPropertyName = idAttribute.getName(); propertyAdapter = propertyAccess.getAdapter(entity.getJavaType()).getPropertyAdapter( idPropertyName); }
public Binding defaultBinding(String parameterName, ComponentResources resources) { assert InternalUtils.isNonBlank(parameterName); assert resources != null; String componentId = resources.getId(); Component container = resources.getContainer(); // Only provide a default binding if the container actually contains the property. // This sets up an error condition for when the parameter is not bound, and // the binding can't be deduced. if (propertyAccess.getAdapter(container).getPropertyAdapter(componentId) == null) return null; ComponentResources containerResources = resources.getContainerResources(); return bindingSource.newBinding( "default " + parameterName, containerResources, BindingConstants.PROP, componentId); }
ClassPropertyAdapter adapter = propertyAccess.getAdapter(beanClass);