if (object != null) {
Object first = object.getFirst();
if (first != null) {
TextWriterWriterInterface<Object> tw = (TextWriterWriterInterface<Object>) out.getWriterFor(first);
if (tw == null) {
throw new UnableToComplyException("No handler for database object itself: " + first.getClass().getSimpleName());
}
tw.write(out, label, first);
}
Object second = object.getSecond();
if (second != null) {
TextWriterWriterInterface<Object> tw = (TextWriterWriterInterface<Object>) out.getWriterFor(second);
if (tw == null) {
throw new UnableToComplyException("No handler for database object itself: " + second.getClass().getSimpleName());
}
tw.write(out, label, second);
}
Object third = object.getThird();
if (third != null) {
TextWriterWriterInterface<Object> tw = (TextWriterWriterInterface<Object>) out.getWriterFor(third);
if (tw == null) {
throw new UnableToComplyException("No handler for database object itself: " + third.getClass().getSimpleName());
}
tw.write(out, label, third);
}
}
}