dea.beans
Class Pkeys

java.lang.Object
  extended bydea.beans.Pkeys
All Implemented Interfaces:
IDebugLevels, java.io.Serializable

public class Pkeys
extends java.lang.Object
implements java.io.Serializable, IDebugLevels

Title: pkeys Helper
Description: Class for holding data from the pkeys table.
Copyright: Copyright (c) 2001-2004
Company: RMRR

Version:
1.0
Primary key is on column:KEY_ID
Create statment: CREATE TABLE `pkeys` ( `key_id` int(11) NOT NULL auto_increment, `key_name` varchar(100) NOT NULL default '', `key_val` int(11) default NULL, PRIMARY KEY (`key_id`) ) TYPE=MyISAM
Author:
David Abigt via GenBean
See Also:
Serialized Form

Field Summary
protected static Display display
           
static java.lang.String GETALL
           
protected  java.lang.Integer key_id
           
static java.lang.String KEY_ID
           
static int KEY_ID_LEN
           
protected  java.lang.String key_name
           
static java.lang.String KEY_NAME
           
static int KEY_NAME_LEN
           
protected  java.lang.Integer key_val
           
static java.lang.String KEY_VAL
           
static int KEY_VAL_LEN
           
static java.lang.String TABLE_NAME
           
 
Fields inherited from interface dea.common.IDebugLevels
BASIC, DEBUG_ALL, ERROR, METH_DETAIL, METH_ENTER, METH_EXIT, METH_EXT, METH_GET, METH_SET, METH_VARS, SHOW_PASS
 
Constructor Summary
Pkeys()
          Basic constructor
Pkeys(int pk)
          load record from the DB by primary key.
 
Method Summary
 java.lang.Object clone()
           
 int getKey_id()
          returns value of the KEY_ID column of this row of data
 java.lang.String getKey_name()
          returns value of the KEY_NAME column of this row of data
 int getKey_val()
          returns value of the KEY_VAL column of this row of data
 java.lang.Integer getObjKey_id()
          returns value of the KEY_ID column of this row of data
 java.lang.String getObjKey_name()
          returns value of the KEY_NAME column of this row of data
 java.lang.Integer getObjKey_val()
          returns value of the KEY_VAL column of this row of data
 void load(Db db)
          load record from the DB by primary key
static Pkeys load(java.sql.ResultSet results)
           
static Pkeys load(java.sql.ResultSet results, Pkeys newObj)
           
 void setKey_id(int newVal)
          sets value of the KEY_ID column of this row of data default value for this field set by the DB is null This is the primary key for this table
 void setKey_id(java.lang.Integer newVal)
          sets value of the KEY_ID column of this row of data default value for this field set by the DB is null This is the primary key for this table
 void setKey_name(java.lang.String newVal)
          sets value of the KEY_NAME column of this row of data default value for this field set by the DB is null This field has a max length of 100, longer strings will be truncated
 void setKey_val(int newVal)
          sets value of the KEY_VAL column of this row of data default value for this field set by the DB is null
 void setKey_val(java.lang.Integer newVal)
          sets value of the KEY_VAL column of this row of data default value for this field set by the DB is null
 void store()
          Deprecated. Should use store(Db db) to limit connections to DB
 void store(Db db)
          Store this object in the DB
 java.lang.String toString()
          Returns a String showing the values of this bean - mainly for debuging
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

display

protected static final Display display

key_id

protected java.lang.Integer key_id

key_name

protected java.lang.String key_name

key_val

protected java.lang.Integer key_val

TABLE_NAME

public static final java.lang.String TABLE_NAME
See Also:
Constant Field Values

GETALL

public static final java.lang.String GETALL
See Also:
Constant Field Values

KEY_ID

public static final java.lang.String KEY_ID
See Also:
Constant Field Values

KEY_ID_LEN

public static final int KEY_ID_LEN
See Also:
Constant Field Values

KEY_NAME

public static final java.lang.String KEY_NAME
See Also:
Constant Field Values

KEY_NAME_LEN

public static final int KEY_NAME_LEN
See Also:
Constant Field Values

KEY_VAL

public static final java.lang.String KEY_VAL
See Also:
Constant Field Values

KEY_VAL_LEN

public static final int KEY_VAL_LEN
See Also:
Constant Field Values
Constructor Detail

Pkeys

public Pkeys()
Basic constructor


Pkeys

public Pkeys(int pk)
load record from the DB by primary key.

Method Detail

getObjKey_id

public java.lang.Integer getObjKey_id()
returns value of the KEY_ID column of this row of data

Returns:
value of this column in this row

getKey_id

public int getKey_id()
returns value of the KEY_ID column of this row of data

Returns:
value of this column in this row

setKey_id

public void setKey_id(java.lang.Integer newVal)
sets value of the KEY_ID column of this row of data default value for this field set by the DB is null This is the primary key for this table


setKey_id

public void setKey_id(int newVal)
sets value of the KEY_ID column of this row of data default value for this field set by the DB is null This is the primary key for this table


getObjKey_name

public java.lang.String getObjKey_name()
returns value of the KEY_NAME column of this row of data

Returns:
value of this column in this row

getKey_name

public java.lang.String getKey_name()
returns value of the KEY_NAME column of this row of data

Returns:
value of this column in this row

setKey_name

public void setKey_name(java.lang.String newVal)
sets value of the KEY_NAME column of this row of data default value for this field set by the DB is null This field has a max length of 100, longer strings will be truncated


getObjKey_val

public java.lang.Integer getObjKey_val()
returns value of the KEY_VAL column of this row of data

Returns:
value of this column in this row

getKey_val

public int getKey_val()
returns value of the KEY_VAL column of this row of data

Returns:
value of this column in this row

setKey_val

public void setKey_val(java.lang.Integer newVal)
sets value of the KEY_VAL column of this row of data default value for this field set by the DB is null


setKey_val

public void setKey_val(int newVal)
sets value of the KEY_VAL column of this row of data default value for this field set by the DB is null


clone

public java.lang.Object clone()
Returns:
a copy of this object

load

public static Pkeys load(java.sql.ResultSet results)
                  throws java.sql.SQLException
Returns:
an object created from the resultSet
Throws:
java.sql.SQLException

load

public static Pkeys load(java.sql.ResultSet results,
                         Pkeys newObj)
                  throws java.sql.SQLException
Returns:
object loaded from the resultSet. If newObj is null a new object is created otherwise newObj is returned.
Throws:
java.sql.SQLException

load

public void load(Db db)
load record from the DB by primary key

Parameters:
db -

store

public void store()
           throws java.sql.SQLException,
                  java.lang.ClassNotFoundException
Deprecated. Should use store(Db db) to limit connections to DB

Store this object in the DB

Throws:
java.sql.SQLException
java.lang.ClassNotFoundException

store

public void store(Db db)
           throws java.sql.SQLException,
                  java.lang.ClassNotFoundException
Store this object in the DB

Parameters:
db - holds connection to DB
Throws:
java.sql.SQLException
java.lang.ClassNotFoundException

toString

public java.lang.String toString()
Returns a String showing the values of this bean - mainly for debuging

Returns:
String


Copyright © 2001-2005 Round Mountain Rescue Ranch. All Rights Reserved.