Code example for Session

Methods: get

0
 
    @Override 
    protected Object convertApplicationValueToPersisted(Object newValue) 
    { 
        try 
        { 
            String entityName = session.getEntityName(newValue);
            Serializable id = session.getIdentifier(newValue);
 
            return new PersistedEntity(entityName, id);
        } 
        catch (HibernateException ex)
        { 
            throw new IllegalArgumentException(HibernateMessages.entityNotAttached(newValue), ex);
        } 
    } 
 
    @Override 
    protected Object convertPersistedToApplicationValue(Object persistedValue) 
    {