Esempio n. 1
0
 /**
  * createExisting( ResultSet )
  *
  * <p>Factory method used to create an instance of this class to represent a Data Object already
  * existing in the database.
  *
  * @param rs The ResultSet returned by the Query class for an existing Data Object stored in the
  *     database.
  * @exception DataObjectException If the object is not found in the database.
  * @exception com.lutris.appserver.server.sql.ObjectIdException If an object 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 data for this
  *     object, or if the table contains a bad foreign key, etc.
  */
 protected static PersonalProfileDO createExisting(ResultSet rs)
     throws SQLException, ObjectIdException, DataObjectException, DatabaseManagerException {
   if (null == rs) return null;
   PersonalProfileDO ret = null;
   if (isView) {
     ret = new PersonalProfileDO();
     ret.initFromResultSet(rs);
   } else {
     ret = new PersonalProfileDO(rs);
   }
   return ret;
 }
Esempio n. 2
0
 /**
  * Protected constructor.
  *
  * @param 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 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 data for this
  *     object, or if the table contains a bad foreign key, etc.
  */
 protected PersonalProfileDO(ResultSet rs)
     throws SQLException, ObjectIdException, DataObjectException, DatabaseManagerException {
   super(rs);
   initFromResultSet(rs);
 }