Package com.darkhonor.rage.libs.dataaccess

Examples of com.darkhonor.rage.libs.dataaccess.GradedEventDAO.closeConnection()


                    LOGGER.warn("(btnRemoveQuestionActionPerformed) Error removing "
                        + "Question (" + question.getName() + ") from all Graded"
                        + " Events");
                } finally
                {
                    gradedEventDAO.closeConnection();
                }
           
                try
                {
                    tx.begin();
View Full Code Here


            } catch (Exception ex)
            {
                LOGGER.error("Exception Caught: " + ex.getLocalizedMessage());
            } finally
            {
                gradedEventDAO.closeConnection();
            }
            //if (em.isOpen())
            //    em.close();
            btnAddGradedEvent.setEnabled(true);
            btnRemoveGradedEvent.setEnabled(true);
View Full Code Here

                modGradedEventQuestions.add(gevent.getQuestions().get(i));
            }
        }
        //em.close();
        courseDAO.closeConnection();
        gradedEventDAO.closeConnection();
    }//GEN-LAST:event_lstGradedEventsMouseClicked

    private void btnRemoveEventQuestionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRemoveEventQuestionActionPerformed

        if ((lstGradedEventQuestions.getSelectedIndex() >= 0)
View Full Code Here

                //gevent = em.merge(gevent);
                gevent = gradedEventDAO.update(gevent);
                //tx.commit();
                modGradedEvents.update(gevent);
            }
            gradedEventDAO.closeConnection();
            //em.close();
        } else
        {
            LOGGER.debug("No question or event selected.  Selected Indices:");
            LOGGER.debug(" - lstGradedEvents: " + lstGradedEvents.getSelectedIndex());
View Full Code Here

                }
                LOGGER.debug("Added " + actual + " Questions to List Model");
                // Update the Graded Event List Model
                modGradedEvents.update(gradedEvent);
                //em.close();
                gradedEventDAO.closeConnection();
            } else
            {
                LOGGER.debug("Questions not added");
            }
        } else
View Full Code Here

                {
                    modGradedEvents.add(gradedEvents.get(i));
                    count++;
                }
                LOGGER.debug("Added " + count + " Graded Events to the model");
                gradedEventDAO.closeConnection();
                LOGGER.info("Graded Event added");
            } else
            {
                LOGGER.info("Graded Event not added");
            }
View Full Code Here

            //gradedEvent = em.merge(gradedEvent);
            gradedEventDAO.delete(gradedEvent.getId());
            //em.remove(gradedEvent);
            //tx.commit();
            //em.close();
            gradedEventDAO.closeConnection();
        }
    }//GEN-LAST:event_btnRemoveGradedEventActionPerformed

    private void databaseActionHelper(boolean status)
    {
View Full Code Here

                        + ex.getLocalizedMessage());
                okButton.setEnabled(false);
            } finally
            {
                em.close();
                gradedEventDAO.closeConnection();
            }
        }
    }

    /** This method is called from within the constructor to
View Full Code Here

                LOGGER.error("Error saving Graded Event to database.  Exception: "
                        + ex.getLocalizedMessage());
//                tx.rollback();
            } finally
            {
                gradedEventDAO.closeConnection();
            }
            em.close();
        }

        doClose(RET_OK);
View Full Code Here

                doClose(RET_OK);
            }

            em.close();
            courseDAO.closeConnection();
            gradedEventDAO.closeConnection();
        }
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnCancel;
    private javax.swing.JButton btnSave;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.