class QueryId {

    public static QueryId fromExternalString( String queryIdText ) throws InvalidArgumentsException
    {
        try
        {
            if ( queryIdText.startsWith( QUERY_ID_PREFIX ) )
            {
                return new QueryId( Long.parseLong( queryIdText.substring( QUERY_ID_PREFIX.length() ) ) );
            }
        }
        catch ( NumberFormatException e )
        {
            throw new InvalidArgumentsException( "Could not parse query id (expected format: query-1234)", e );
        }

        throw new InvalidArgumentsException( "Could not parse query id (expected format: query-1234)" );
    }

    private  QueryId( long kernelQueryId );

}