code: @Override
      public void loadAnnotationDefinitions(AnnotationDefinitionTable adt)
              throws SQLException {
          PreparedStatement adps =
                  getPreparedStatement(ANNOTATION_DEFINITION_SQL);
  
          for (Map.Entry<Integer, TableAnnotationDefinition> ade : adt
                  .getIndexDefinition().entrySet()) {
              TableAnnotationDefinition ad = ade.getValue();
              adps.setInt(1, (ade.getKey() + 1));
              adps.setString(2, ad.getName());
  
              if (AnnotationDefinitionTable.URL_ANNOTATION_TYPE_ID == ad
                      .getAnnotationType()) {
                  adps.setNull(3, Types.VARCHAR);
                  adps.setNull(4, Types.VARCHAR);
              } else {
                  adps.setString(3, StringUtils.abbreviate(ad.getDescription(),
                          MAX_MEDIUM_VARCHAR_LENGTH));
                  adps.setString(4, StringUtils.abbreviate(ad.getUsage(),
                          MAX_MEDIUM_VARCHAR_LENGTH));
              }
  
              final int oid;
              final String domain = ad.getAnnotationDomain();
              final Integer objectId = valueIndexMap.get(domain);
              if (objectId != null) {
                  oid = objectId;
              } else {
                  oid = saveObject(1, domain);
                  valueIndexMap.put(domain, oid);
              }
  
              adps.setInt(5, oid);
              adps.setInt(6, ad.getAnnotationType());
              adps.addBatch();
          }
  
          adps.executeBatch();
  
          // associate annotate definitions to documents
          PreparedStatement dadmps =
                  getPreparedStatement(DOCUMENT_ANNOTATION_DEFINITION_MAP_SQL);
          Map<Integer, Set<Integer>> dadm = adt
                  .getDocumentAnnotationDefinitions();
  
          Set<Entry<Integer, Set<Integer>>> entries = dadm.entrySet();
          for (final Entry<Integer, Set<Integer>> entry : entries) {
              final Integer key = entry.getKey();
              for (final Integer adid : entry.getValue()) {
                  dadmps.setInt(1, (key + 1));
                  dadmps.setInt(2, (adid + 1));
                  dadmps.addBatch();
              }
              dadmps.executeBatch();
          }
      }
docs: {@inheritDoc}