com.knowgate.acl
Class PasswordRecord

java.lang.Object
  extended by com.knowgate.dataobjs.DBPersist
      extended by com.knowgate.acl.PasswordRecord
All Implemented Interfaces:
java.io.Serializable, java.util.Map

public class PasswordRecord
extends DBPersist

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
PasswordRecord()
           
PasswordRecord(java.lang.String sKey)
           
 
Method Summary
 void addLine(java.lang.String sId, char cType, java.lang.String sLabel)
           
 void addLine(java.lang.String sId, char cType, java.lang.String sLabel, java.lang.String sValue)
           
 boolean delete(JDCConnection oConn)
          Delete a register from database The deleted register will be the one matching this DBPersist primary key, as set at constructor or load() method.
static boolean delete(JDCConnection oConn, java.lang.String sGuPwd)
           
 java.lang.String getValueOf(java.lang.String sLineId)
           
 java.util.ArrayList<PasswordRecordLine> lines()
           
 boolean load(JDCConnection oConn, java.lang.Object[] aPK)
          Load the internal value set from a register at a database table
 boolean load(JDCConnection oConn, java.lang.String sPk)
          Load the internal value set from a register at a database table
protected  void parse()
           
 void setKey(java.lang.String sKey)
           
 boolean store(JDCConnection oConn)
          Store a register at database representing this instance of DBPersist Insertions and updates : The store method automatically manages register insertions and updates.
 boolean store(JDCConnection oConn, java.lang.String sGuCategory)
           
 java.lang.String toString()
           
 
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, getString, getStringHtml, getStringNull, getTable, getTable, getTableName, getTime, getTimeOfDay, getTimestamp, getUIdFromName, isEmpty, isNull, iterator, keySet, 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, toLowerCase, toUpperCase, toXML, toXML, toXML, toXML, values
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, 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

PasswordRecord

public PasswordRecord()

PasswordRecord

public PasswordRecord(java.lang.String sKey)
Method Detail

setKey

public void setKey(java.lang.String sKey)
            throws java.lang.NullPointerException
Throws:
java.lang.NullPointerException

getValueOf

public java.lang.String getValueOf(java.lang.String sLineId)

addLine

public void addLine(java.lang.String sId,
                    char cType,
                    java.lang.String sLabel)

addLine

public void addLine(java.lang.String sId,
                    char cType,
                    java.lang.String sLabel,
                    java.lang.String sValue)

lines

public java.util.ArrayList<PasswordRecordLine> lines()

parse

protected void parse()

load

public boolean load(JDCConnection oConn,
                    java.lang.Object[] aPK)
             throws java.sql.SQLException,
                    java.security.AccessControlException
Description copied from class: DBPersist

Load the internal value set from a register at a database table

Overrides:
load in class DBPersist
Parameters:
oConn - Database Connection
aPK - Primary key values in order of appearance
Returns:
true if a register was found, false if no register was found with such primary key.
Throws:
java.sql.SQLException
java.security.AccessControlException

load

public boolean load(JDCConnection oConn,
                    java.lang.String sPk)
             throws java.sql.SQLException,
                    java.security.AccessControlException
Description copied from class: DBPersist

Load the internal value set from a register at a database table

Overrides:
load in class DBPersist
Parameters:
oConn - JDCConnection
sPk - String Primary key value
Returns:
true if a register was found, false if no register was found with such primary key.
Throws:
java.sql.SQLException
java.security.AccessControlException

store

public boolean store(JDCConnection oConn)
              throws java.sql.SQLException,
                     java.security.AccessControlException,
                     java.lang.IllegalArgumentException,
                     java.lang.NullPointerException
Description copied from class: DBPersist

Store a register at database representing this instance of DBPersist

Insertions and updates : The store method automatically manages register insertions and updates. If the stored object already exists at database then it is updated, if it does not exists then it is inserted. A primary key violation error is never thrown so ther is no need to call delete() method before re-writing an existing object.

NULL fields : All values not set calling put() methods for DBPersist will be assumed to be NULL. If a not nullable field is not set then an SQLException will be raised.
On storing an already existing object all values will we overwrited, so is a DBPersist is not fully loaded before storing it, values not set by calling put() methods that already were present at database will be lost.

Overrides:
store in class DBPersist
Parameters:
oConn - Database Connection
Returns:
boolean true if register was stored for the first time, false if register already existed.
Throws:
java.sql.SQLException
java.security.AccessControlException
java.lang.IllegalArgumentException
java.lang.NullPointerException

store

public boolean store(JDCConnection oConn,
                     java.lang.String sGuCategory)
              throws java.sql.SQLException,
                     java.security.AccessControlException,
                     java.lang.IllegalArgumentException,
                     java.lang.NullPointerException
Throws:
java.sql.SQLException
java.security.AccessControlException
java.lang.IllegalArgumentException
java.lang.NullPointerException

delete

public boolean delete(JDCConnection oConn)
               throws java.sql.SQLException
Description copied from class: DBPersist

Delete a register from database

The deleted register will be the one matching this DBPersist primary key, as set at constructor or load() method.

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

delete

public static boolean delete(JDCConnection oConn,
                             java.lang.String sGuPwd)
                      throws java.sql.SQLException
Throws:
java.sql.SQLException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object