org.eclipse.persistence.internal.queries.AttributeItem Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of eclipselink Show documentation
Show all versions of eclipselink Show documentation
EclipseLink build based upon Git transaction f2b9fc5
/*
* Copyright (c) 2011, 2018 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0,
* or the Eclipse Distribution License v. 1.0 which is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
*/
// Contributors:
// 05/19/2010-2.1 ailitchev - Bug 244124 - Add Nested FetchGroup
// 09 Jan 2013-2.5 Gordon Yorke
// - 397772: JPA 2.1 Entity Graph Support
package org.eclipse.persistence.internal.queries;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import org.eclipse.persistence.core.queries.CoreAttributeItem;
import org.eclipse.persistence.queries.AttributeGroup;
import org.eclipse.persistence.queries.FetchGroup;
import org.eclipse.persistence.queries.LoadGroup;
import org.eclipse.persistence.sessions.CopyGroup;
/**
* Purpose: Elements stored in AttributeGroup
*
* @author dclarke, ailitchev
* @since EclipseLink 2.1
*/
public class AttributeItem extends CoreAttributeItem implements Serializable {
protected AttributeItem() {
}
public AttributeItem(AttributeGroup parent, String attributeName) {
this.parent = parent;
this.attributeName = attributeName;
}
public String getAttributeName() {
return this.attributeName;
}
public AttributeItem toCopyGroup(Map cloneMap, CopyGroup parentClone, Map copies){
AttributeItem clone = new AttributeItem();
clone.attributeName = this.attributeName;
if (this.group != null){
clone.group = this.group.toCopyGroup(cloneMap, copies);
}
if (clone.keyGroup != null){
clone.keyGroup = this.keyGroup.toCopyGroup(cloneMap, copies);
}
clone.parent = parentClone;
if (this.subGroups != null){
clone.subGroups = new HashMap