dea.beans
Class Menus

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

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

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

Version:
1.0
Primary key is on column:MENU_KEY
Create statment: CREATE TABLE `menus` ( `menu_key` int(11) NOT NULL auto_increment, `cat` int(11) default NULL, `sort_by_attr` int(11) default NULL, `description` varchar(255) default '', `sort_col` varchar(100) default NULL, `sort_desc` smallint(6) default NULL, PRIMARY KEY (`menu_key`) ) TYPE=MyISAM
Author:
David Abigt via GenBean
See Also:
Serialized Form

Field Summary
protected  java.lang.Integer cat
           
static java.lang.String CAT
           
static int CAT_LEN
           
protected  java.lang.String description
           
static java.lang.String DESCRIPTION
           
static int DESCRIPTION_LEN
           
protected static Display display
           
static java.lang.String GETALL
           
protected  java.lang.Integer menu_key
           
static java.lang.String MENU_KEY
           
static int MENU_KEY_LEN
           
protected  java.lang.Integer sort_by_attr
           
static java.lang.String SORT_BY_ATTR
           
static int SORT_BY_ATTR_LEN
           
protected  java.lang.String sort_col
           
static java.lang.String SORT_COL
           
static int SORT_COL_LEN
           
protected  java.lang.Integer sort_desc
           
static java.lang.String SORT_DESC
           
static int SORT_DESC_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
Menus()
          Basic constructor
Menus(int pk)
          load record from the DB by primary key.
 
Method Summary
 java.lang.Object clone()
           
 int getCat()
          returns value of the CAT column of this row of data
 java.lang.String getDescription()
          returns value of the DESCRIPTION column of this row of data
 int getMenu_key()
          returns value of the MENU_KEY column of this row of data
 java.lang.Integer getObjCat()
          returns value of the CAT column of this row of data
 java.lang.String getObjDescription()
          returns value of the DESCRIPTION column of this row of data
 java.lang.Integer getObjMenu_key()
          returns value of the MENU_KEY column of this row of data
 java.lang.Integer getObjSort_by_attr()
          returns value of the SORT_BY_ATTR column of this row of data
 java.lang.String getObjSort_col()
          returns value of the SORT_COL column of this row of data
 java.lang.Integer getObjSort_desc()
          returns value of the SORT_DESC column of this row of data
 int getSort_by_attr()
          returns value of the SORT_BY_ATTR column of this row of data
 java.lang.String getSort_col()
          returns value of the SORT_COL column of this row of data
 int getSort_desc()
          returns value of the SORT_DESC column of this row of data
 void load(Db db)
          load record from the DB by primary key
static Menus load(java.sql.ResultSet results)
           
static Menus load(java.sql.ResultSet results, Menus newObj)
           
 void setCat(int newVal)
          sets value of the CAT column of this row of data default value for this field set by the DB is null
 void setCat(java.lang.Integer newVal)
          sets value of the CAT column of this row of data default value for this field set by the DB is null
 void setDescription(java.lang.String newVal)
          sets value of the DESCRIPTION column of this row of data default value for this field set by the DB is null This field has a max length of 255, longer strings will be truncated
 void setMenu_key(int newVal)
          sets value of the MENU_KEY 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 setMenu_key(java.lang.Integer newVal)
          sets value of the MENU_KEY 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 setSort_by_attr(int newVal)
          sets value of the SORT_BY_ATTR column of this row of data default value for this field set by the DB is null
 void setSort_by_attr(java.lang.Integer newVal)
          sets value of the SORT_BY_ATTR column of this row of data default value for this field set by the DB is null
 void setSort_col(java.lang.String newVal)
          sets value of the SORT_COL 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 setSort_desc(int newVal)
          sets value of the SORT_DESC column of this row of data default value for this field set by the DB is null
 void setSort_desc(java.lang.Integer newVal)
          sets value of the SORT_DESC 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

cat

protected java.lang.Integer cat

description

protected java.lang.String description

menu_key

protected java.lang.Integer menu_key

sort_by_attr

protected java.lang.Integer sort_by_attr

sort_col

protected java.lang.String sort_col

sort_desc

protected java.lang.Integer sort_desc

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

CAT

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

CAT_LEN

public static final int CAT_LEN
See Also:
Constant Field Values

DESCRIPTION

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

DESCRIPTION_LEN

public static final int DESCRIPTION_LEN
See Also:
Constant Field Values

MENU_KEY

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

MENU_KEY_LEN

public static final int MENU_KEY_LEN
See Also:
Constant Field Values

SORT_BY_ATTR

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

SORT_BY_ATTR_LEN

public static final int SORT_BY_ATTR_LEN
See Also:
Constant Field Values

SORT_COL

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

SORT_COL_LEN

public static final int SORT_COL_LEN
See Also:
Constant Field Values

SORT_DESC

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

SORT_DESC_LEN

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

Menus

public Menus()
Basic constructor


Menus

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

Method Detail

getObjCat

public java.lang.Integer getObjCat()
returns value of the CAT column of this row of data

Returns:
value of this column in this row

getCat

public int getCat()
returns value of the CAT column of this row of data

Returns:
value of this column in this row

setCat

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


setCat

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


getObjDescription

public java.lang.String getObjDescription()
returns value of the DESCRIPTION column of this row of data

Returns:
value of this column in this row

getDescription

public java.lang.String getDescription()
returns value of the DESCRIPTION column of this row of data

Returns:
value of this column in this row

setDescription

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


getObjMenu_key

public java.lang.Integer getObjMenu_key()
returns value of the MENU_KEY column of this row of data

Returns:
value of this column in this row

getMenu_key

public int getMenu_key()
returns value of the MENU_KEY column of this row of data

Returns:
value of this column in this row

setMenu_key

public void setMenu_key(java.lang.Integer newVal)
sets value of the MENU_KEY 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


setMenu_key

public void setMenu_key(int newVal)
sets value of the MENU_KEY 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


getObjSort_by_attr

public java.lang.Integer getObjSort_by_attr()
returns value of the SORT_BY_ATTR column of this row of data

Returns:
value of this column in this row

getSort_by_attr

public int getSort_by_attr()
returns value of the SORT_BY_ATTR column of this row of data

Returns:
value of this column in this row

setSort_by_attr

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


setSort_by_attr

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


getObjSort_col

public java.lang.String getObjSort_col()
returns value of the SORT_COL column of this row of data

Returns:
value of this column in this row

getSort_col

public java.lang.String getSort_col()
returns value of the SORT_COL column of this row of data

Returns:
value of this column in this row

setSort_col

public void setSort_col(java.lang.String newVal)
sets value of the SORT_COL 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


getObjSort_desc

public java.lang.Integer getObjSort_desc()
returns value of the SORT_DESC column of this row of data

Returns:
value of this column in this row

getSort_desc

public int getSort_desc()
returns value of the SORT_DESC column of this row of data

Returns:
value of this column in this row

setSort_desc

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


setSort_desc

public void setSort_desc(int newVal)
sets value of the SORT_DESC 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 Menus load(java.sql.ResultSet results)
                  throws java.sql.SQLException
Returns:
an object created from the resultSet
Throws:
java.sql.SQLException

load

public static Menus load(java.sql.ResultSet results,
                         Menus 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.