/**
  * Accessor for the name of the java-type actually used when mapping the particular datastore
  * field. This java-type must have an entry in the datastore mappings.
  *
  * @param index requested datastore field index.
  * @return the name of java-type for the requested datastore field.
  */
 public String getJavaTypeForDatastoreMapping(int index) {
   if (datastoreMappings == null || datastoreMappings.length == 0) {
     // Not got mappings yet so use column metadata to define
     ColumnMetaData[] colmds = getColumnMetaDataForMember(mmd, roleForMember);
     boolean useString = false;
     if (colmds != null && colmds.length > 0 && colmds[0].getJdbcType() != null) {
       if (MetaDataUtils.isJdbcTypeString(colmds[0].getJdbcType())) {
         useString = true;
       }
     }
     return (useString ? ClassNameConstants.JAVA_LANG_STRING : ClassNameConstants.JAVA_SQL_TIME);
   } else if (datastoreMappings[0].isStringBased()) {
     // Use String as our java type
     return ClassNameConstants.JAVA_LANG_STRING;
   } else {
     return ClassNameConstants.JAVA_SQL_TIME;
   }
 }