Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.knowgate.hipergate
Class BankAccount

    java.lang.Object
      com.knowgate.dataobjs.DBPersist
          com.knowgate.hipergate.BankAccount

All Implemented Interfaces:
  java.io.Serializable, java.util.Map

    public class BankAccount

extends DBPersist

Bank Account

See Also:
  Serialized Form

Nested Class Summary

Nested classes/interfaces inherited from interface java.util.Map
`java.util.Map.Entry<K,V>`

Field Summary
`static short` | `ClassId`

Fields inherited from class com.knowgate.dataobjs.DBPersist
`AllVals, sAuditCls, sAuditUsr, sTransactId`

Constructor Summary
`BankAccount()`

Method Summary
`boolean` | `delete(JDCConnection oConn)` Delete Bank Account Associations of the bank account with companies and contacts are erased before deleting it.
`java.lang.String` | `format20()` Return 20 digits bank account formated as XXXX XXXX XX XXXXXXXXXX
`static int` | `getBankAccountCtrl(java.lang.String sAccountNumber)` Get control digit for a bank account number
`java.lang.String` | `getBankAccountDC()` Get control digits for 20 digits bank account
`static java.lang.String` | `getBankAccountDC(java.lang.String sEntity, java.lang.String sOffice, java.lang.String sAccountNumber)` Get control digits for full bank account entity+office+number
`java.lang.String` | `getString(java.lang.String sKey)` Get value for a CHAR, VARCHAR or LONGVARCHAR field
`java.lang.String` | `getStringNull(java.lang.String sKey, java.lang.String sDefault)` Get value for a CHAR, VARCHAR or LONGVARCHAR field replacing null with a default value.

Methods inherited from class com.knowgate.dataobjs.DBPersist
`allcaps, allcaps, changelog, clear, clone, containsKey, containsValue, entrySet, exists, get, get, getAuditClassName, getCreationDate, getDate, getDateFormated, getDateShort, getDateTime, getDateTime24, getDecimal, getDecimalFormated, getDecimalFormated, getDouble, getDoubleFormated, getFloat, getFloatFormated, getInt, getInteger, getIntervalPart, getItemMap, getItems, getMoney, getShort, getSQLDate, getSQLTime, getStringHtml, getTable, getTable, getTableName, getTime, getTimeOfDay, getTimestamp, getUIdFromName, isEmpty, isNull, iterator, keySet, load, load, parseXML, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, putAll, putAll, remove, remove, replace, replace, replace, replace, replace, replace, replace, replace, setAuditTransact, setAuditUser, setCreationDate, size, store, toLowerCase, toUpperCase, toXML, toXML, toXML, toXML, values`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface java.util.Map
`equals, hashCode`

Field Detail

### ClassId

    public static final short ClassId

See Also:
  Constant Field Values

Constructor Detail

### BankAccount

    public BankAccount()

Method Detail

### delete

    public boolean delete(JDCConnection oConn)
                   throws java.sql.SQLException

  Delete Bank Account

  Associations of the bank account with companies and contacts are erased before deleting it.

  Overrides:
    `delete` in class `DBPersist`
  Parameters:
    `oConn` - JDBC Database Connection
  Returns:
    true if register was successfully erased, false if not.
  Throws:
    `java.sql.SQLException`

### getString

    public java.lang.String getString(java.lang.String sKey)
                               throws java.lang.NullPointerException

  Description copied from class: `DBPersist`

  Get value for a CHAR, VARCHAR or LONGVARCHAR field

  Overrides:
    `getString` in class `DBPersist`
  Parameters:
    `sKey` - Field Name
  Returns:
    Field value or null.
  Throws:
    `java.lang.NullPointerException` - if field is null or no field with such name was found at internal value collection.

### getStringNull

    public java.lang.String getStringNull(java.lang.String sKey,
                                          java.lang.String sDefault)

  Description copied from class: `DBPersist`

  Get value for a CHAR, VARCHAR or LONGVARCHAR field replacing null with a default value.

  Overrides:
    `getStringNull` in class `DBPersist`
  Parameters:
    `sKey` - Field Name
    `sDefault` - Value to be returned if field is null. sDefault may itself be null, provinding a null safe version of getString() method.
  Returns:
    Field value or default value.

### format20

    public java.lang.String format20()
                              throws java.lang.NullPointerException,
                                     java.lang.StringIndexOutOfBoundsException

  Return 20 digits bank account formated as XXXX XXXX XX XXXXXXXXXX

  Returns:
    String
  Throws:
    `java.lang.NullPointerException` - if nu_bank_acc is null
    `java.lang.StringIndexOutOfBoundsException` - if nu_bank_acc length is not 20 characters

### getBankAccountDC

    public java.lang.String getBankAccountDC()
                                      throws java.lang.IllegalArgumentException,
                                             java.lang.NullPointerException

  Get control digits for 20 digits bank account

  Returns:
    String 2 digits control number
  Throws:
    `java.lang.IllegalArgumentException` - if account length is not 20 characters
    `java.lang.NullPointerException` - if account is null
  Since:
    3.0

### getBankAccountCtrl

    public static int getBankAccountCtrl(java.lang.String sAccountNumber)
                                  throws java.lang.IllegalArgumentException,
                                         java.lang.NullPointerException

  Get control digit for a bank account number

  Parameters:
    `sAccountNumber` - String 10 digits bank account number
  Returns:
    int Control digit [0..9]
  Throws:
    `java.lang.IllegalArgumentException` - if sAccountNumber length is not 10 characters
    `java.lang.NullPointerException` - if sAccountNumber is null
  Since:
    3.0

### getBankAccountDC

    public static java.lang.String getBankAccountDC(java.lang.String sEntity,
                                                    java.lang.String sOffice,
                                                    java.lang.String sAccountNumber)
                                             throws java.lang.IllegalArgumentException,
                                                    java.lang.NullPointerException

  Get control digits for full bank account entity+office+number

  Parameters:
    `sEntity` - String 4 digits entity code
    `sOffice` - String 4 digits office code
    `sAccountNumber` - String 10 digits account number
  Returns:
    String 2 digits control number
  Throws:
    `java.lang.IllegalArgumentException`
    `java.lang.NullPointerException`
  Since:
    3.0

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD