1 21 22 package org.apache.derby.impl.sql.compile; 23 24 import org.apache.derby.iapi.services.sanity.SanityManager; 25 26 33 public abstract class OrderedColumn extends QueryTreeNode 34 { 35 protected static final int UNMATCHEDPOSITION = -1; 36 protected int columnPosition = UNMATCHEDPOSITION; 37 38 47 public boolean isAscending() 48 { 49 return true; 50 } 51 52 58 public String toString() 59 { 60 if (SanityManager.DEBUG) 61 { 62 return "columnPosition: " + columnPosition + "\n" + 63 super.toString(); 64 } 65 else 66 { 67 return ""; 68 } 69 } 70 71 76 public int getColumnPosition() 77 { 78 return columnPosition; 79 } 80 81 84 public void setColumnPosition(int columnPosition) 85 { 86 this.columnPosition = columnPosition; 87 if (SanityManager.DEBUG) 88 { 89 SanityManager.ASSERT(columnPosition > 0, 90 "Column position is " + columnPosition + 91 ". This is a problem since the code to generate " + 92 " ordering columns assumes it to be one based -- i.e. "+ 93 " it subtracts one"); 94 95 } 96 } 97 } 98 | Popular Tags |