Ejemplo n.º 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;
 }
Ejemplo n.º 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;
  }
Ejemplo n.º 3
0
 List<FetchConfigurationImpl> trackPath(List<FetchConfigurationImpl> path) {
   if (_parent != null) _parent.trackPath(path);
   path.add(this);
   return path;
 }
Ejemplo n.º 4
0
 FetchConfiguration getRoot() {
   return (isRoot()) ? this : _parent.getRoot();
 }