Ignore:
Timestamp:
11/15/12 11:01:02 (12 years ago)
Author:
vmipsl
Message:

account BD

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ether_statistics/service/implementation/com/ether/EtherServiceImpl.java

    r572 r667  
    11package com.ether; 
    22 
     3import com.ether.account.Account; 
     4import com.ether.dao.AccountDAO; 
    35import org.apache.commons.logging.Log; 
    46import org.apache.commons.logging.LogFactory; 
     7import org.jetbrains.annotations.NotNull; 
     8import org.jetbrains.annotations.Nullable; 
     9import org.springframework.beans.factory.annotation.Required; 
     10import org.springframework.transaction.annotation.Transactional; 
    511 
    612/** 
     
    1117        implements EtherService 
    1218{ 
    13 //    @Nullable 
    14 //    @Transactional(readOnly = true) 
    15 //    public List<Plateforme> getAllPlateforms() 
    16 //            throws ServiceException 
    17 //    { 
    18 //        try 
    19 //        { 
    20 //            return _plateformDAO.getAllPlateforms(); 
    21 //        } 
    22 //        catch( PersistenceException e ) 
    23 //        { 
    24 //            throw new ServiceException( ServiceException.ServiceCode.PLATEFORM_NOT_FOUND, e ); 
    25 //        } 
    26 //    } 
    27 // 
     19    @Nullable 
     20    @Transactional(readOnly = true) 
     21    public Account getAccountByLogin( @NotNull final String login ) 
     22            throws ServiceException 
     23    { 
     24        try 
     25        { 
     26            return _accountDAO.getAccountByLogin( login ); 
     27        } 
     28        catch( PersistenceException e ) 
     29        { 
     30            throw new ServiceException( ServiceException.ServiceCode.PLATEFORM_NOT_FOUND, e ); 
     31        } 
     32    } 
     33 
    2834//    @NotNull 
    2935//    @Transactional(rollbackFor = Exception.class) 
     
    4147//    } 
    4248 
     49    @Required 
     50    public void setAccountDAO( final AccountDAO accountDAO ) 
     51    { 
     52        _accountDAO = accountDAO; 
     53    } 
     54 
    4355    private static final Log LOGGER = LogFactory.getLog( EtherServiceImpl.class ); 
     56 
     57    private AccountDAO _accountDAO; 
    4458} 
Note: See TracChangeset for help on using the changeset viewer.