Code example for SessionFactory

Methods: getCache

0
    public void deleteCategory( CategoryEntity category )
    { 
        category.setDeleted( true );
        if ( category.getParent() != null )
        { 
            sessionFactory.getCache().evictCollection( CategoryEntity.class.getName() + ".children", category.getParent().getKey() );
        } 
    } 
 
    public CategoryEntity findByKey( CategoryKey key )
    { 
        CategoryEntity category = get( CategoryEntity.class, key );
 
        if ( category == null )
        { 
            return null; 
        } 
 
        if ( category.isDeleted() )
        { 
Connect your IDE to all the code out there  Get Codota for Java