コード例 #1
0
 /** Clone this instance. */
 public Object clone() {
   FetchConfigurationImpl clone = newInstance(null);
   clone._state.ctx = _state.ctx;
   clone._parent = _parent;
   clone._fromField = _fromField;
   clone._fromType = _fromType;
   clone._directRelationOwner = _directRelationOwner;
   clone._load = _load;
   clone._availableRecursion = _availableRecursion;
   clone._availableDepth = _availableDepth;
   clone.copy(this);
   return clone;
 }
コード例 #2
0
  public FetchConfiguration traverse(FieldMetaData fm) {
    Class<?> type = fm.getRelationType();
    if (type == null) return this;

    FetchConfigurationImpl clone = newInstance(_state);
    clone._parent = this;
    clone._availableDepth = reduce(_availableDepth);
    clone._fromField = fm.getFullName(false);
    clone._fromType = type;
    clone._availableRecursion = getAvailableRecursionDepth(fm, type, fm.getFullName(false), true);
    if (StringUtils.equals(_directRelationOwner, fm.getFullName(false))) clone._load = false;
    else clone._load = _load;

    FieldMetaData owner = fm.getMappedByMetaData();
    if (owner != null && owner.getTypeCode() == JavaTypes.PC)
      clone._directRelationOwner = owner.getFullName(false);

    return clone;
  }