Utility's Page

Description

The java classes in this page are for you to use in whatever form you like. I intented not to pack them into package. I will create the package for them later.

List of files
  • DatabaseConnect.java (interface)

    For connection to MySQL Database. You need MySQL Connector/J  [here] and of course you can use other database OR another connector as long as they are in compliance with JDBC standard. You just need to change some parameters in the source code.

  • DBConnect.java (implementation)

      The field you need to change to use:
    • defdriver: Change only if you use other database than MySQL and/or different connector
    • defuser: you must use your own user name for your database
    • defurl: you must change the url of your server. For example your server database is server-one, your defurl would be jdbc:mysql://server-one:3306/
    • defpwd: you must fill in your own password for connection to database

  • DateUtility.java (interface)

    The new version of DateUtility, it is more flexible than the previous version

  • DateUtil.java (implementation)

    It takes care of all of the date manipulation (adding forward/backward of the specific date, compare dates, check for date-format, and getting current time/date, form sql-date, form normal-date)

  • Encapsulation.java (interface)
  • Encap.java(implementation)

    You can use it in conjunction with DBConnect to interact with database. Or you can use it as storage for name/value pair. Read the documentation for more details.

  • MultipleCurrency.java

    It has a default currency in it (USD - US Dollars and IDR - Indonesia Rupiah). It meant to be use as tracking balance for Account Receivable (AR) and Account Payable (AP). You can initiate any kind of currency you like by passing an array of String. The Balance is in two digits precision and it is in BigDecimal type. MultipleCurrency process everything in form of String. Thus, you need to pass in the amount that you working with in String form.

  • VariousCheck.java

    It has various user input validation methods. It checks for date (relying on DateUtil.java). It checks for maximum user input. It checks for digits. It forms a number delimiter (ie: 10,000.00).

Program files


[Home]  [Code]  [Resume 1