public static long getID(PreparedStatement state){
        long res = -1;
        try {
            ResultSet resset = state.executeQuery();
            if(resset.first())
            res = resset.getLong(1);
        } catch (SQLException ex) {
            Logger.getLogger(ClasesParser.class.getName()).log(Level.SEVERE, null, ex);
        }
        if(res==-1){
         System.out.println(   state.toString());
         System.out.println("ID = "+res);
        }
        return res;
    }