18 package com.mysql.clusterj.openjpa;
20 import java.util.BitSet;
22 import org.apache.openjpa.jdbc.meta.JavaSQLTypes;
23 import org.apache.openjpa.kernel.OpenJPAStateManager;
24 import org.apache.openjpa.meta.ClassMetaData;
25 import org.apache.openjpa.meta.FieldMetaData;
68 public static String getJavaTypeName(
int javaType) {
73 case JavaSQLTypes.SQL_DATE:
74 return "java.sql.Date";
75 case JavaSQLTypes.TIME:
76 return "java.sql.Time";
77 case JavaSQLTypes.TIMESTAMP:
78 return "java.sql.Timestamp";
79 default:
return "unsupported";
84 public static String printBitSet(OpenJPAStateManager sm, BitSet fields) {
85 ClassMetaData classMetaData = sm.getMetaData();
86 FieldMetaData[] fieldMetaDatas = classMetaData.getFields();
90 for (
int i = 0;
i < fields.size(); ++
i) {
92 buffer.append(separator);
95 buffer.append(fieldMetaDatas[
i].getName());
101 return buffer.toString();