1 23 package org.objectweb.medor.query.lib; 24 25 import org.objectweb.jorm.type.api.PType; 26 import org.objectweb.medor.api.MedorException; 27 import org.objectweb.medor.query.api.QueryTree; 28 import org.objectweb.medor.query.api.PropagFromNestedField; 29 import org.objectweb.medor.api.Field; 30 31 import java.util.Map ; 32 33 36 public class BasicPropagFromNestedField 37 extends BasicPropagatedField 38 implements PropagFromNestedField { 39 40 41 protected Field[] ancs; 42 43 public BasicPropagFromNestedField() { 44 } 45 46 public BasicPropagFromNestedField(String name, 47 PType type, 48 QueryTree qt, 49 Field[] parents, 50 Field[] ancestors) throws MedorException { 51 super(name, type, qt, parents); 52 ancs = ancestors; 53 } 54 55 public Object clone(Object clone, 56 Map obj2clone) throws CloneNotSupportedException { 57 clone = super.clone(clone, obj2clone); 58 BasicPropagFromNestedField bpfnf = (BasicPropagFromNestedField) clone; 59 if (ancs != null) { 60 bpfnf.ancs = new Field[ancs.length]; 61 for(int i=0; i<ancs.length; i++) { 62 bpfnf.ancs[i] = (Field) getClone(ancs[i], obj2clone); 63 } 64 } 65 return clone; 66 } 67 68 public Field[] getPreviousFlatField() { 69 return ancs; 70 } 71 } 72 | Popular Tags |