public boolean isNew(String s)
    {
        getConnection();
        boolean flag=false;
        try
        {
            String s1 = "select value from doc_num where code='" + s + "'";
            Statement statement = con.createStatement();
            ResultSet resultset = statement.executeQuery(s1);
            if(!resultset.next())
            {
                throw new RuntimeException("Can't find the specified code.code=" + s);
            }
            int i = resultset.getInt("value");
            if(i == 0)
             flag = true;
        }
        catch(Exception e)
        {}
        finally
        {
            closeConnection();
        }
        return flag;
        
    }