Interface EntityFormatter

All Superinterfaces:
Function<Entity,String>, Serializable

public interface EntityFormatter extends Function<Entity,String>, Serializable
Formats Entity instances into their string representations. Instances are built via builder().
Entity track = connection.selectSingle(Track.NAME.equalTo("Come As You Are"));

EntityFormatter formatter = EntityFormatter.builder()
        .text("Name=")
        .value(Track.NAME)
        .text(", Album='")
        .value(Track.ALBUM_FK, Album.TITLE)
        .text("'")
        .build();

System.out.println(formatter.apply(track)); // Name=Come As You Are, Album='Nevermind'
Outputs the following String:

Name=John, Department='Accounting'

given the entities above.