1 23 24 package org.objectweb.medor.query.lib; 25 26 import org.objectweb.medor.query.api.OrderField; 27 import org.objectweb.medor.query.api.QueryTreeField; 28 import org.objectweb.medor.clone.lib.BasicCloneable; 29 30 import java.util.Map ; 31 32 35 public class BasicOrderField extends BasicCloneable implements OrderField { 36 37 private boolean desc = false; 38 39 private QueryTreeField field; 40 41 public BasicOrderField() { 42 } 43 44 49 public BasicOrderField(QueryTreeField field) { 50 this.field = field; 51 } 52 53 60 public BasicOrderField(QueryTreeField field, boolean desc) { 61 this.field = field; 62 this.desc = desc; 63 } 64 65 public Object clone(Object clone, 66 Map obj2clone) throws CloneNotSupportedException { 67 clone = super.clone(clone, obj2clone); 68 ((BasicOrderField) clone).desc = desc; 69 ((BasicOrderField) clone).field = (QueryTreeField) getClone(field, obj2clone); 70 return clone; 71 } 72 73 public void setField(QueryTreeField field) { 74 this.field = field; 75 } 76 77 public QueryTreeField getField() { 78 return field; 79 } 80 81 public void setDesc(boolean desc) { 82 this.desc = desc; 83 } 84 85 public boolean getDesc() { 86 return desc; 87 } 88 } 89 | Popular Tags |