Example: Demo class

This class is used by all the examples contained in this section of the documentation.



// *****************************************************
// Copyright (c) 2006-2010 iAnywhere Solutions, Inc.
// Portions copyright (c) 2006-2010 Sybase, Inc.
// All rights reserved. All unpublished rights reserved.
// *****************************************************
// This sample code is provided AS IS, without warranty or liability
// of any kind.
//
// You may use, reproduce, modify and distribute this sample code
// without limitation, on the condition that you retain the foregoing
// copyright notice and disclaimer as to the original iAnywhere code.
//
// *********************************************************************
package com.ianywhere.ultralitej.demo;

//import java.io.*;
import com.ianywhere.ultralitej12.*;

/**
 * Demonstration class.
 *
 * <p>This class is not part of the Database library.  It is used
 * only by the demonstration programs.
 *
 * @author ianywhere
 * @version 1.0
 */
public class Demo
{
    /** Display a message.
     * @param msg message to be displayed
     */
    public static void display( String msg )
    {
	System.out.println( msg );
    }

    /** Display a message.
     * @param msg1 message(1) to be displayed
     * @param msg2 message(2) to be displayed
     */
    public static void display( String msg1, String msg2 )
    {
	display( msg1 + msg2 );
    }

    /** Display a message.
     * @param msg1 message(1) to be displayed
     * @param msg2 message(2) to be displayed
     * @param msg3 message(3) to be displayed
     */
    public static void display( String msg1, String msg2, String msg3 )
    {
	display( msg1 + msg2 + msg3 );
    }

    /** Display a message.
     * @param msg1 message(1) to be displayed
     * @param msg2 message(2) to be displayed
     * @param msg3 message(3) to be displayed
     * @param msg4 message(4) to be displayed
     */
    public static void display( String msg1, String msg2, String msg3, String msg4 )
    {
	display( msg1 + msg2 + msg3 + msg4 );
    }

    /** Display message for an exception.
     * @param exc ULjException containing message
     */
    public static void displayException( ULjException exc )
    {
	display( exc.getMessage() );
    }
}