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

account BD

Location:
ether_statistics/service
Files:
3 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} 
  • ether_statistics/service/implementation/service-context.xml

    r575 r667  
    44<beans> 
    55    <bean id="etherServiceTarget" class="com.ether.EtherServiceImpl"> 
    6         <!--<property name="simulationDAO" ref="refSimulationDAO"/>--> 
     6        <property name="accountDAO" ref="refAccountDAO"/> 
    77    </bean> 
    88    <bean id="etherService" parent="transactionProxy"> 
  • ether_statistics/service/interface/com/ether/EtherService.java

    r572 r667  
    11package com.ether; 
     2 
     3import com.ether.account.Account; 
     4import org.jetbrains.annotations.NotNull; 
     5import org.jetbrains.annotations.Nullable; 
    26 
    37/** 
    48 * @author vmipsl 
    5  * @date 07 mar 2011 
     9 * @date 12 nov. 2012 
    610 */ 
    711public interface EtherService 
    812        extends Service 
    913{ 
    10 //    @Nullable 
    11 //    List<Plateforme> getAllPlateforms() 
    12 //            throws ServiceException; 
     14    @Nullable 
     15    Account getAccountByLogin( @NotNull final String login ) 
     16            throws ServiceException; 
    1317} 
Note: See TracChangeset for help on using the changeset viewer.