FileDocCategorySizeDatePackage
CDDiscInventoryReportPlainTextFormat.javaAPI DocExample1098Thu May 05 05:37:54 BST 2005com.samscdrental.reports

CDDiscInventoryReportPlainTextFormat

public class CDDiscInventoryReportPlainTextFormat extends Object implements ReportPlainTextFormat

Fields Summary
private String
theReportString
Constructors Summary
public CDDiscInventoryReportPlainTextFormat()

	
public CDDiscInventoryReportPlainTextFormat(CDDiscInventoryDTO aCDDiscInventoryDTO)

		String nl = System.getProperty( "line.separator" );

		StringBuffer stringBuffer = new StringBuffer(); ;

		stringBuffer.append( "Sam's CD Rental Store Inventory" + nl );
		for ( int i = 0; i < aCDDiscInventoryDTO.theCDDiscInventoryItems.length;
			  i++ )
		{
			CDDiscInventoryItem dii = aCDDiscInventoryDTO.
				theCDDiscInventoryItems[i];
			if ( dii.isCDDiscRented )
			{
				stringBuffer.append( dii.theCDDiscPhysicalID + " " +
									 dii.theCustomerID + nl );
			}
			else
			{
				stringBuffer.append( dii.theCDDiscPhysicalID +
									 " " + "In house" + nl );
			}
		}
		theReportString = stringBuffer.toString();
	
Methods Summary
public java.lang.StringgetReportString()

		return theReportString;