/** * Determines if a reference property descriptor references an inline * component. * * @param componentDescriptorProvider * the reference property descriptor to test. * @return {@code true} if the reference property descriptor references * an inline component. */ public static boolean isInlineComponentReference(IComponentDescriptorProvider<?> componentDescriptorProvider) { IComponentDescriptor<?> componentDescriptor = componentDescriptorProvider.getComponentDescriptor(); return componentDescriptor != null && !componentDescriptor.isEntity() && !componentDescriptor.isPurelyAbstract(); }
IComponentDescriptor<?> referencedDescriptor = ((IReferencePropertyDescriptor<?>) propertyDescriptor) .getReferencedDescriptor(); if (referencedDescriptor.isEntity()) { if (!(value instanceof IQueryComponent) && !IQueryComponent.NULL_VAL.equals(value)) { String tsProp = referencedDescriptor.getToStringProperty();
/** * Gets the new entity to add. It is created using the information contained * in the context. * * @param context * the action context. * @return the entity to add to the collection. */ @SuppressWarnings("unchecked") @Override protected List<?> getAddedComponents(Map<String, Object> context) { IComponentDescriptor<?> elementDescriptor = getAddedElementDescriptor(context); IComponent newElement; if (elementDescriptor.isEntity()) { newElement = getEntityFactory(context).createEntityInstance( (Class<? extends IEntity>) elementDescriptor.getComponentContract()); } else { newElement = getEntityFactory(context).createComponentInstance( (Class<? extends IComponent>) elementDescriptor .getComponentContract()); } return Collections.singletonList(newElement); }
if (propertyDescriptor != null) { boolean isEntityRef = false; if (componentDescriptor.isEntity() && aQueryComponent.containsKey(IEntity.ID)) { isEntityRef = true;
if (propertyDescriptor != null) { boolean isEntityRef = false; if (componentDescriptor.isEntity() && aQueryComponent.containsKey(IEntity.ID)) { isEntityRef = true;