class DefaultUserPropertyProvider implements UserPropertyProvider
{
    private static final Logger Log = LoggerFactory.getLogger( DefaultUserPropertyProvider.class );

    private static final String LOAD_PROPERTIES = "SELECT name, propValue FROM ofUserProp WHERE username=?";
    private static final String LOAD_PROPERTY = "SELECT propValue FROM ofUserProp WHERE username=? AND name=?";
    private static final String DELETE_PROPERTY = "DELETE FROM ofUserProp WHERE username=? AND name=?";
    private static final String UPDATE_PROPERTY = "UPDATE ofUserProp SET propValue=? WHERE name=? AND username=?";
    private static final String INSERT_PROPERTY = "INSERT INTO ofUserProp (username, name, propValue) VALUES (?, ?, ?)";

    @Override
    public Map<String, String> loadProperties( String username )
    {
        Connection con = null;
        PreparedStatement pstmt = null;
        ResultSet rs = null;
        final Map<String, String> properties = new ConcurrentHashMap<>();
        try
        {
            con = DbConnectionManager.getConnection();
            pstmt = con.prepareStatement( LOAD_PROPERTIES );
            pstmt.setString( 1, username );
            rs = pstmt.executeQuery();
            while ( rs.next() )
            {
                properties.put( rs.getString( 1 ), rs.getString( 2 ) );
            }
        }
        catch ( SQLException sqle )
        {
            Log.error( sqle.getMessage(), sqle );
        }
        finally
        {
            DbConnectionManager.closeConnection( rs, pstmt, con );
        }
        return properties;
    }

    @Override
    public String loadProperty( String username, String propertyName )
    {
        String propertyValue = null;
        Connection con = null;
        PreparedStatement pstmt = null;
        ResultSet rs = null;
        try
        {
            con = DbConnectionManager.getConnection();
            pstmt = con.prepareStatement( LOAD_PROPERTY );
            pstmt.setString( 1, username );
            pstmt.setString( 2, propertyName );
            rs = pstmt.executeQuery();
            while ( rs.next() )
            {
                propertyValue = rs.getString( 1 );
            }
        }
        catch ( SQLException sqle )
        {
            Log.error( sqle.getMessage(), sqle );
        }
        finally
        {
            DbConnectionManager.closeConnection( rs, pstmt, con );
        }
        return propertyValue;
    }

    @Override
    public void insertProperty( String username, String propName, String propValue )
    {<FILL_FUNCTION_BODY>}

    @Override
    public void updateProperty( String username, String propName, String propValue )
    {
        Connection con = null;
        PreparedStatement pstmt = null;
        try
        {
            con = DbConnectionManager.getConnection();
            pstmt = con.prepareStatement( UPDATE_PROPERTY );
            pstmt.setString( 1, propValue );
            pstmt.setString( 2, propName );
            pstmt.setString( 3, username );
            pstmt.executeUpdate();
        }
        catch ( SQLException e )
        {
            Log.error( e.getMessage(), e );
        }
        finally
        {
            DbConnectionManager.closeConnection( pstmt, con );
        }
    }

    @Override
    public void deleteProperty( String username, String propName )
    {
        Connection con = null;
        PreparedStatement pstmt = null;
        try
        {
            con = DbConnectionManager.getConnection();
            pstmt = con.prepareStatement( DELETE_PROPERTY );
            pstmt.setString( 1, username );
            pstmt.setString( 2, propName );
            pstmt.executeUpdate();
        }
        catch ( SQLException e )
        {
            Log.error( e.getMessage(), e );
        }
        finally
        {
            DbConnectionManager.closeConnection( pstmt, con );
        }
    }

    @Override
    public boolean isReadOnly()
    {
        return false;
    }
}

        Connection con = null;
        PreparedStatement pstmt = null;
        try
        {
            con = DbConnectionManager.getConnection();
            pstmt = con.prepareStatement( INSERT_PROPERTY );
            pstmt.setString( 1, username );
            pstmt.setString( 2, propName );
            pstmt.setString( 3, propValue );
            pstmt.executeUpdate();
        }
        catch ( SQLException e )
        {
            Log.error( e.getMessage(), e );
        }
        finally
        {
            DbConnectionManager.closeConnection( pstmt, con );
        }
    
<no_super_class>