Java Doc for PersonDO.java in  » J2EE » enhydra » jspPhoneBook » data » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » enhydra » jspPhoneBook.data 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


jspPhoneBook.data.PersonDO

PersonDO
public class PersonDO extends com.lutris.dods.builder.generator.dataobject.GenericDO implements PersonDOI,java.io.Serializable(Code)
Data core class, used to set and retrieve the PersonDO information.
version:
   $Revision: 1.1 $
author:
   EnhydraTeam
since:
   PhoneList


Field Summary
final public static  intCOLUMN_FIRSTNAME
     Use for query caching.
final public static  intCOLUMN_LASTNAME
     Use for query caching.
final public static  intCOLUMN_PHONENUMBER
     Use for query caching.
final public static  RDBColumnFirstName
     static final RDBColumn FirstName for use with QueryBuilder.
final public static  RDBColumnLastName
     static final RDBColumn LastName for use with QueryBuilder.
final public static  RDBColumnPhoneNumber
     static final RDBColumn PhoneNumber for use with QueryBuilder.
final public static  RDBColumnPrimaryKey
     static final RDBColumn PrimaryKey for use with QueryBuilder.
protected static  DataStructCachecache
    
protected  booleandeleted
    
final public static  intfirstName_MaxLength
    
final public static  intlastName_MaxLength
    
final protected static  booleannotUsingOId
    
protected  StringoriginDatabase
    
final public static  intphoneNumber_MaxLength
    
protected static  Statisticsstatistics
     Represents table and cache (if there is caching) statistics.
final public static  RDBTabletable
     Static final data members name the table and columns for this DO.

Constructor Summary
protected  PersonDO(boolean is_view)
     Protected constructor.
protected  PersonDO(boolean is_view, DBTransaction dbTrans)
     Protected constructor.
protected  PersonDO()
     Protected constructor.
protected  PersonDO(DBTransaction dbTrans)
     Protected constructor.
protected  PersonDO(ObjectId id)
     Protected constructor used by createExisting(ObjectId) above.
protected  PersonDO(ObjectId id, DBTransaction dbTrans)
     Protected constructor used by createExisting(ObjectId, DBTransaction) above.
protected  PersonDO(ResultSet rs)
     Protected constructor.
protected  PersonDO(ResultSet rs, HashMap queryRefs)
     Protected constructor.
protected  PersonDO(ResultSet rs, HashMap queryRefs, DBTransaction dbTrans)
     Protected constructor.
protected  PersonDO(ResultSet rs, DBTransaction dbTrans)
     Protected constructor.

Method Summary
protected  void_setFirstName(String firstName)
     _setFirstName is a protected method that is called by setFirstName if firstName is not part of a multicolumn foreign key.
protected  void_setLastName(String lastName)
     _setLastName is a protected method that is called by setLastName if lastName is not part of a multicolumn foreign key.
protected  void_setPhoneNumber(String phoneNumber)
     _setPhoneNumber is a protected method that is called by setPhoneNumber if phoneNumber is not part of a multicolumn foreign key.
public static synchronized  PersonDataStructaddToCache(PersonDataStruct newDS)
     Add DataStruct object to cache.
public  voidaddToCache()
     Add DO's original data object to cache.
public  voidcheckDup()
    
protected  voidcheckLoad()
     Load the actual DO data if necessary.
public synchronized  ObjectcloneUnique()
     Creates a clone of the object, but ensures that a new and unique object id is created for the object and that the version number is set to zero.
public  voidcommit()
     Inserts/Updates the DO into its table.
public  voidcommit(DBTransaction dbt)
     Inserts/Updates the DO into its table.
public  booleancompareCond(Condition cond)
     Compares whether this DO satisfies condition cond.
Parameters:
  cond - condition.
public static  PersonDOcreateCopy(PersonDataStruct data)
     Creates a DO that has no ObjectId but has a copy of an existing DO's data. Such a DO is used to insert a new database entry that is largely similar to an existing entry.
Parameters:
  data - The data struct to copy values from.
public static  PersonDOcreateCopy(PersonDataStruct data, DBTransaction dbTrans)
     Creates a DO that has no ObjectId but has a copy of an existing DO's data.
public static  PersonDOcreateCopy(PersonDO orig)
     Creates a DO that has no ObjectId but has a copy of an existing DO's data. Such a DO is used to insert a new database entry that is largely similar to an existing entry.
Parameters:
  orig - The original DO to copy.
public static  PersonDOcreateCopy(PersonDO orig, DBTransaction dbTrans)
    
public static  GenericDOcreateDO(ObjectId oid)
     Created DO with specified OID.
Parameters:
  obj - DO which will be copied.
public static  GenericDOcreateDO(ObjectId oid, DBTransaction dbTrans)
     Created DO with specified OID.
Parameters:
  obj - DO which will be copied.
Parameters:
  dbTrans - The current database transaction.
public static  PersonDOcreateExisting(BigDecimal bd)
     createExisting( BigDecimal ) Factory method creates a PersonDO object by searching for it in the database using the passed BigDecimal value as the primary key. Creates a DO that represents an existing entry in the database. Such a DO is used to examine and possibly update such an entry. createExisting() is called only from the code that retrieves an ObjectId from a ResultSet (database query result). createExisting() is protected because no other DO or BO should ever need to call it. FIX unfortunately the createExisting(BigDecimal) form *does* need to be public because it is called by the public ctors of other DOs. For example: AaaDO contains a ref to a BbbDO, so there is a method AaaDO.setBbb(BbbDO). In the ctor AaaDO(ResultSet), we have the call setBbb( BbbDO.createExisting( rs.getBigDecimal( "bbb"))); Since AaaDO is not in the same package as BbbDO, BbbDO.createExisting(BigDecimal) must be public, not protected. Java needs the C++ 'friend' idea.
Parameters:
  bd - The BigDecimal representation of the ObjectId for the object.
public static  PersonDOcreateExisting(BigDecimal bd, DBTransaction dbTrans)
     createExisting( BigDecimal, DBTransaction )
Parameters:
  bd - The BigDecimal representation of the ObjectId for the object.
Parameters:
  dbTrans - The current database transaction.
public static  PersonDOcreateExisting(BigDecimal bd, HashMap queryRefs, DBTransaction dbTrans)
     createExisting( BigDecimal, HashMap, DBTransaction )
Parameters:
  bd - The BigDecimal representation of the ObjectId for the object.
Parameters:
  queryRefs - HashMap Created referenced DO's (key datamaseName.Oid)
Parameters:
  dbTrans - The current database transaction.
public static  PersonDOcreateExisting(String handle)
     createExisting( String ) The createExisting method is used to create a PersonDO from a string handle.
Parameters:
  handle - String representation of the ObjectId for the object.
public static  PersonDOcreateExisting(String handle, DBTransaction dbTrans)
     createExisting( String, DBTransaction ) The createExisting method is used to create a PersonDO from a string handle.
protected static  PersonDOcreateExisting(ObjectId id, DBTransaction dbTrans)
     createExisting( ObjectId , DBTransaction) Factory method creates a PersonDO object by searching for it in the database using the passed ObjectID value as the primary key.
Parameters:
  id - The ObjectId for the object.
Parameters:
  dbTrans - The current database transaction.
protected static  PersonDOcreateExisting(ObjectId id, HashMap queryRefs, DBTransaction dbTrans)
     createExisting( ObjectId , HashMap queryRefs, DBTransaction) Factory method creates a PersonDO object by searching for it in the database using the passed ObjectID value as the primary key.
Parameters:
  id - The ObjectId for the object.
Parameters:
  queryRefs - HashMap of available references.
Parameters:
  dbTrans - The current database transaction.
protected static  PersonDOcreateExisting(ObjectId id)
     createExisting( ObjectId ) Factory method creates a PersonDO object by searching for it in the database using the passed ObjectID value as the primary key.
Parameters:
  id - The ObjectId for the object.
protected static  PersonDOcreateExisting(ResultSet rs)
     createExisting( ResultSet ) Factory method used to create an instance of this class to represent a Data Object already existing in the database.
Parameters:
  rs - The ResultSet returned by the Query class foran existing Data Object stored in the database.
protected static  PersonDOcreateExisting(ResultSet rs, DBTransaction dbTrans)
    
protected static  PersonDOcreateExisting(ResultSet rs, HashMap queryRefs)
     createExisting( ResultSet , HashMap) Factory method used to create an instance of this class to represent a Data Object already existing in the database.
Parameters:
  rs - The ResultSet returned by the Query class foran existing Data Object stored in the database.
Parameters:
  queryRefs - list of created refernce objects.
protected static  PersonDOcreateExisting(ResultSet rs, HashMap queryRefs, DBTransaction dbTrans)
    
protected static  PersonDOcreateExisting(RDBRow row)
     createExisting( RDBRow ) Factory method creates a PersonDO object by searching for it in the database using the PersonDO.PrimaryKey value in the passed RDBRow.
Parameters:
  RDBRow - A row returned by QueryBuilder.getNextRow().
protected static  PersonDOcreateExisting(RDBRow row, DBTransaction dbTrans)
     createExisting( RDBRow , DBTransaction) Factory method creates a PersonDO object by searching for it in the database using the PersonDO.PrimaryKey value in the passed RDBRow.
protected static  PersonDOcreateExisting(RDBColumnValue pk)
     createExisting( RDBColumnValue ) Factory method creates a PersonDO object by searching for it in the database using the passed PersonDO.PrimaryKey.
Parameters:
  RDBColumnValue - a PrimaryKey column value from a rowthat was returned by QueryBuilder.getNextRow().
protected static  PersonDOcreateExisting(RDBColumnValue pk, DBTransaction dbTrans)
     createExisting( RDBColumnValue, DBTransaction ) Factory method creates a PersonDO object by searching for it in the database using the passed PersonDO.PrimaryKey.
Parameters:
  RDBColumnValue - a PrimaryKey column value from a rowthat was returned by QueryBuilder.getNextRow().
public static  DBQuerycreateQuery()
     createQuery() creates a new DBQuery.
public static  DBQuerycreateQuery(DBTransaction trans)
     createQuery() creates a new DBQuery.
public static  DBTransactioncreateTransaction()
     createTransaction() creates a new DBTransaction.
public static  PersonDOcreateVirgin()
     createVirgin() Creates a DO that has no ObjectId or data.
public static  PersonDOcreateVirgin(DBTransaction dbTrans)
    
public  voiddelete()
     Deletes the DO from its table.
public  voiddelete(DBTransaction dbt)
     Deletes the DO from its table.
public static synchronized  PersonDataStructdeleteFromCache(PersonDataStruct data)
    
public  voiddeleteFromCache()
    
public static  voiddisableCaching()
    
public  voiddoCheck(boolean value)
     Specifies whether to lock this DO (row) in database just before commit.
public  voiddoLock()
     Locks this DO in database by performing "update set version=OLD_ONE where OID=X and version=OLD_ONE".
public  voiddoTouch()
     Locks this DO in database by performing "update set version=OLD_ONE where OID=X and version=INCREMENTED".
public static  voidenableCaching()
    
public  voidevict()
     Remove DataStruct from cache.
public static  voidevict(PersonDataStruct[] DSs)
     Remove DataStruct objects from cache.
public static  voidevict(String dbName, String[] handles)
     Remove DataStruct objects from cache.
public synchronized  voidexecuteInsert(DBConnection conn)
     Inserts this object into the database.
public  voidexecuteLockingStatement(DBConnection conn)
     Prepares and executes the statement used to lock this object in the database.
public  voidfinalizeDelete(boolean success)
     Currently does nothing.
public  voidfinalizeInsert(boolean success)
     If transaction succeeded marks this object as clean.
public  voidfinalizeUpdate(boolean success)
     If transaction succeeded marks this object as clean.
public static  PersonDataStructfindCachedObjectByHandle(String cacheHandle)
     Get DataStruct object with key cacheHandle from the cache.
Parameters:
  cacheHandle - String version of concatenation of:name of the data object's database, followed by '.', followed bydata object's id.
public  PersonDOfindTransactionCachedObjectByHandle(String cacheHandle)
     Get data object with key cacheHandle from the cache.
Parameters:
  cacheHandle - String version of concatenation of:name of the data object's database, followed by '.', followed bydata object's id.
public static  StringgetCacheDodsTableName()
     Get name of the table that is cached.
public static  ConfigurationAdministrationgetConfigurationAdministration()
     Returns person table cache.
public  ObjectgetData()
     Returns DO's data.
public  PersonDataStructgetDataStruct()
     Returns dataStruct.
public  PreparedStatementgetDeleteStatement(DBConnection conn)
     Prepares the statement used to delete this object from the database.
public  StringgetFirstName()
     Get firstName of the person.
public  StringgetHandle()
     The methods getHandle hasMatchingHandle findCachedObjectByHandle are used by Presentation Objects that need to populate HTML select lists with Data Objects as options. The getHandle() method is used to set the value for each option, and the hasMatchingHandle() methods are used to lookup the Data Object when the selection has been made.
exception:
  DatabaseManagerException - If a connection to the database cannot be established, etc.
public  PreparedStatementgetInsertStatement(DBConnection conn)
     Prepares the statement used to insert this object into the database.
Parameters:
  conn - The database connection.
public  StringgetLastName()
     Get lastName of the person.
public  intgetNewVersion()
    
public  ObjectIdgetOId()
    
public  StringgetOriginDatabase()
     Return the name of the logical database for which DO object was created.
public  StringgetPhoneNumber()
     Get phoneNumber of the person.
public  StringgetTableName()
     Return person as the name of the table in the database which contains PersonDO objects.
public  PreparedStatementgetUpdateStatement(DBConnection conn)
     Prepares the statement used to update this object in the database.
public static  String[]getUsedLogicalDatabases()
     Get all used logical databases.
public  intgetVersion()
    
public  Stringget_CacheHandle()
     Returns cache handle.
public  Objectget_Data()
     Returns DO's data.
public  PersonDataStructget_DataStruct()
     Returns dataStruct.
public  Stringget_Handle()
     The methods get_Handle hasMatchingHandle findCachedObjectByHandle are used by Presentation Objects that need to populate HTML select lists with Data Objects as options. The get_Handle() method is used to set the value for each option, and the hasMatchingHandle() methods are used to lookup the Data Object when the selection has been made.
exception:
  DatabaseManagerException - If a connection to the database cannot be established, etc.
public  intget_NewVersion()
    
public  ObjectIdget_OId()
     Returns this object's identifier.
public  Stringget_OriginDatabase()
     Return the name of the logical database for which DO object was created.
public static  String[]get_UsedLogicalDatabases()
     Get all used logical databases.
public  intget_Version()
     get_Version makes the protected method public in CoreDO.
public static synchronized  Stringget_logicalDBName()
     get_logicalDBName retrieves the logical database name set by setLogicalDBName().
public static  Statisticsget_statistics()
     Get table statistics.
public  DBTransactionget_transaction()
     Return transaction which DO belongs.
public  booleanhasMatchingHandle(String handle)
     Compare string version of the id of this DO and handle.
Parameters:
  handle - String version of DO id.
protected static  booleanisAllReadOnly()
    
protected  booleanisAutoSave()
    
protected  booleanisAutoSaveCreateVirgin()
    
protected  booleanisDeleteCheckVersion()
    
public  booleanisDeleted()
    
public  booleanisLoaded()
     isLoaded() Returns information whether object's data is loaded from database.
public  booleanisReadOnly()
     Return information whether the data for this object has been marked read-only.
protected  booleanisTransactionCaches()
    
protected  booleanisTransactionCheck()
    
public  booleanisVirgin()
    
public  voidloadData()
     Load the fields for the DO from the database.
protected  voidmakeIdentical(PersonDO orig)
     Assigns the DataStruct of an existing DO to this DO. Does not duplicate data.
public  voidmakeInvisible()
    
public  voidmakeReadOnly()
     Mark the object as read-only.
public  voidmakeReadWrite()
     Mark the object as read-write.
public  voidmakeVisible()
    
protected  voidmodifyDO(DBTransaction dbt, boolean delete)
     Modifies the DO within its table.
protected  voidmodifyDO(DBTransaction dbt, boolean delete, boolean references)
     Modifies the DO within its table.
protected  voidokToCommit()
     A stub method for implementing pre-commit assertions for this PersonDO.
protected  voidokToDelete()
     A stub method for implementing pre-delete assertions for this PersonDO.
public  ObjectoriginalData_get()
     Returns original DO's data.
public  StringoriginalData_getFirstName()
     Get original firstName of the person.
public  StringoriginalData_getLastName()
     Get original lastName of the person.
public  StringoriginalData_getPhoneNumber()
     Get original phoneNumber of the person.
public  voidoriginalData_set(Object data)
     Sets original DO's data.
public static  voidreadCacheConfiguration(String database)
     Read cache configuration from application configuration file: cache size for phoneList.data.person table or default cache size.
public  voidrefresh()
     This method is invoked whenever object needs to be loaded from database.
public static  voidrefresh(PersonDO[] DOs)
     This method is invoked whenever objects needs to be loaded from database.
public static  voidrefresh(String querySnt)
    
public static  voidrefreshCache()
     Queries all rows in table, and for each row creates a DO instance in the cache.
public static  voidrefreshStatistics()
     Refresh table statistics.
public  voidreload()
     Causes the DO to refresh itself from the database the next time a set or get method is called.
public static synchronized  voidremoveFromCache(String dbName, String handle)
     Remove DataStruct object from cache.
public static synchronized  PersonDataStructremoveFromCache(PersonDataStruct data)
     Remove DataStruct from cache.
Parameters:
  data - DataStruct object which will be removed.
public  voidsave()
     Inserts/Updates the DO into its table.
public  voidsave(boolean references)
     Inserts/Updates the DO into its table.
public  voidsave(DBTransaction dbt)
     Inserts/Updates the DO into its table.
public  voidsave(DBTransaction dbt, boolean references)
     Inserts/Updates the DO into its table.
public  voidsetData(Object data)
     Sets DO's data.
public  voidsetDeleted(boolean flag)
    
public  voidsetFirstName(String firstName)
     Set firstName of the person.
public  voidsetLastName(String lastName)
     Set lastName of the person.
public static synchronized  voidsetLogicalDBName(String logicalDbNameInConfFile)
     setLogicalDBName sets the logical database name that will be used to create DBTransaction and DBQuery objects used by PersonDO and the corresponding Query class.
public  voidsetNewVersion(int _ver)
    
protected  voidsetOId(ObjectId _oId)
    
public  voidsetPhoneNumber(String phoneNumber)
     Set phoneNumber of the person.
protected  booleansetTransaction(DBTransaction trans)
     Set Transaction to current DO.
public  voidsetVersion(int _ver)
    
public  voidset_Data(Object data)
     Sets DO's data.
protected  voidset_OId(ObjectId _oId)
     Sets this object's identifier.
public  voidset_Version(int _ver)
    
public  StringtoString()
    
public  StringtoString(int indentCount)
    
public  voidunDelete()
     UnDeletes the DO and inserts to the table.
public  voidunDelete(DBTransaction dbt)
     UnDeletes the DO and inserts to the table.
public  voidundo()
    
public static synchronized  PersonDataStructupdateCache(PersonDataStruct updDS)
    
public  voidupdateCache()
    

Field Detail
COLUMN_FIRSTNAME
final public static int COLUMN_FIRSTNAME(Code)
Use for query caching.



COLUMN_LASTNAME
final public static int COLUMN_LASTNAME(Code)
Use for query caching.



COLUMN_PHONENUMBER
final public static int COLUMN_PHONENUMBER(Code)
Use for query caching.



FirstName
final public static RDBColumn FirstName(Code)
static final RDBColumn FirstName for use with QueryBuilder. See RDBColumn PrimaryKey at the top of this file for usage example.



LastName
final public static RDBColumn LastName(Code)
static final RDBColumn LastName for use with QueryBuilder. See RDBColumn PrimaryKey at the top of this file for usage example.



PhoneNumber
final public static RDBColumn PhoneNumber(Code)
static final RDBColumn PhoneNumber for use with QueryBuilder. See RDBColumn PrimaryKey at the top of this file for usage example.



PrimaryKey
final public static RDBColumn PrimaryKey(Code)
static final RDBColumn PrimaryKey for use with QueryBuilder. See example above.



cache
protected static DataStructCache cache(Code)



deleted
protected boolean deleted(Code)



firstName_MaxLength
final public static int firstName_MaxLength(Code)



lastName_MaxLength
final public static int lastName_MaxLength(Code)



notUsingOId
final protected static boolean notUsingOId(Code)



originDatabase
protected String originDatabase(Code)
Name of the logical database for which DO object was created



phoneNumber_MaxLength
final public static int phoneNumber_MaxLength(Code)



statistics
protected static Statistics statistics(Code)
Represents table and cache (if there is caching) statistics.



table
final public static RDBTable table(Code)
Static final data members name the table and columns for this DO. By using these members with an instance of the QueryBuilder class, an application can perform straight SQL queries while retaining compile-time checking of table and column usage. Example: List the Cities containing Persons named Bob: Using straight SQL with QueryBuilder: Pro: code runs faster because you create fewer objects Con: code is less clear Vector fields = new Vector(); fields.addElement( AddressDO.City ); QueryBuilder qb = new QueryBuilder( fields ); qb.addWhere( PersonDO.FirstName, "Bob" ); qb.addWhere( PersonDO.PrimaryKey, AddressDO.Person ); RDBRow row; while ( null != ( row = qb.getNextRow() ) ) { String city = row.get( AddressDO.City ).getString(); } Using Query/DO classes: Pro: code is (often) clearer Con: code runs slower because you create more objects PersonQuery pq = new PersonQuery(); pq.setQueryFirstName( "Bob" ); PersonDO[] bobs = pq.getDOArray(); for ( int i = 0; i < bobs.length; i++ ) { AddressQuery aq = new AddressQuery(); aq.setQueryPerson( bobs[i] ); AddressDO addr = aq.getNextDO(); String city = addr.getCity(); }




Constructor Detail
PersonDO
protected PersonDO(boolean is_view) throws ObjectIdException, DatabaseManagerException(Code)
Protected constructor. Only derived classes should call it.
Parameters:
  is_view -
exception:
  DatabaseManagerException - If a connection to the database cannot be established, etc.
exception:
  com.lutris.appserver.server.sql.ObjectIdException - If an object's id can't be allocated for this object.



PersonDO
protected PersonDO(boolean is_view, DBTransaction dbTrans) throws ObjectIdException, DatabaseManagerException(Code)
Protected constructor. Only derived classes should call it.
Parameters:
  is_view -
exception:
  DatabaseManagerException - If a connection to the database cannot be established, etc.
exception:
  com.lutris.appserver.server.sql.ObjectIdException - If an object's id can't be allocated for this object.



PersonDO
protected PersonDO() throws ObjectIdException, DatabaseManagerException(Code)
Protected constructor. Only derived classes should call it.
exception:
  DatabaseManagerException - If a connection to the database cannot be established, etc.
exception:
  com.lutris.appserver.server.sql.ObjectIdException - If an object's id can't be allocated for this object.



PersonDO
protected PersonDO(DBTransaction dbTrans) throws ObjectIdException, DatabaseManagerException(Code)
Protected constructor. Only derived classes should call it.
Parameters:
  dbTrans - The current database transaction.
exception:
  DatabaseManagerException - If a connection to the database cannot be established, etc.
exception:
  com.lutris.appserver.server.sql.ObjectIdException - If an object's id can't be allocated for this object.



PersonDO
protected PersonDO(ObjectId id) throws SQLException, ObjectIdException, DataObjectException, DatabaseManagerException(Code)
Protected constructor used by createExisting(ObjectId) above.
Parameters:
  id - The ObjectId for the object.
exception:
  DataObjectException - If the object is not found in the database.
exception:
  com.lutris.appserver.server.sql.ObjectIdException - If an object's id can't be allocated for this object.
exception:
  DatabaseManagerException - If a connection to the database cannot be established, etc.
exception:
  SQLException - Should never see this exception since GenericDO.ctor(ObjectId)never accesses the database.



PersonDO
protected PersonDO(ObjectId id, DBTransaction dbTrans) throws SQLException, ObjectIdException, DataObjectException, DatabaseManagerException(Code)
Protected constructor used by createExisting(ObjectId, DBTransaction) above.
Parameters:
  id - The ObjectId for the object.
Parameters:
  dbTrans - The current database transaction
exception:
  DataObjectException - If the object is not found in the database.
exception:
  com.lutris.appserver.server.sql.ObjectIdException - If an object's id can't be allocated for this object.
exception:
  DatabaseManagerException - If a connection to the database cannot be established, etc.
exception:
  SQLException - Should never see this exception since GenericDO.ctor(ObjectId)never accesses the database.



PersonDO
protected PersonDO(ResultSet rs) throws SQLException, ObjectIdException, DataObjectException, DatabaseManagerException(Code)
Protected constructor.
Parameters:
  rs - Result set from which to obtain product data.
exception:
  DataObjectException - If the object is not found in the database.
exception:
  com.lutris.appserver.server.sql.ObjectIdException - If an object's id can't be allocated for this object.
exception:
  DatabaseManagerException - If a connection to the database cannot be established, etc.
exception:
  SQLException - If the database rejects the SQL generated to retrieve datafor this object, or if the table contains a bad foreign key, etc.



PersonDO
protected PersonDO(ResultSet rs, HashMap queryRefs) throws SQLException, ObjectIdException, DataObjectException, DatabaseManagerException(Code)
Protected constructor.
Parameters:
  rs - Result set from which to obtain product data.
exception:
  DataObjectException - If the object is not found in the database.
exception:
  com.lutris.appserver.server.sql.ObjectIdException - If an object's id can't be allocated for this object.
exception:
  DatabaseManagerException - If a connection to the database cannot be established, etc.
exception:
  SQLException - If the database rejects the SQL generated to retrieve datafor this object, or if the table contains a bad foreign key, etc.



PersonDO
protected PersonDO(ResultSet rs, HashMap queryRefs, DBTransaction dbTrans) throws SQLException, ObjectIdException, DataObjectException, DatabaseManagerException(Code)
Protected constructor.
Parameters:
  rs - Result set from which to obtain product data.
exception:
  DataObjectException - If the object is not found in the database.
exception:
  com.lutris.appserver.server.sql.ObjectIdException - If an object's id can't be allocated for this object.
exception:
  DatabaseManagerException - If a connection to the database cannot be established, etc.
exception:
  SQLException - If the database rejects the SQL generated to retrieve datafor this object, or if the table contains a bad foreign key, etc.



PersonDO
protected PersonDO(ResultSet rs, DBTransaction dbTrans) throws SQLException, ObjectIdException, DataObjectException, DatabaseManagerException(Code)
Protected constructor.
Parameters:
  rs - Result set from which to obtain product data.
Parameters:
  dbTrans - The current database transaction
exception:
  DataObjectException - If the object is not found in the database.
exception:
  com.lutris.appserver.server.sql.ObjectIdException - If an object's id can't be allocated for this object.
exception:
  DatabaseManagerException - If a connection to the database cannot be established, etc.
exception:
  SQLException - If the database rejects the SQL generated to retrieve datafor this object, or if the table contains a bad foreign key, etc.




Method Detail
_setFirstName
protected void _setFirstName(String firstName) throws DataObjectException(Code)
_setFirstName is a protected method that is called by setFirstName if firstName is not part of a multicolumn foreign key.
Parameters:
  firstName - of the person.
exception:
  DataObjectException - If the object is not found in the database.



_setLastName
protected void _setLastName(String lastName) throws DataObjectException(Code)
_setLastName is a protected method that is called by setLastName if lastName is not part of a multicolumn foreign key.
Parameters:
  lastName - of the person.
exception:
  DataObjectException - If the object is not found in the database.



_setPhoneNumber
protected void _setPhoneNumber(String phoneNumber) throws DataObjectException(Code)
_setPhoneNumber is a protected method that is called by setPhoneNumber if phoneNumber is not part of a multicolumn foreign key.
Parameters:
  phoneNumber - of the person.
exception:
  DataObjectException - If the object is not found in the database.



addToCache
public static synchronized PersonDataStruct addToCache(PersonDataStruct newDS)(Code)
Add DataStruct object to cache. If there is no caching newDO object is returned. param newDS DataStruct object that will be added to cache. return DataStruct object added to cache.



addToCache
public void addToCache()(Code)
Add DO's original data object to cache.



checkDup
public void checkDup() throws DatabaseManagerException, com.lutris.appserver.server.sql.ObjectIdException(Code)



checkLoad
protected void checkLoad() throws DataObjectException(Code)
Load the actual DO data if necessary. Called by get/set methods.
exception:
  DataObjectException - If a data access error occurs.



cloneUnique
public synchronized Object cloneUnique() throws DatabaseManagerException, ObjectIdException(Code)
Creates a clone of the object, but ensures that a new and unique object id is created for the object and that the version number is set to zero.
exception:
  DatabaseManagerException - if an error occurs whileallocation a new object id from the default logical database.
exception:
  ObjectIdException - if a new object id could not beallocated.



commit
public void commit() throws SQLException, DatabaseManagerException, DataObjectException, RefAssertionException, DBRowUpdateException, QueryException(Code)
Inserts/Updates the DO into its table.
exception:
  com.lutris.appserver.server.sql.DatabaseManagerException - If a Transaction can not be created.
exception:
  RefAssertionException - Thrown by okTo method.
exception:
  java.sql.SQLException - If any SQL errors occur.



commit
public void commit(DBTransaction dbt) throws SQLException, DatabaseManagerException, DataObjectException, RefAssertionException, DBRowUpdateException, QueryException(Code)
Inserts/Updates the DO into its table. The transaction is likely provided by the commit() method of another DO which references this DO.
Parameters:
  dbt - The transaction object used for this operation.
exception:
  com.lutris.appserver.server.sql.DatabaseManagerException - If a Transaction can not be created.
exception:
  com.lutris.appserver.server.sql.DBRowUpdateException - If a version error occurs.
exception:
  RefAssertionException - Thrown by okTo method.
exception:
  java.sql.SQLException - If any SQL errors occur.



compareCond
public boolean compareCond(Condition cond)(Code)
Compares whether this DO satisfies condition cond.
Parameters:
  cond - condition. true if DO satisfies condition cond, otherwise false.



createCopy
public static PersonDO createCopy(PersonDataStruct data) throws DatabaseManagerException, ObjectIdException(Code)
Creates a DO that has no ObjectId but has a copy of an existing DO's data. Such a DO is used to insert a new database entry that is largely similar to an existing entry.
Parameters:
  data - The data struct to copy values from. Created PersonDO object.
exception:
  com.lutris.appserver.server.sql.ObjectIdException - If an object's id can't be allocated for this object.
exception:
  DatabaseManagerException - If a connection to the database cannot be established, etc.



createCopy
public static PersonDO createCopy(PersonDataStruct data, DBTransaction dbTrans) throws DatabaseManagerException, ObjectIdException(Code)
Creates a DO that has no ObjectId but has a copy of an existing DO's data. Such a DO is used to insert a new database entry that is largely similar to an existing entry.
Parameters:
  data - The data struct to copy values from.
Parameters:
  dbTrans - The current database transaction Created PersonDO object.
exception:
  com.lutris.appserver.server.sql.ObjectIdException - If an object's id can't be allocated for this object.
exception:
  DatabaseManagerException - If a connection to the database cannot be established, etc.



createCopy
public static PersonDO createCopy(PersonDO orig) throws DatabaseManagerException, ObjectIdException(Code)
Creates a DO that has no ObjectId but has a copy of an existing DO's data. Such a DO is used to insert a new database entry that is largely similar to an existing entry.
Parameters:
  orig - The original DO to copy. Created PersonDO object.
exception:
  com.lutris.appserver.server.sql.ObjectIdException - If an object's id can't be allocated for this object.
exception:
  DatabaseManagerException - If a connection to the database cannot be established, etc.



createCopy
public static PersonDO createCopy(PersonDO orig, DBTransaction dbTrans) throws DatabaseManagerException, ObjectIdException(Code)

Parameters:
  orig - The original DO to copy.
Parameters:
  dbTrans - The current database transaction Created PersonDO object.
exception:
  com.lutris.appserver.server.sql.ObjectIdException - If an object's id can't be allocated for this object.
exception:
  DatabaseManagerException - If a connection to the database cannot be established, etc.



createDO
public static GenericDO createDO(ObjectId oid) throws java.sql.SQLException, com.lutris.appserver.server.sql.ObjectIdException, com.lutris.dods.builder.generator.query.DataObjectException, com.lutris.appserver.server.sql.DatabaseManagerException(Code)
Created DO with specified OID.
Parameters:
  obj - DO which will be copied. copy of DO (with the same id).



createDO
public static GenericDO createDO(ObjectId oid, DBTransaction dbTrans) throws java.sql.SQLException, com.lutris.appserver.server.sql.ObjectIdException, com.lutris.dods.builder.generator.query.DataObjectException, com.lutris.appserver.server.sql.DatabaseManagerException(Code)
Created DO with specified OID.
Parameters:
  obj - DO which will be copied.
Parameters:
  dbTrans - The current database transaction. copy of DO (with the same id).



createExisting
public static PersonDO createExisting(BigDecimal bd) throws SQLException, ObjectIdException, DataObjectException, DatabaseManagerException(Code)
createExisting( BigDecimal ) Factory method creates a PersonDO object by searching for it in the database using the passed BigDecimal value as the primary key. Creates a DO that represents an existing entry in the database. Such a DO is used to examine and possibly update such an entry. createExisting() is called only from the code that retrieves an ObjectId from a ResultSet (database query result). createExisting() is protected because no other DO or BO should ever need to call it. FIX unfortunately the createExisting(BigDecimal) form *does* need to be public because it is called by the public ctors of other DOs. For example: AaaDO contains a ref to a BbbDO, so there is a method AaaDO.setBbb(BbbDO). In the ctor AaaDO(ResultSet), we have the call setBbb( BbbDO.createExisting( rs.getBigDecimal( "bbb"))); Since AaaDO is not in the same package as BbbDO, BbbDO.createExisting(BigDecimal) must be public, not protected. Java needs the C++ 'friend' idea.
Parameters:
  bd - The BigDecimal representation of the ObjectId for the object. Created PersonDO object.
exception:
  DataObjectException - If the object is not found in the database.
exception:
  com.lutris.appserver.server.sql.ObjectIdException - If an object's id can't be allocated for this object.
exception:
  DatabaseManagerException - If a connection to the database cannot be established, etc.
exception:
  SQLException - If the database rejects the SQL generated to retrieve datafor this object, or if the table contains a bad foreign key, etc.



createExisting
public static PersonDO createExisting(BigDecimal bd, DBTransaction dbTrans) throws SQLException, ObjectIdException, DataObjectException, DatabaseManagerException(Code)
createExisting( BigDecimal, DBTransaction )
Parameters:
  bd - The BigDecimal representation of the ObjectId for the object.
Parameters:
  dbTrans - The current database transaction. Created PersonDO object.
exception:
  DataObjectException - If the object is not found in the database.
exception:
  com.lutris.appserver.server.sql.ObjectIdException - If an object's id can't be allocated for this object.
exception:
  DatabaseManagerException - If a connection to the database cannot be established, etc.
exception:
  SQLException - If the database rejects the SQL generated to retrieve datafor this object, or if the table contains a bad foreign key, etc.



createExisting
public static PersonDO createExisting(BigDecimal bd, HashMap queryRefs, DBTransaction dbTrans) throws SQLException, ObjectIdException, DataObjectException, DatabaseManagerException(Code)
createExisting( BigDecimal, HashMap, DBTransaction )
Parameters:
  bd - The BigDecimal representation of the ObjectId for the object.
Parameters:
  queryRefs - HashMap Created referenced DO's (key datamaseName.Oid)
Parameters:
  dbTrans - The current database transaction. Created PersonDO object.
exception:
  DataObjectException - If the object is not found in the database.
exception:
  com.lutris.appserver.server.sql.ObjectIdException - If an object's id can't be allocated for this object.
exception:
  DatabaseManagerException - If a connection to the database cannot be established, etc.
exception:
  SQLException - If the database rejects the SQL generated to retrieve datafor this object, or if the table contains a bad foreign key, etc.



createExisting
public static PersonDO createExisting(String handle)(Code)
createExisting( String ) The createExisting method is used to create a PersonDO from a string handle.
Parameters:
  handle - String representation of the ObjectId for the object. Created PersonDO object.



createExisting
public static PersonDO createExisting(String handle, DBTransaction dbTrans)(Code)
createExisting( String, DBTransaction ) The createExisting method is used to create a PersonDO from a string handle.
Parameters:
  handle - String representation of the ObjectId for the object.
Parameters:
  dbTrans - The current database transaction Created PersonDO object.



createExisting
protected static PersonDO createExisting(ObjectId id, DBTransaction dbTrans) throws SQLException, ObjectIdException, DataObjectException, DatabaseManagerException(Code)
createExisting( ObjectId , DBTransaction) Factory method creates a PersonDO object by searching for it in the database using the passed ObjectID value as the primary key.
Parameters:
  id - The ObjectId for the object.
Parameters:
  dbTrans - The current database transaction. Created PersonDO object.
exception:
  DataObjectException - If the object is not found in the database.
exception:
  com.lutris.appserver.server.sql.ObjectIdException - If an object's id can't be allocated for this object.
exception:
  DatabaseManagerException - If a connection to the database cannot be established, etc.
exception:
  SQLException - If the database rejects the SQL generated to retrieve datafor this object, or if the table contains a bad foreign key, etc.



createExisting
protected static PersonDO createExisting(ObjectId id, HashMap queryRefs, DBTransaction dbTrans) throws SQLException, ObjectIdException, DataObjectException, DatabaseManagerException(Code)
createExisting( ObjectId , HashMap queryRefs, DBTransaction) Factory method creates a PersonDO object by searching for it in the database using the passed ObjectID value as the primary key.
Parameters:
  id - The ObjectId for the object.
Parameters:
  queryRefs - HashMap of available references.
Parameters:
  dbTrans - The current database transaction. Created PersonDO object.
exception:
  DataObjectException - If the object is not found in the database.
exception:
  com.lutris.appserver.server.sql.ObjectIdException - If an object's id can't be allocated for this object.
exception:
  DatabaseManagerException - If a connection to the database cannot be established, etc.
exception:
  SQLException - If the database rejects the SQL generated to retrieve datafor this object, or if the table contains a bad foreign key, etc.



createExisting
protected static PersonDO createExisting(ObjectId id) throws SQLException, ObjectIdException, DataObjectException, DatabaseManagerException(Code)
createExisting( ObjectId ) Factory method creates a PersonDO object by searching for it in the database using the passed ObjectID value as the primary key.
Parameters:
  id - The ObjectId for the object. Created PersonDO object.
exception:
  DataObjectException - If the object is not found in the database.
exception:
  com.lutris.appserver.server.sql.ObjectIdException - If an object's id can't be allocated for this object.
exception:
  DatabaseManagerException - If a connection to the database cannot be established, etc.
exception:
  SQLException - If the database rejects the SQL generated to retrieve datafor this object, or if the table contains a bad foreign key, etc.



createExisting
protected static PersonDO createExisting(ResultSet rs) throws SQLException, ObjectIdException, DataObjectException, DatabaseManagerException(Code)
createExisting( ResultSet ) Factory method used to create an instance of this class to represent a Data Object already existing in the database.
Parameters:
  rs - The ResultSet returned by the Query class foran existing Data Object stored in the database. Created PersonDO object.
exception:
  DataObjectException - If the object is not found in the database.
exception:
  com.lutris.appserver.server.sql.ObjectIdException - If an object's id can't be allocated for this object.
exception:
  DatabaseManagerException - If a connection to the database cannot be established, etc.
exception:
  SQLException - If the database rejects the SQL generated to retrieve datafor this object, or if the table contains a bad foreign key, etc.



createExisting
protected static PersonDO createExisting(ResultSet rs, DBTransaction dbTrans) throws SQLException, ObjectIdException, DataObjectException, DatabaseManagerException(Code)
createExisting( ResultSet, DBTransaction )
Parameters:
  rs - The ResultSet returned by the Query class foran existing Data Object stored in the database.
Parameters:
  dbTrans - The current database transaction Created PersonDO object.
exception:
  DataObjectException - If the object is not found in the database.
exception:
  com.lutris.appserver.server.sql.ObjectIdException - If an object's id can't be allocated for this object.
exception:
  DatabaseManagerException - If a connection to the database cannot be established, etc.
exception:
  SQLException - If the database rejects the SQL generated to retrieve datafor this object, or if the table contains a bad foreign key, etc.



createExisting
protected static PersonDO createExisting(ResultSet rs, HashMap queryRefs) throws SQLException, ObjectIdException, DataObjectException, DatabaseManagerException(Code)
createExisting( ResultSet , HashMap) Factory method used to create an instance of this class to represent a Data Object already existing in the database.
Parameters:
  rs - The ResultSet returned by the Query class foran existing Data Object stored in the database.
Parameters:
  queryRefs - list of created refernce objects. Created PersonDO object.
exception:
  DataObjectException - If the object is not found in the database.
exception:
  com.lutris.appserver.server.sql.ObjectIdException - If an object's id can't be allocated for this object.
exception:
  DatabaseManagerException - If a connection to the database cannot be established, etc.
exception:
  SQLException - If the database rejects the SQL generated to retrieve datafor this object, or if the table contains a bad foreign key, etc.



createExisting
protected static PersonDO createExisting(ResultSet rs, HashMap queryRefs, DBTransaction dbTrans) throws SQLException, ObjectIdException, DataObjectException, DatabaseManagerException(Code)
createExisting( ResultSet , HashMap, DBTransaction)
Parameters:
  rs - The ResultSet returned by the Query class foran existing Data Object stored in the database.
Parameters:
  queryRefs - list of created refernce objects.
Parameters:
  dbTrans - The current database transaction Created PersonDO object.
exception:
  DataObjectException - If the object is not found in the database.
exception:
  com.lutris.appserver.server.sql.ObjectIdException - If an object's id can't be allocated for this object.
exception:
  DatabaseManagerException - If a connection to the database cannot be established, etc.
exception:
  SQLException - If the database rejects the SQL generated to retrieve datafor this object, or if the table contains a bad foreign key, etc.



createExisting
protected static PersonDO createExisting(RDBRow row) throws SQLException, ObjectIdException, DataObjectException, DatabaseManagerException(Code)
createExisting( RDBRow ) Factory method creates a PersonDO object by searching for it in the database using the PersonDO.PrimaryKey value in the passed RDBRow.
Parameters:
  RDBRow - A row returned by QueryBuilder.getNextRow(). Created PersonDO object.
exception:
  DataObjectException - If the RDBRow does not contain a PersonDO.PrimaryKey.If the object is not found in the database.
exception:
  com.lutris.appserver.server.sql.ObjectIdException - If an object's id can't be allocated for this object.
exception:
  DatabaseManagerException - If a connection to the database cannot be established, etc.
exception:
  SQLException - If the database rejects the SQL generated to retrieve datafor this object, or if the table contains a bad foreign key, etc.



createExisting
protected static PersonDO createExisting(RDBRow row, DBTransaction dbTrans) throws SQLException, ObjectIdException, DataObjectException, DatabaseManagerException(Code)
createExisting( RDBRow , DBTransaction) Factory method creates a PersonDO object by searching for it in the database using the PersonDO.PrimaryKey value in the passed RDBRow.
Parameters:
  RDBRow - A row returned by QueryBuilder.getNextRow().
Parameters:
  DBTransaction - The current database transaction Created PersonDO object.
exception:
  DataObjectException - If the RDBRow does not contain a PersonDO.PrimaryKey.If the object is not found in the database.
exception:
  com.lutris.appserver.server.sql.ObjectIdException - If an object's id can't be allocated for this object.
exception:
  DatabaseManagerException - If a connection to the database cannot be established, etc.
exception:
  SQLException - If the database rejects the SQL generated to retrieve datafor this object, or if the table contains a bad foreign key, etc.



createExisting
protected static PersonDO createExisting(RDBColumnValue pk) throws SQLException, ObjectIdException, DataObjectException, DatabaseManagerException(Code)
createExisting( RDBColumnValue ) Factory method creates a PersonDO object by searching for it in the database using the passed PersonDO.PrimaryKey.
Parameters:
  RDBColumnValue - a PrimaryKey column value from a rowthat was returned by QueryBuilder.getNextRow(). Created PersonDO object.
exception:
  DataObjectException - If the RDBColumnValue does not contain a PersonDO.PrimaryKey.If the object is not found in the database.
exception:
  com.lutris.appserver.server.sql.ObjectIdException - If an object's id can't be allocated for this object.
exception:
  DatabaseManagerException - If a connection to the database cannot be established, etc.
exception:
  SQLException - If the database rejects the SQL generated to retrieve datafor this object, or if the table contains a bad foreign key, etc.



createExisting
protected static PersonDO createExisting(RDBColumnValue pk, DBTransaction dbTrans) throws SQLException, ObjectIdException, DataObjectException, DatabaseManagerException(Code)
createExisting( RDBColumnValue, DBTransaction ) Factory method creates a PersonDO object by searching for it in the database using the passed PersonDO.PrimaryKey.
Parameters:
  RDBColumnValue - a PrimaryKey column value from a rowthat was returned by QueryBuilder.getNextRow(). Created PersonDO object.
exception:
  DataObjectException - If the RDBColumnValue does not contain a PersonDO.PrimaryKey.If the object is not found in the database.
exception:
  com.lutris.appserver.server.sql.ObjectIdException - If an object's id can't be allocated for this object.
exception:
  DatabaseManagerException - If a connection to the database cannot be established, etc.
exception:
  SQLException - If the database rejects the SQL generated to retrieve datafor this object, or if the table contains a bad foreign key, etc.



createQuery
public static DBQuery createQuery() throws DatabaseManagerException, SQLException(Code)
createQuery() creates a new DBQuery. This method uses the logical database name set by method setLogicalDBName(). If setLogicalDBName() was used to set the logical database name to something other than the value of DatabaseManager.DefaultDatabase in the application's .conf file, then any DBQuery object used to access the 'person' table should be created using PersonDO.createQuery(). The Query class corresponding to PersonDO uses this method. A DBQuery object to use in accessing the 'person' table.



createQuery
public static DBQuery createQuery(DBTransaction trans) throws DatabaseManagerException, SQLException(Code)
createQuery() creates a new DBQuery. This method uses the logical database name set by method setLogicalDBName(). If setLogicalDBName() was used to set the logical database name to something other than the value of DatabaseManager.DefaultDatabase in the application's .conf file, then any DBQuery object used to access the 'person' table should be created using PersonDO.createQuery(). The Query class corresponding to PersonDO uses this method. A DBQuery object to use in accessing the 'person' table.



createTransaction
public static DBTransaction createTransaction() throws DatabaseManagerException, SQLException(Code)
createTransaction() creates a new DBTransaction. This method uses the logical database name set by method setLogicalDBName(). If setLogicalDBName() was used to set the logical database name to something other than the value of DatabaseManager.DefaultDatabase in the application's .conf file, then any DBTransaction passed to save(DBTransaction) or delete(DBTransaction) should be created using PersonDO.createTransaction(). The PersonDO save() and delete() methods use this method. A DBTransaction object to use with the PersonDO class.



createVirgin
public static PersonDO createVirgin() throws DatabaseManagerException, ObjectIdException(Code)
createVirgin() Creates a DO that has no ObjectId or data. Such a DO is used to insert a new database entry after its data has been set. Created data object.
exception:
  com.lutris.appserver.server.sql.ObjectIdException - If an object's id can't be allocated for this object.
exception:
  DatabaseManagerException - If a connection to the database cannot be established, etc.



createVirgin
public static PersonDO createVirgin(DBTransaction dbTrans) throws DatabaseManagerException, ObjectIdException(Code)
createVirgin(DBTransaction)
Parameters:
  dbTrans - The current database transaction Created data object.
exception:
  com.lutris.appserver.server.sql.ObjectIdException - If an object's id can't be allocated for this object.
exception:
  DatabaseManagerException - If a connection to the database cannot be established, etc.



delete
public void delete() throws SQLException, DatabaseManagerException, DataObjectException, RefAssertionException, DBRowUpdateException, QueryException(Code)
Deletes the DO from its table.
exception:
  com.lutris.appserver.server.sql.DatabaseManagerException - If a Transaction can not be created.
exception:
  RefAssertionException - Thrown by okTo method.
exception:
  java.sql.SQLException - If any SQL errors occur.



delete
public void delete(DBTransaction dbt) throws SQLException, DatabaseManagerException, DataObjectException, RefAssertionException, DBRowUpdateException, QueryException(Code)
Deletes the DO from its table. The transaction is likely provided by the delete() method of another DO which references this DO.
Parameters:
  dbt - The transaction object used for this operation.
exception:
  com.lutris.appserver.server.sql.DatabaseManagerException - If a Transaction can not be created.
exception:
  com.lutris.appserver.server.sql.DBRowUpdateException - If a version error occurs.
exception:
  RefAssertionException - Thrown by okTo method.
exception:
  java.sql.SQLException - If any SQL errors occur.



deleteFromCache
public static synchronized PersonDataStruct deleteFromCache(PersonDataStruct data)(Code)
Delete DataStruct object from cache
Parameters:
  data - DataStruct object for deleting Deleted DataStruct object



deleteFromCache
public void deleteFromCache()(Code)
Delete object from cache



disableCaching
public static void disableCaching() throws java.sql.SQLException, DatabaseManagerException, ObjectIdException, DataObjectException(Code)
Disable caching



doCheck
public void doCheck(boolean value)(Code)
Specifies whether to lock this DO (row) in database just before commit. Locking is attempted via "dummy" update: "update set version=OLD_ONE where OID=X and version=OLD_ONE".
Parameters:
  value - true for locking, false otherwise



doLock
public void doLock() throws SQLException(Code)
Locks this DO in database by performing "update set version=OLD_ONE where OID=X and version=OLD_ONE".



doTouch
public void doTouch() throws SQLException, DatabaseManagerException, com.lutris.appserver.server.sql.ObjectIdException, DataObjectException(Code)
Locks this DO in database by performing "update set version=OLD_ONE where OID=X and version=INCREMENTED".



enableCaching
public static void enableCaching() throws java.sql.SQLException, DatabaseManagerException, ObjectIdException, DataObjectException(Code)
Enable caching



evict
public void evict()(Code)
Remove DataStruct from cache.



evict
public static void evict(PersonDataStruct[] DSs)(Code)
Remove DataStruct objects from cache.
Parameters:
  DSs - Array of DataStruct objects which will be removed from cache.



evict
public static void evict(String dbName, String[] handles)(Code)
Remove DataStruct objects from cache.
Parameters:
  dbName - Logical name of the database from whichPersonDataStruct object will be removed.
Parameters:
  handles - array of DataStruct object handles that will be removedfrom cache.



executeInsert
public synchronized void executeInsert(DBConnection conn) throws SQLException, DBRowUpdateException(Code)
Inserts this object into the database.
Parameters:
  conn - the database connection.
exception:
  java.sql.SQLException - if a database access error occurs.
exception:
  DBRowUpdateException - If a version error occurs.



executeLockingStatement
public void executeLockingStatement(DBConnection conn) throws SQLException(Code)
Prepares and executes the statement used to lock this object in the database.
Parameters:
  conn - The database connection
exception:
  java.sql.SQLException - if an error occurs.



finalizeDelete
public void finalizeDelete(boolean success)(Code)
Currently does nothing.
Parameters:
  success - true if the transaction succeededand this object was successfully deleted from thedatabase.



finalizeInsert
public void finalizeInsert(boolean success)(Code)
If transaction succeeded marks this object as clean.
Parameters:
  success - true if the transaction succeededand this object was successfully inserted into the database.



finalizeUpdate
public void finalizeUpdate(boolean success)(Code)
If transaction succeeded marks this object as clean.
Parameters:
  success - true if the transaction succeededand this object was successfully updated in the database.



findCachedObjectByHandle
public static PersonDataStruct findCachedObjectByHandle(String cacheHandle)(Code)
Get DataStruct object with key cacheHandle from the cache.
Parameters:
  cacheHandle - String version of concatenation of:name of the data object's database, followed by '.', followed bydata object's id. PersonDataStructObject if one is found in cache, otherwise null.
See Also:   get_Handle



findTransactionCachedObjectByHandle
public PersonDO findTransactionCachedObjectByHandle(String cacheHandle)(Code)
Get data object with key cacheHandle from the cache.
Parameters:
  cacheHandle - String version of concatenation of:name of the data object's database, followed by '.', followed bydata object's id. PersonDOObject if one is found in cache, otherwise null.
See Also:   get_Handle



getCacheDodsTableName
public static String getCacheDodsTableName()(Code)
Get name of the table that is cached. Name of the table that is cached.



getConfigurationAdministration
public static ConfigurationAdministration getConfigurationAdministration()(Code)
Returns person table cache. person table cache.



getData
public Object getData()(Code)
Returns DO's data.



getDataStruct
public PersonDataStruct getDataStruct()(Code)
Returns dataStruct.



getDeleteStatement
public PreparedStatement getDeleteStatement(DBConnection conn) throws SQLException(Code)
Prepares the statement used to delete this object from the database.
Parameters:
  conn - The database connection The delete statement.
exception:
  java.sql.SQLException - if an error occurs.



getFirstName
public String getFirstName() throws DataObjectException(Code)
Get firstName of the person. firstName of the person.
exception:
  DataObjectException - If the object is not found in the database.



getHandle
public String getHandle() throws DatabaseManagerException(Code)
The methods getHandle hasMatchingHandle findCachedObjectByHandle are used by Presentation Objects that need to populate HTML select lists with Data Objects as options. The getHandle() method is used to set the value for each option, and the hasMatchingHandle() methods are used to lookup the Data Object when the selection has been made.
exception:
  DatabaseManagerException - If a connection to the database cannot be established, etc. id of this DO as a stringIf an object's id can't be allocated for this object.



getInsertStatement
public PreparedStatement getInsertStatement(DBConnection conn) throws SQLException(Code)
Prepares the statement used to insert this object into the database.
Parameters:
  conn - The database connection. The insert statement.
exception:
  java.sql.SQLException - if an error occurs.



getLastName
public String getLastName() throws DataObjectException(Code)
Get lastName of the person. lastName of the person.
exception:
  DataObjectException - If the object is not found in the database.



getNewVersion
public int getNewVersion()(Code)
getNewVersion overloaded Data object's version.



getOId
public ObjectId getOId()(Code)
this object's identifier.



getOriginDatabase
public String getOriginDatabase()(Code)
Return the name of the logical database for which DO object was created. origin logical database name.



getPhoneNumber
public String getPhoneNumber() throws DataObjectException(Code)
Get phoneNumber of the person. phoneNumber of the person.
exception:
  DataObjectException - If the object is not found in the database.



getTableName
public String getTableName()(Code)
Return person as the name of the table in the database which contains PersonDO objects. This method overrides CoreDO.getTableName() and is used by CoreDO.executeUpdate() during error handling. The database table name.
See Also:   CoreDO
author:
   Jay Gunter



getUpdateStatement
public PreparedStatement getUpdateStatement(DBConnection conn) throws SQLException(Code)
Prepares the statement used to update this object in the database.
Parameters:
  conn - The database connection The update statement.
exception:
  java.sql.SQLException - if an error occurs.



getUsedLogicalDatabases
public static String[] getUsedLogicalDatabases()(Code)
Get all used logical databases. Array that contains names of all used logical databases.



getVersion
public int getVersion()(Code)
Data object's version.



get_CacheHandle
public String get_CacheHandle() throws DatabaseManagerException(Code)
Returns cache handle. cache handle.
exception:
  DatabaseManagerException - If a connection to the database cannot be established, etc.



get_Data
public Object get_Data()(Code)
Returns DO's data.



get_DataStruct
public PersonDataStruct get_DataStruct()(Code)
Returns dataStruct.



get_Handle
public String get_Handle() throws DatabaseManagerException(Code)
The methods get_Handle hasMatchingHandle findCachedObjectByHandle are used by Presentation Objects that need to populate HTML select lists with Data Objects as options. The get_Handle() method is used to set the value for each option, and the hasMatchingHandle() methods are used to lookup the Data Object when the selection has been made.
exception:
  DatabaseManagerException - If a connection to the database cannot be established, etc. id of this DO as a stringIf an object's id can't be allocated for this object.



get_NewVersion
public int get_NewVersion()(Code)
get_NewVersion overloaded Data object's version.



get_OId
public ObjectId get_OId()(Code)
Returns this object's identifier. this object's identifier.



get_OriginDatabase
public String get_OriginDatabase()(Code)
Return the name of the logical database for which DO object was created. origin logical database name.



get_UsedLogicalDatabases
public static String[] get_UsedLogicalDatabases()(Code)
Get all used logical databases. Array that contains names of all used logical databases.



get_Version
public int get_Version()(Code)
get_Version makes the protected method public in CoreDO. Data object's version.



get_logicalDBName
public static synchronized String get_logicalDBName()(Code)
get_logicalDBName retrieves the logical database name set by setLogicalDBName(). the logical database name that was set by method setLogicalDBName()



get_statistics
public static Statistics get_statistics()(Code)
Get table statistics. Table statistics.



get_transaction
public DBTransaction get_transaction()(Code)
Return transaction which DO belongs. DBTransaction or null if not specified.



hasMatchingHandle
public boolean hasMatchingHandle(String handle)(Code)
Compare string version of the id of this DO and handle.
Parameters:
  handle - String version of DO id. booleanTrue if the string version of the id of this DO matches passed handle.
See Also:   get_Handle



isAllReadOnly
protected static boolean isAllReadOnly()(Code)



isAutoSave
protected boolean isAutoSave()(Code)



isAutoSaveCreateVirgin
protected boolean isAutoSaveCreateVirgin()(Code)



isDeleteCheckVersion
protected boolean isDeleteCheckVersion()(Code)



isDeleted
public boolean isDeleted()(Code)
true if DO has been deleted, but not commited yet



isLoaded
public boolean isLoaded()(Code)
isLoaded() Returns information whether object's data is loaded from database. true if the data for this object has been retrievedfrom the database.



isReadOnly
public boolean isReadOnly()(Code)
Return information whether the data for this object has been marked read-only. True if the data for this object has been marked read-only.



isTransactionCaches
protected boolean isTransactionCaches()(Code)



isTransactionCheck
protected boolean isTransactionCheck()(Code)



isVirgin
public boolean isVirgin()(Code)
true for DO that's created virgin and hasn't been commited yet.



loadData
public void loadData() throws SQLException, ObjectIdException, DataObjectException(Code)
Load the fields for the DO from the database.
exception:
  com.lutris.appserver.server.sql.ObjectIdException - If an object's id can't be allocated for this object.
exception:
  DataObjectException - If the object is not found in the database.
exception:
  SQLException - If the database rejects the SQL generated to retrieve datafor this object, or if the table contains a bad foreign key, etc.



makeIdentical
protected void makeIdentical(PersonDO orig)(Code)
Assigns the DataStruct of an existing DO to this DO. Does not duplicate data. Just assigns the reference.
Parameters:
  orig - The original DO.



makeInvisible
public void makeInvisible()(Code)
Make DO's data from cache Invisible



makeReadOnly
public void makeReadOnly()(Code)
Mark the object as read-only. WebDocWf extension



makeReadWrite
public void makeReadWrite()(Code)
Mark the object as read-write. WebDocWf extension



makeVisible
public void makeVisible()(Code)
Make DO's data from cache visible



modifyDO
protected void modifyDO(DBTransaction dbt, boolean delete) throws SQLException, DatabaseManagerException, DataObjectException, RefAssertionException, DBRowUpdateException, QueryException(Code)
Modifies the DO within its table. Performs recursive commit/delete on referenced DOs; all operations occur within a single transaction to allow rollback in the event of error. Only the creator of the transaction releases it.
Parameters:
  dbt - The transaction object used for this operation.
Parameters:
  delete - True if doing a delete, otherwise false (for insert/update).
exception:
  com.lutris.appserver.server.sql.DatabaseManagerException - If a Transaction can not be created.
exception:
  com.lutris.appserver.server.sql.DBRowUpdateException - If a version error occurs.
exception:
  RefAssertionException - Thrown by okTo method.
exception:
  java.sql.SQLException - If any SQL errors occur.WebDocWf extension



modifyDO
protected void modifyDO(DBTransaction dbt, boolean delete, boolean references) throws SQLException, DatabaseManagerException, DataObjectException, RefAssertionException, DBRowUpdateException, QueryException(Code)
Modifies the DO within its table. Performs recursive commit/delete on referenced DOs; all operations occur within a single transaction to allow rollback in the event of error. Only the creator of the transaction releases it.
Parameters:
  dbt - The transaction object used for this operation.
Parameters:
  delete - True if doing a delete, otherwise false (for insert/update).
Parameters:
  references - True if references should be saved
exception:
  com.lutris.appserver.server.sql.DatabaseManagerException - If a Transaction can not be created.
exception:
  com.lutris.appserver.server.sql.DBRowUpdateException - If a version error occurs.
exception:
  RefAssertionException - Thrown by okTo method.
exception:
  java.sql.SQLException - If any SQL errors occur.WebDocWf extension



okToCommit
protected void okToCommit() throws RefAssertionException(Code)
A stub method for implementing pre-commit assertions for this PersonDO. Implement this stub to throw an RefAssertionException for cases where this object is not valid for writing to the database.



okToDelete
protected void okToDelete() throws RefAssertionException(Code)
A stub method for implementing pre-delete assertions for this PersonDO. Implement this stub to throw an RefAssertionException for cases where this object is not valid for deletion from the database.



originalData_get
public Object originalData_get()(Code)
Returns original DO's data.



originalData_getFirstName
public String originalData_getFirstName() throws DataObjectException(Code)
Get original firstName of the person. firstName of the person.
exception:
  DataObjectException - If the object is not found in the database.



originalData_getLastName
public String originalData_getLastName() throws DataObjectException(Code)
Get original lastName of the person. lastName of the person.
exception:
  DataObjectException - If the object is not found in the database.



originalData_getPhoneNumber
public String originalData_getPhoneNumber() throws DataObjectException(Code)
Get original phoneNumber of the person. phoneNumber of the person.
exception:
  DataObjectException - If the object is not found in the database.



originalData_set
public void originalData_set(Object data)(Code)
Sets original DO's data.



readCacheConfiguration
public static void readCacheConfiguration(String database) throws CacheObjectException(Code)
Read cache configuration from application configuration file: cache size for phoneList.data.person table or default cache size.



refresh
public void refresh() throws DataObjectException(Code)
This method is invoked whenever object needs to be loaded from database.
exception:
  DataObjectException - If a data access error occurs.



refresh
public static void refresh(PersonDO[] DOs) throws DataObjectException(Code)
This method is invoked whenever objects needs to be loaded from database.
Parameters:
  DOs - Array of DOs which will be red from database.
exception:
  DataObjectException - If a data access error occurs.



refresh
public static void refresh(String querySnt) throws QueryException(Code)
Refresh
exception:
  QueryException - If a data access error occurs.



refreshCache
public static void refreshCache() throws java.sql.SQLException, DatabaseManagerException, ObjectIdException, DataObjectException(Code)
Queries all rows in table, and for each row creates a DO instance in the cache. For these DOs, data.readOnly = true, which causes set methods to throw an exception.
exception:
  DataObjectException - If the object is not found in the database.
exception:
  com.lutris.appserver.server.sql.ObjectIdException - If an object's id can't be allocated for this object.
exception:
  DatabaseManagerException - If a connection to the database cannot be established, etc.
exception:
  SQLException - If the database rejects the SQL generated to retrieve datafor this object, or if the table contains a bad foreign key, etc.



refreshStatistics
public static void refreshStatistics()(Code)
Refresh table statistics.



reload
public void reload()(Code)
Causes the DO to refresh itself from the database the next time a set or get method is called.



removeFromCache
public static synchronized void removeFromCache(String dbName, String handle)(Code)
Remove DataStruct object from cache.
Parameters:
  dbName - Logical name of the database from whichPersonDataStruct object will be removed.
Parameters:
  handle - Handle of DataStruct object which will be re moved.



removeFromCache
public static synchronized PersonDataStruct removeFromCache(PersonDataStruct data)(Code)
Remove DataStruct from cache.
Parameters:
  data - DataStruct object which will be removed. Removed DataStruct object or null if DataStruct object doesn'texist in the cache.



save
public void save() throws SQLException, DatabaseManagerException, DataObjectException, RefAssertionException, DBRowUpdateException, QueryException(Code)
Inserts/Updates the DO into its table.
exception:
  com.lutris.appserver.server.sql.DatabaseManagerException - If a Transaction can not be created.
exception:
  RefAssertionException - Thrown by okTo method.
exception:
  java.sql.SQLException - If any SQL errors occur.WebDocWf extension



save
public void save(boolean references) throws SQLException, DatabaseManagerException, DataObjectException, RefAssertionException, DBRowUpdateException, QueryException(Code)
Inserts/Updates the DO into its table.
Parameters:
  references - True if references should be saved with this DO.
exception:
  com.lutris.appserver.server.sql.DatabaseManagerException - If a Transaction can not be created.
exception:
  RefAssertionException - Thrown by okTo method.
exception:
  java.sql.SQLException - If any SQL errors occur.WebDocWf extension



save
public void save(DBTransaction dbt) throws SQLException, DatabaseManagerException, DataObjectException, RefAssertionException, DBRowUpdateException, QueryException(Code)
Inserts/Updates the DO into its table. The transaction is likely provided by the commit() method of another DO which references this DO.
Parameters:
  dbt - The transaction object used for this operation.
exception:
  com.lutris.appserver.server.sql.DatabaseManagerException - If a Transaction can not be created.
exception:
  com.lutris.appserver.server.sql.DBRowUpdateException - If a version error occurs.
exception:
  RefAssertionException - Thrown by okTo method.
exception:
  java.sql.SQLException - If any SQL errors occur.WebDocWf extension



save
public void save(DBTransaction dbt, boolean references) throws SQLException, DatabaseManagerException, DataObjectException, RefAssertionException, DBRowUpdateException, QueryException(Code)
Inserts/Updates the DO into its table. The transaction is likely provided by the commit() method of another DO which references this DO.
Parameters:
  dbt - The transaction object used for this operation.
Parameters:
  references - True if references of this DO should be saved.
exception:
  com.lutris.appserver.server.sql.DatabaseManagerException - If a Transaction can not be created.
exception:
  com.lutris.appserver.server.sql.DBRowUpdateException - If a version error occurs.
exception:
  RefAssertionException - Thrown by okTo method.
exception:
  java.sql.SQLException - If any SQL errors occur.WebDocWf extension



setData
public void setData(Object data)(Code)
Sets DO's data.



setDeleted
public void setDeleted(boolean flag)(Code)

Parameters:
  flag - true if DO has been deleted, but not commited yet



setFirstName
public void setFirstName(String firstName) throws DataObjectException(Code)
Set firstName of the person.
Parameters:
  firstName - of the person.
exception:
  DataObjectException - If the object is not found in the database.



setLastName
public void setLastName(String lastName) throws DataObjectException(Code)
Set lastName of the person.
Parameters:
  lastName - of the person.
exception:
  DataObjectException - If the object is not found in the database.



setLogicalDBName
public static synchronized void setLogicalDBName(String logicalDbNameInConfFile)(Code)
setLogicalDBName sets the logical database name that will be used to create DBTransaction and DBQuery objects used by PersonDO and the corresponding Query class.
Parameters:
  logicalDbNameInConfFile - The logical database specified in theapplication's .conf file.



setNewVersion
public void setNewVersion(int _ver)(Code)
setNewVersion overloaded



setOId
protected void setOId(ObjectId _oId)(Code)

Parameters:
  oId - this object's identifier.



setPhoneNumber
public void setPhoneNumber(String phoneNumber) throws DataObjectException(Code)
Set phoneNumber of the person.
Parameters:
  phoneNumber - of the person.
exception:
  DataObjectException - If the object is not found in the database.



setTransaction
protected boolean setTransaction(DBTransaction trans)(Code)
Set Transaction to current DO. DBTransaction.



setVersion
public void setVersion(int _ver)(Code)
setVersion overloaded



set_Data
public void set_Data(Object data)(Code)
Sets DO's data.



set_OId
protected void set_OId(ObjectId _oId)(Code)
Sets this object's identifier.
Parameters:
  oId - this object's identifier.



set_Version
public void set_Version(int _ver)(Code)
set_Version overloaded



toString
public String toString()(Code)



toString
public String toString(int indentCount)(Code)



unDelete
public void unDelete() throws SQLException, DatabaseManagerException, DataObjectException, RefAssertionException, DBRowUpdateException, QueryException(Code)
UnDeletes the DO and inserts to the table.
exception:
  com.lutris.appserver.server.sql.DatabaseManagerException - If a Transaction can not be created.
exception:
  RefAssertionException - Thrown by okTo method.
exception:
  java.sql.SQLException - If any SQL errors occur.



unDelete
public void unDelete(DBTransaction dbt) throws SQLException, DatabaseManagerException, DataObjectException, RefAssertionException, DBRowUpdateException, QueryException(Code)
UnDeletes the DO and inserts to the table.
Parameters:
  dbt - The transaction object used for this operation.
exception:
  com.lutris.appserver.server.sql.DatabaseManagerException - If a Transaction can not be created.
exception:
  com.lutris.appserver.server.sql.DBRowUpdateException - If a version error occurs.
exception:
  RefAssertionException - Thrown by okTo method.
exception:
  java.sql.SQLException - If any SQL errors occur.



undo
public void undo() throws com.lutris.dods.builder.generator.query.DataObjectException(Code)



updateCache
public static synchronized PersonDataStruct updateCache(PersonDataStruct updDS)(Code)
UpdateCache for given DataStruct object
Parameters:
  data - DataStruct object



updateCache
public void updateCache()(Code)
Update Cache



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.