1 28 29 package com.caucho.amber.field; 30 31 import com.caucho.amber.table.Column; 32 import com.caucho.amber.type.Type; 33 import com.caucho.java.JavaWriter; 34 35 import java.io.IOException ; 36 import java.util.ArrayList ; 37 38 41 public interface IdField extends AmberField { 42 45 public ArrayList <Column> getColumns(); 46 47 50 public Type getType(); 51 52 55 public void setKeyField(boolean isKey); 56 57 60 public String getForeignTypeName(); 61 62 65 public String getJavaTypeName(); 66 67 70 public int getComponentCount(); 71 72 75 public String getGenerator(); 76 77 80 public String generateSetKeyProperty(String key, String value) 81 throws IOException ; 82 83 86 public String generateGetKeyProperty(String key) 87 throws IOException ; 88 89 94 public String generateGetProxyProperty(String value); 95 96 99 public void generateSetGeneratedKeys(JavaWriter out, String pstmt) 100 throws IOException ; 101 102 105 public void generateCheckCreateKey(JavaWriter out) 106 throws IOException ; 107 108 111 public void generateSetInsert(JavaWriter out, String pstmt, String index) 112 throws IOException ; 113 114 117 public int generateLoadForeign(JavaWriter out, String rs, 118 String indexVar, int index) 119 throws IOException ; 120 121 124 public int generateLoadForeign(JavaWriter out, String rs, 125 String indexVar, int index, 126 String name) 127 throws IOException ; 128 129 132 public String generateIsNull(String value); 133 134 137 public String generateRawWhere(String id); 138 139 142 public String generateMatchArgWhere(String id); 143 144 147 public String toValue(String value); 148 } 149 | Popular Tags |