Ignore:
Timestamp:
04/04/12 17:20:30 (12 years ago)
Author:
rboipsl
Message:

creation form xml

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tapas/persistence/implementation/com/ether/dao/ObservatoryDAOImpl.java

    r450 r467  
    44import com.ether.tapas.Observatory; 
    55import org.hibernate.criterion.DetachedCriteria; 
     6import org.hibernate.criterion.MatchMode; 
    67import org.hibernate.criterion.Restrictions; 
    78import org.jetbrains.annotations.NotNull; 
     
    4445 
    4546    @Nullable 
    46     public Observatory getObservatoryByName( @NotNull final String name ) 
     47    public Observatory getObservatoryById( @NotNull final long id) 
    4748            throws PersistenceException 
    4849    { 
    4950        final DetachedCriteria criteria = DetachedCriteria.forClass( Observatory.class ) 
    50                 .add( Restrictions.eq( "name", name ) ); 
     51                    .add( Restrictions.eq( "id", id )); 
    5152        return selectByCriteria( Observatory.class, criteria ); 
    5253    } 
Note: See TracChangeset for help on using the changeset viewer.