コード例 #1
0
 /** load */
 public void load(EntityBean eb, Object pKey, boolean forUpdate) throws Exception {
   Object objectTemp = null;
   ArdaisstaffBean b = (ArdaisstaffBean) eb;
   com.ardais.bigr.iltds.beans.ArdaisstaffKey _primaryKey =
       (com.ardais.bigr.iltds.beans.ArdaisstaffKey) pKey;
   PreparedStatement pstmt;
   ResultSet resultSet = null;
   pstmt =
       (forUpdate)
           ? getPreparedStatement(_loadForUpdateString)
           : getPreparedStatement(_loadString);
   try {
     if (_primaryKey.ardais_staff_id == null) {
       pstmt.setNull(1, java.sql.Types.VARCHAR);
     } else {
       pstmt.setString(1, _primaryKey.ardais_staff_id);
     }
     resultSet = pstmt.executeQuery();
     if (!(resultSet.next())) throw new javax.ejb.ObjectNotFoundException();
     hydrate(eb, resultSet, pKey);
   } finally {
     if (resultSet != null) resultSet.close();
     returnPreparedStatement(pstmt);
   }
 }
コード例 #2
0
 /** findAllStaffMembers */
 public EJSFinder findAllStaffMembers()
     throws javax.ejb.FinderException, java.rmi.RemoteException {
   ResultSet resultSet = null;
   PreparedStatement pstmt = null;
   try {
     preFind();
     pstmt =
         getPreparedStatement(
             " SELECT T1.ARDAIS_STAFF_ID, T1.ARDAIS_STAFF_LNAME, T1.ARDAIS_STAFF_FNAME, T1.ARDAIS_ACCT_KEY, T1.ARDAIS_USER_ID, T1.LOCATION_ADDRESS_ID FROM ILTDS_ARDAIS_STAFF  T1 WHERE 1=1");
     resultSet = pstmt.executeQuery();
     return new EJSJDBCFinder(resultSet, this, pstmt);
   } catch (Exception ex) {
     throw new EJSPersistenceException("find failed:", ex);
   }
 }
コード例 #3
0
 /** remove */
 public void remove(EntityBean eb) throws Exception {
   Object objectTemp = null;
   ArdaisstaffBean b = (ArdaisstaffBean) eb;
   com.ardais.bigr.iltds.beans.ArdaisstaffKey _primaryKey =
       new com.ardais.bigr.iltds.beans.ArdaisstaffKey();
   _primaryKey.ardais_staff_id = b.ardais_staff_id;
   PreparedStatement pstmt;
   pstmt = getPreparedStatement(_removeString);
   try {
     if (_primaryKey.ardais_staff_id == null) {
       pstmt.setNull(1, java.sql.Types.VARCHAR);
     } else {
       pstmt.setString(1, _primaryKey.ardais_staff_id);
     }
     pstmt.executeUpdate();
   } finally {
     returnPreparedStatement(pstmt);
   }
 }
コード例 #4
0
 /** findLocByUserProf */
 public EJSFinder findLocByUserProf(
     java.lang.String ardais_user_id, java.lang.String ardais_acct_key)
     throws javax.ejb.FinderException, java.rmi.RemoteException {
   ResultSet resultSet = null;
   PreparedStatement pstmt = null;
   try {
     preFind();
     pstmt =
         getPreparedStatement(
             " SELECT T1.ARDAIS_STAFF_ID, T1.ARDAIS_STAFF_LNAME, T1.ARDAIS_STAFF_FNAME, T1.ARDAIS_ACCT_KEY, T1.ARDAIS_USER_ID, T1.LOCATION_ADDRESS_ID FROM ILTDS_ARDAIS_STAFF  T1 WHERE ardais_user_id = ? and ardais_acct_key = ?");
     if (ardais_user_id == null) {
       pstmt.setNull(1, java.sql.Types.VARCHAR);
     } else {
       pstmt.setString(1, ardais_user_id);
     }
     if (ardais_acct_key == null) {
       pstmt.setNull(2, java.sql.Types.VARCHAR);
     } else {
       pstmt.setString(2, ardais_acct_key);
     }
     resultSet = pstmt.executeQuery();
     return new EJSJDBCFinder(resultSet, this, pstmt);
   } catch (Exception ex) {
     throw new EJSPersistenceException("find failed:", ex);
   }
 }
コード例 #5
0
 /** findArdaisstaffByGeolocation */
 public EJSFinder findArdaisstaffByGeolocation(com.ardais.bigr.iltds.beans.GeolocationKey inKey)
     throws javax.ejb.FinderException, java.rmi.RemoteException {
   ResultSet resultSet = null;
   PreparedStatement pstmt = null;
   try {
     preFind();
     pstmt =
         getPreparedStatement(
             " SELECT T1.ARDAIS_STAFF_ID, T1.ARDAIS_STAFF_LNAME, T1.ARDAIS_STAFF_FNAME, T1.ARDAIS_ACCT_KEY, T1.ARDAIS_USER_ID, T1.LOCATION_ADDRESS_ID FROM ILTDS_ARDAIS_STAFF  T1 WHERE T1.LOCATION_ADDRESS_ID = ?");
     Object objectTemp = null;
     boolean nullData;
     if (inKey.location_address_id == null) {
       pstmt.setNull(1, java.sql.Types.VARCHAR);
     } else {
       pstmt.setString(1, inKey.location_address_id);
     }
     resultSet = pstmt.executeQuery();
     return new EJSJDBCFinder(resultSet, this, pstmt);
   } catch (Exception ex) {
     throw new EJSPersistenceException("find failed:", ex);
   }
 }
コード例 #6
0
 /** _create */
 public void _create(EntityBean eb) throws Exception {
   Object objectTemp = null;
   ArdaisstaffBean b = (ArdaisstaffBean) eb;
   PreparedStatement pstmt;
   pstmt = getPreparedStatement(_createString);
   try {
     if (b.ardais_staff_id == null) {
       pstmt.setNull(1, java.sql.Types.VARCHAR);
     } else {
       pstmt.setString(1, b.ardais_staff_id);
     }
     if (b.ardais_staff_lname == null) {
       pstmt.setNull(2, java.sql.Types.VARCHAR);
     } else {
       pstmt.setString(2, b.ardais_staff_lname);
     }
     if (b.ardais_staff_fname == null) {
       pstmt.setNull(3, java.sql.Types.VARCHAR);
     } else {
       pstmt.setString(3, b.ardais_staff_fname);
     }
     if (b.ardais_acct_key == null) {
       pstmt.setNull(4, java.sql.Types.VARCHAR);
     } else {
       pstmt.setString(4, b.ardais_acct_key);
     }
     if (b.ardais_user_id == null) {
       pstmt.setNull(5, java.sql.Types.VARCHAR);
     } else {
       pstmt.setString(5, b.ardais_user_id);
     }
     if (b.geolocation_location_address_id == null) {
       pstmt.setNull(6, java.sql.Types.VARCHAR);
     } else {
       pstmt.setString(6, b.geolocation_location_address_id);
     }
     pstmt.executeUpdate();
   } finally {
     returnPreparedStatement(pstmt);
   }
 }