/** * PUBLIC: * Specify that only a subset of the class' attributes be selected in this query. * <p> * This allows for the query to be optimized through selecting less data. * <p> * Partial objects will be returned from the query, where the unspecified attributes will be left <code>null</code>. * The primary key will always be selected to allow re-querying of the whole object. * <p>Note: Because the object is not fully initialized it cannot be cached, and cannot be edited. * <p>Note: You cannot have 2 partial attributes of the same type. You also cannot * add a partial attribute which is of the same type as the class being queried. * <p><b>Example</b>: query.addPartialAttribute("firstName") * @see #addPartialAttribute(Expression) */ public void addPartialAttribute(String attributeName) { addPartialAttribute(getExpressionBuilder().get(attributeName)); }
/** * PUBLIC: * Specify that only a subset of the class' attributes be selected in this query. * <p> * This allows for the query to be optimized through selecting less data. * <p> * Partial objects will be returned from the query, where the unspecified attributes will be left <code>null</code>. * The primary key will always be selected to allow re-querying of the whole object. * <p>Note: Because the object is not fully initialized it cannot be cached, and cannot be edited. * <p>Note: You cannot have 2 partial attributes of the same type. You also cannot * add a partial attribute which is of the same type as the class being queried. * <p><b>Example</b>: query.addPartialAttribute("firstName") * @see #addPartialAttribute(Expression) * @deprecated since EclipseLink 2.1, partial attributes replaced by fetch groups. * @see FetchGroup * Example: * FetchGroup fetchGroup = new FetchGroup(); * fetchGroup.addAttribute("address.city"); * query.setFetchGroup(fetchGroup); */ public void addPartialAttribute(String attributeName) { addPartialAttribute(getExpressionBuilder().get(attributeName)); }
/** * PUBLIC: * Specify that only a subset of the class' attributes be selected in this query. * <p> * This allows for the query to be optimized through selecting less data. * <p> * Partial objects will be returned from the query, where the unspecified attributes will be left <code>null</code>. * The primary key will always be selected to allow re-querying of the whole object. * <p>Note: Because the object is not fully initialized it cannot be cached, and cannot be edited. * <p>Note: You cannot have 2 partial attributes of the same type. You also cannot * add a partial attribute which is of the same type as the class being queried. * <p><b>Example</b>: query.addPartialAttribute("firstName") * @see #addPartialAttribute(Expression) * @deprecated since EclipseLink 2.1, partial attributes replaced by fetch groups. * @see FetchGroup * Example: * FetchGroup fetchGroup = new FetchGroup(); * fetchGroup.addAttribute("address.city"); * query.setFetchGroup(fetchGroup); */ public void addPartialAttribute(String attributeName) { addPartialAttribute(getExpressionBuilder().get(attributeName)); }