public String generateBasicAnnotation(Property property) { StringBuffer annotations = new StringBuffer(" "); if (property.getValue() instanceof SimpleValue) { if (hasVersionProperty()) if (property.equals(getVersionProperty())) buildVersionAnnotation(annotations); String typeName = ((SimpleValue) property.getValue()).getTypeName(); if ("date".equals(typeName) || "java.sql.Date".equals(typeName)) { buildTemporalAnnotation(annotations, "DATE"); } else if ("timestamp".equals(typeName) || "java.sql.Timestamp".equals(typeName)) { buildTemporalAnnotation(annotations, "TIMESTAMP"); } else if ("time".equals(typeName) || "java.sql.Time".equals(typeName)) { buildTemporalAnnotation(annotations, "TIME"); } // TODO: calendar etc. ? } return annotations.toString(); }