}
public void marshal(Object object,
HierarchicalStreamWriter writer,
MarshallingContext context) {
InsertElementsCommand cmd = (InsertElementsCommand) object;
if ( cmd.getOutIdentifier() != null ) {
writer.startNode( "out-identifier" );
writer.setValue( cmd.getOutIdentifier() );
writer.endNode();
writer.startNode( "return-objects" );
writer.setValue( Boolean.toString( cmd.isReturnObject() ) );
writer.endNode();
}
if ( !StringUtils.isEmpty( cmd.getEntryPoint() ) ) {
writer.startNode( "entry-point" );
writer.setValue( cmd.getEntryPoint() );
writer.endNode();
}
for ( Object element : cmd.getObjects() ) {
writeItem( new ObjectsObjectContainer( element ),
context,
writer );
}
}