@Override
 protected void serialize(MappingSerializer serializer) {
   serializer.putString("name", name);
   serializer.putString("type", list ? paramType.listName : paramType.valueName);
   serializer.putBoolean("optional", optional);
   serializer.putString("description", description);
 }
  @Override
  protected void serialize(MappingSerializer serializer) {
    serializer.putString("label", constraintDefinition.getLabel().name());

    ConstraintType type = constraintDefinition.getConstraintType();
    serializer.putString("type", type.name());
    serialize(constraintDefinition, serializer);
  }
 @Override
 protected void serialize( MappingSerializer serializer )
 {
     for ( String indexName : indexManager.relationshipIndexNames() )
     {
         RelationshipIndex index = indexManager.forRelationships( indexName );
         serializer.putMapping( indexName,
                 new RelationshipIndexRepresentation( indexName, indexManager.getConfiguration( index ) ) );
     }
 }
  @Override
  protected void serialize(final MappingSerializer serializer) {
    indexManager.nodeIndexNames();

    for (String indexName : indexManager.nodeIndexNames()) {
      Index<Node> index = indexManager.forNodes(indexName);
      serializer.putMapping(
          indexName, new NodeIndexRepresentation(indexName, indexManager.getConfiguration(index)));
    }
  }
 protected void serialize(
     ConstraintDefinition constraintDefinition, MappingSerializer serializer) {
   Function<String, Representation> converter =
       new Function<String, Representation>() {
         @Override
         public Representation apply(String propertyKey) {
           return ValueRepresentation.string(propertyKey);
         }
       };
   Iterable<Representation> propertyKeyRepresentations =
       map(converter, constraintDefinition.getPropertyKeys());
   serializer.putList(
       "property_keys",
       new ListRepresentation(RepresentationType.STRING, propertyKeyRepresentations));
 }
 @Override
 protected void serialize(MappingSerializer serializer) {
   serializer.putBoolean("contains_updates", stats.containsUpdates());
   serializer.putNumber("nodes_created", stats.getNodesCreated());
   serializer.putNumber("nodes_deleted", stats.getDeletedNodes());
   serializer.putNumber("properties_set", stats.getPropertiesSet());
   serializer.putNumber("relationships_created", stats.getRelationshipsCreated());
   serializer.putNumber("relationship_deleted", stats.getDeletedRelationships());
   serializer.putNumber("labels_added", stats.getLabelsAdded());
   serializer.putNumber("labels_removed", stats.getLabelsRemoved());
   serializer.putNumber("indexes_added", stats.getIndexesAdded());
   serializer.putNumber("indexes_removed", stats.getIndexesRemoved());
   serializer.putNumber("constraints_added", stats.getConstraintsAdded());
   serializer.putNumber("constraints_removed", stats.getConstraintsRemoved());
 }