/** * PUBLIC: * Returns clone of the full fetch group - contains all the attributes, no nesting. * Could be used as a starting point for a new user-defined fetch group. */ public FetchGroup createFullFetchGroup() { return this.fullFetchGroup.clone(); }
/** * PUBLIC: * Returns clone of the default fetch group. * Could be used as a starting point for a new user-defined fetch group. */ public FetchGroup createDefaultFetchGroup() { return this.defaultFetchGroup.clone(); }
/** * PUBLIC: * Returns clone of the minimal fetch group. * Could be used as a starting point for a new user-defined fetch group. */ public FetchGroup createMinimalFetchGroup() { return this.minimalFetchGroup.clone(); }
/** * PUBLIC: * Returns clone of the default fetch group. * Could be used as a starting point for a new user-defined fetch group. */ public FetchGroup createDefaultFetchGroup() { return this.defaultFetchGroup.clone(); }
/** * PUBLIC: * Returns clone of the full fetch group - contains all the attributes, no nesting. * Could be used as a starting point for a new user-defined fetch group. */ public FetchGroup createFullFetchGroup() { return this.fullFetchGroup.clone(); }
/** * PUBLIC: * Returns clone of the minimal fetch group. * Could be used as a starting point for a new user-defined fetch group. */ public FetchGroup createMinimalFetchGroup() { return this.minimalFetchGroup.clone(); }
@Override public CoreAttributeGroup clone(Map<CoreAttributeGroup<AttributeItem, ClassDescriptor>, CoreAttributeGroup<AttributeItem, ClassDescriptor>> cloneMap) { return wrappedFetchGroup.clone(cloneMap); }
@Override public FetchGroup clone() { return new CubaEntityFetchGroup(wrappedFetchGroup.clone()); }
/** * INTERNAL: * Copy fetch group reference from the source object to the target */ public void copyAggregateFetchGroupInto(Object source, Object target, Object rootEntity, AbstractSession session) { if (isPartialObject(source)) { FetchGroup newGroup = ((FetchGroupTracker)source)._persistence_getFetchGroup().clone(); // must clone because original is linked to orig root newGroup.setRootEntity((FetchGroupTracker) rootEntity); setObjectFetchGroup(target, newGroup, session); } }
/** * INTERNAL: * Copy fetch group reference from the source object to the target */ public void copyAggregateFetchGroupInto(Object source, Object target, Object rootEntity, AbstractSession session) { if (isPartialObject(source)) { FetchGroup newGroup = ((FetchGroupTracker)source)._persistence_getFetchGroup().clone(); // must clone because original is linked to orig root newGroup.setRootEntity((FetchGroupTracker) rootEntity); setObjectFetchGroup(target, newGroup, session); } }
/** * INTERNAL: * Creates and returns a copy of this query. * @return A clone of this instance. */ @Override public Object clone() { final ObjectLevelReadQuery cloneQuery = (ObjectLevelReadQuery)super.clone(); // Must also clone the joined expressions as always joined attribute will be added // don't use setters as this will trigger unprepare. if (joinedAttributeManager != null) { cloneQuery.joinedAttributeManager = joinedAttributeManager.clone(); cloneQuery.joinedAttributeManager.setBaseQuery(cloneQuery); } if (this.batchFetchPolicy != null) { cloneQuery.batchFetchPolicy = batchFetchPolicy.clone(); } if (this.nonFetchJoinAttributeExpressions != null){ cloneQuery.nonFetchJoinAttributeExpressions = new ArrayList<>(nonFetchJoinAttributeExpressions); } // Don't use setters as that will trigger unprepare if (this.orderByExpressions != null) { cloneQuery.orderByExpressions = new ArrayList<>(this.orderByExpressions); } if (this.fetchGroup != null) { cloneQuery.fetchGroup = fetchGroup.clone(); // don't clone immutable entityFetchGroup } return cloneQuery; }
/** * INTERNAL: * Clone the query */ @Override public Object clone() { ObjectLevelReadQuery cloneQuery = (ObjectLevelReadQuery)super.clone(); // Must also clone the joined expressions as always joined attribute will be added // don't use setters as this will trigger unprepare. if (this.joinedAttributeManager != null) { cloneQuery.joinedAttributeManager = this.joinedAttributeManager.clone(); cloneQuery.joinedAttributeManager.setBaseQuery(cloneQuery); } if (this.batchFetchPolicy != null) { cloneQuery.batchFetchPolicy = this.batchFetchPolicy.clone(); } if (this.nonFetchJoinAttributeExpressions != null){ cloneQuery.nonFetchJoinAttributeExpressions = new ArrayList<Expression>(this.nonFetchJoinAttributeExpressions); } // Don't use setters as that will trigger unprepare if (this.orderByExpressions != null) { cloneQuery.orderByExpressions = new ArrayList<Expression>(this.orderByExpressions); } if (this.fetchGroup != null) { cloneQuery.fetchGroup = this.fetchGroup.clone(); // don't clone immutable entityFetchGroup } return cloneQuery; }