All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class JBMSTours.Util

java.lang.Object
   |
   +----JBMSTours.Util

public class Util
extends Object
This is a utility class with static methods for doing various unrelated things.


Constructor Index

 o Util()

Method Index

 o doubleMyInt(int[])
 o lineSeparator()
Return the line separator for the OS.
 o println()
Does a System.out.println unless a property is set.
 o println(Object)
Does a System.out.println unless a property is set.
 o round(double, double)
Round a double to the given precision.
 o wrapAsJavaExpressionWithComma(String)
Used for extracting data into an SQL script or into Java program for re-insert (CreateScript).
 o wrapAsSQLDate(Date)
Used for extracting data into an SQL script or into Java program for re-insert (CreateScript).
 o wrapAsSQLDateWithComma(Date)
Used for extracting data into an SQL script or into Java program for re-insert (CreateScript).
 o wrapAsSQLTime(Time)
Used for extracting data into an SQL script or into Java program for re-insert (CreateScript).
 o wrapAsSQLTimeWithComma(Time)
Used for extracting data into an SQL script or into Java program for re-insert (CreateScript).
 o wrapAsString(String)
Used for extracting data into an SQL script or into Java program for re-insert (CreateScript).
 o wrapAsStringSQ(String)
Used for extracting data into an SQL script or into Java program for re-insert (CreateScript).
 o wrapAsStringWithComma(String)
Used for extracting data into an SQL script or into Java program for re-insert (CreateScript).
 o wrapAsStringWithCommaSQ(String)
Used for extracting data into an SQL script or into Java program for re-insert (CreateScript).
 o wrapIntWithComma(int)
Used for extracting data into an SQL script or into Java program for re-insert (CreateScript).
 o wrapShortWithComma(short)
Used for extracting data into an SQL script or into Java program for re-insert (CreateScript).

Constructors

 o Util
 public Util()

Methods

 o round
 public static double round(double valueToRound,
                            double roundPrecision)
Round a double to the given precision. Round positive numbers up, and negative numbers down.

Parameters:
valueToRound - The double to round
roundPrecision - The precision to round the number to. For example, if you want to round a number to the nearest hundredth, the value of this parameter should be 0.01. It is possible to round to precisions that are not powers of 10.
Returns:
The rounded value.
 o println
 public static void println(Object s)
Does a System.out.println unless a property is set. Allows you to avoid printing out messages for database-side methods, when application and server are running in different JVMs (client/server scenario or synchronization scenario). In those situations, set JBMSTours.databaseSide to true before starting up the server or the source database.

Parameters:
The - string to print.
 o println
 public static void println()
Does a System.out.println unless a property is set. Allows you to avoid printing out messages for database-side methods, when application and server are running in different JVMs (client/server scenario or synchronization scenario). In those situations, set JBMSTours.databaseSide to true before starting up the server or the source database.

 o wrapAsString
 public static String wrapAsString(String s)
Used for extracting data into an SQL script or into Java program for re-insert (CreateScript).

Parameters:
s - a String
Returns:
The String wrapped in quotation marks.
 o wrapAsStringSQ
 public static String wrapAsStringSQ(String s)
Used for extracting data into an SQL script or into Java program for re-insert (CreateScript).

Parameters:
s - a String
Returns:
The String wrapped in single quotation marks.
 o wrapAsStringWithComma
 public static String wrapAsStringWithComma(String s)
Used for extracting data into an SQL script or into Java program for re-insert (CreateScript).

Parameters:
s - a String
Returns:
The String wrapped in quotation marks and a comma.
 o wrapAsStringWithCommaSQ
 public static String wrapAsStringWithCommaSQ(String s)
Used for extracting data into an SQL script or into Java program for re-insert (CreateScript).

Parameters:
s - a String
Returns:
The String wrapped in single quotation marks and a comma.
 o wrapAsJavaExpressionWithComma
 public static String wrapAsJavaExpressionWithComma(String s)
Used for extracting data into an SQL script or into Java program for re-insert (CreateScript).

Parameters:
s - a String
Returns:
The string returned without any quotation marks,but with a comma.
 o wrapIntWithComma
 public static String wrapIntWithComma(int i)
Used for extracting data into an SQL script or into Java program for re-insert (CreateScript).

Parameters:
i - an int
Returns:
The int plus a comma
 o wrapShortWithComma
 public static String wrapShortWithComma(short s)
Used for extracting data into an SQL script or into Java program for re-insert (CreateScript).

Parameters:
s - a short
Returns:
The short plus a comma
 o wrapAsSQLDate
 public static String wrapAsSQLDate(Date d)
Used for extracting data into an SQL script or into Java program for re-insert (CreateScript).

Parameters:
d - a date
Returns:
AN SQL represenation of the date.
 o wrapAsSQLTime
 public static String wrapAsSQLTime(Time t)
Used for extracting data into an SQL script or into Java program for re-insert (CreateScript).

Parameters:
t - a time
Returns:
AN SQL represenation of the time.
 o wrapAsSQLDateWithComma
 public static String wrapAsSQLDateWithComma(Date d)
Used for extracting data into an SQL script or into Java program for re-insert (CreateScript).

Parameters:
d - a date
Returns:
AN SQL represenation of the date plus a comma.
 o wrapAsSQLTimeWithComma
 public static String wrapAsSQLTimeWithComma(Time t)
Used for extracting data into an SQL script or into Java program for re-insert (CreateScript).

Parameters:
d - a date
Returns:
AN SQL represenation of the date plus a comma.
 o doubleMyInt
 public static void doubleMyInt(int i[])
 o lineSeparator
 public static String lineSeparator()
Return the line separator for the OS.

Returns:
The line separator.

All Packages  Class Hierarchy  This Package  Previous  Next  Index