: Class Dao
: Class Dao
Class
Tree
Deprecated
Index
Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
Class Dao
Dao
Direct Known Subclasses: MailingAddress
public class Dao
Location: data/Dao.class
A database table entry with operations to manipulate itself (Abstract)
Copyright © 2001 eXtremePHP. All rights reserved.
Constructor Summary
Dao(var $dbResult,
var $metaData)
Constructs a new Dao and sets its members based by the FieldNameArrays
Method Summary
void
commit(var $queryString)
Updates and Commit this entry by the given SQL Statement
static void
createDao()
An abstract method to return an instance of a specific Dao.
void
delete(var $queryString)
Deletes the entries given by an SQL statement
boolean
getColumnCount()
static void
initMetaData()
Abstract static method to initialize the MetaData object for Dao
subclasses
void
isChanged()
Returns true if the dao has been changed and false otherwise.
Dao[]
selectMany(var $queryString,
var $constructDaoFunctionName)
Selects the all the table entries with the given query.
Dao
selectOne(var $queryString,
var $constructDaoFunctionName)
Selects the first table entry with the given query
void
set()
Given any number of arguments, the function sets the object's internal
member variables to the values provided.
void
setChanged(var $changed)
Tells the dao if it has been changed or not.
void
setNullFieldToEmpty(var $dbResult,
var $name)
Sets the field in the result to an empty string if it is null
string
toString()
string
toXml()
boolean
writeXml(var $fileName)
Constructor Detail
Dao
public Dao(var $dbResult,
var $metaData)
Constructs a new Dao and sets its members based by the FieldNameArrays
Parameters:$dbResult - mixed. A database result returned by a
DatabaseConnection$fieldNamesArray - array. A list of field names of the
database entry.$dbResult - is passed by reference$metaData - is passed by reference
Method Detail
initMetaData
public static void initMetaData()
Abstract static method to initialize the MetaData object for Dao
subclasses
setNullFieldToEmpty
public void setNullFieldToEmpty(var $dbResult,
var $name)
Sets the field in the result to an empty string if it is null
Parameters:$dbResult - mixed. A database result returned by a
DatabaseConnection object.@name - array. The name of the field to set$dbResult - is passed by reference
set
public void set()
Given any number of arguments, the function sets the object's internal
member variables to the values provided. The order of the
variables is dependant on the internal order of the fieldlist. The
function must receive the correct number number of fields in order to
function properly. Note: A settable field is a field is anything by
a PrimaryKey, a Url or a Fixed field.
selectOne
public Dao selectOne(var $queryString,
var $constructDaoFunctionName)
Selects the first table entry with the given query
Parameters:$queryString - string. An SQL statement$constructDaoFunctionName - string. The function name to call
to create the specific DAO. The Default is createDao()$constructDaoFunctionName - Default Value: 'createDao'
selectMany
public Dao[] selectMany(var $queryString,
var $constructDaoFunctionName)
Selects the all the table entries with the given query. Returns an array of Dao's.
Parameters:$queryString - string. An SQL statement$constructDaoFunctionName - string. The function name to call
to create the specific DAO. The Default is createDao()$constructDaoFunctionName - Default Value: 'createDao'
commit
public void commit(var $queryString)
Updates and Commit this entry by the given SQL Statement
Parameters:$queryString - string. An SQL statement
delete
public void delete(var $queryString)
Deletes the entries given by an SQL statement
Parameters:$queryString - string. An SQL statement
isChanged
public void isChanged()
Returns true if the dao has been changed and false otherwise.
setChanged
public void setChanged(var $changed)
Tells the dao if it has been changed or not.
createDao
public static void createDao()
An abstract method to return an instance of a specific Dao. This is to
be overwritten by all Dao subclasses.
getColumnCount
public boolean getColumnCount()
writeXml
public boolean writeXml(var $fileName)
toXml
public string toXml()
toString
public string toString()
Class
Tree
Deprecated
Index
Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
содержание | 2 | Интернет Пиар
Используются технологии
uCoz