1 2 12 package com.versant.core.metadata; 13 14 import com.versant.core.metadata.parser.JdoExtension; 15 import com.versant.core.common.Debug; 16 17 import java.io.Serializable ; 18 import java.io.PrintStream ; 19 20 24 public class FetchGroupField implements Serializable { 25 26 29 public FieldMetaData fmd; 30 34 public JdoExtension extension; 35 41 public FetchGroup nextFetchGroup; 42 48 public FetchGroup nextKeyFetchGroup; 49 50 55 public boolean doNotFetchObject; 56 57 64 public int jdbcUseJoin; 65 72 public int jdbcUseKeyJoin; 73 77 public String jdbcSelectSql; 78 82 public String jdbcSelectSqlForUpdate; 83 84 public FetchGroupField(FieldMetaData field) { 85 this.fmd = field; 86 } 87 88 private static String toUseJoinString(int useJoin) { 89 switch (useJoin) { 92 case 1: 93 return "NO"; 94 case 3: 95 return "INNER"; 96 case 2: 97 return "OUTER"; 98 } 99 return "unknown(" + useJoin + ")"; 100 } 101 102 public String toString() { 103 return String.valueOf(fmd) + 104 " jdbcUseJoin " + toUseJoinString(jdbcUseJoin) + 105 " nextFetchGroup " + nextFetchGroup + 106 (fmd.category == MDStatics.CATEGORY_MAP 107 ? " jdbcUseKeyJoin " + toUseJoinString(jdbcUseKeyJoin) + 108 " nextKeyFetchGroup " + nextKeyFetchGroup 109 : ""); 110 } 111 112 public void dump() { 113 dump(Debug.OUT, ""); 114 } 115 116 public void dump(PrintStream out, String indent) { 117 out.println(indent + this); 118 } 119 } 120 | Popular Tags |