DAL.DACursist.java Source code

Java tutorial

Introduction

Here is the source code for DAL.DACursist.java

Source

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package DAL;

import BO.*;
import java.util.ArrayList;
import org.hibernate.Session;

/**
 *
 * @author 11627
 */
public class DACursist {
    public static void AddCursist(Cursist cursist) {
        Session session = HibernateUtil.getSessionFactory().openSession();

        session.beginTransaction();
        session.persist(cursist);
        session.getTransaction().commit();
    }

public static ArrayList<Cursist> SelectAll()
{
        
    ArrayList<Cursist> cursisten = new ArrayList<>();
        
    Session.beginTransaction;
        
    return cursisten;
}
}