sql >> Database teknologi >  >> RDS >> Oracle

oracle 11g og integration af hibernate spring og jsf

jeg importerer org.springframework.transaction.annotation.Transactional i min CustomerBoImpl.java

import java.util.List;
import bo.ICustomerBo;
import dao.ICustomerDao;
import model.Customer;
import org.springframework.transaction.annotation.Transactional;

@Transactional(readOnly = true)
public class CustomerBoImpl implements ICustomerBo{

    ICustomerDao customerDaoImpl;



    public ICustomerDao getCustomerDaoImpl() {
        return customerDaoImpl;
    }

    public void setCustomerDaoImpl(ICustomerDao customerDaoImpl) {
        this.customerDaoImpl = customerDaoImpl;
    }

@Transactional(readOnly = false)
@Override
    public void addCustomer(Customer customer){

        getCustomerDaoImpl().addCustomer(customer);

    }

@Transactional(readOnly = false)
@Override
    public void updateCustomer(Customer customer){
        getCustomerDaoImpl().updateCustomer(customer);
    }

@Transactional(readOnly = false)
@Override
    public void deleteCustomer(Customer customer){
        getCustomerDaoImpl().deleteCustomer(customer);
    }

@Override
    public List<Customer> findAllCustomer(){

        return getCustomerDaoImpl().findAllCustomer();
    }
}



  1. Sådan får du aktuelle ugedata i MySQL

  2. PostgreSQL - indstil en standardcelleværdi i henhold til en anden celleværdi

  3. MySQL - tæl det samlede antal rækker i php

  4. 11 SQL Server-indeks for bedste praksis for forbedret justering af ydeevne