0

I am trying to fetch data from app engine with no success. The Async call is a success but there are no data printed. There are no errors either. It worked fine when I was using backend database. Now I am trying to get the same project to work with app engine datastore. I am using JDO queries. Below is the 'get' method:

public Projects getProjects(String projectname) throws NotFoundException,
        NotLoggedInException {
    checkLoggedIn();
    PersistenceManager pm = getPersistenceManager();
    Projects proj = null;
    try{
        Query q = pm.newQuery(Projects.class);
            q.setFilter("projectname == projname" );
            q.declareParameters("String projname");
        List<Projects> result = (List<Projects>) q.execute(projectname);
        for(Projects et : result){
            proj = new Projects(et.getPID(), et.getProjectName());
        }
    } finally {
        pm.close();
    }
    return proj;
}

I am not sure where it is going wrong. Any suggestion would be greatly appreciated.

Thanks

suprasad
  • 1,411
  • 3
  • 18
  • 40

0 Answers0