Examples of declareImports()


Examples of javax.jdo.Query.declareImports()

    Collection<Key> keysForOrg = CollectionUtils.collect(unitsForOrg(org.getKey(), false, false), new KeyBasedData.ToKey());
   
    PersistenceManager pm = PMF.get().getPersistenceManager();
   
    Query query = pm.newQuery(uk.org.woodcraft.bookings.datamodel.Transaction.class);
    query.declareImports("import com.google.appengine.api.datastore.Key; import java.util.Collection");
    query.setOrdering("timestamp");
    query.setFilter("unitKeysParam.contains(unitKey) && eventKey == eventKeyParam");
    query.declareParameters("Collection unitKeysParam, Key eventKeyParam");
   
    return batchQuery(query, keysForOrg, event.getKeyCheckNotNull());
View Full Code Here

Examples of javax.jdo.Query.declareImports()

  public static Collection<uk.org.woodcraft.bookings.datamodel.Transaction> transactionsForEvent(Event event)
  {
    PersistenceManager pm = PMF.get().getPersistenceManager();
   
    Query query = pm.newQuery(uk.org.woodcraft.bookings.datamodel.Transaction.class);
    query.declareImports("import com.google.appengine.api.datastore.Key");
    query.setOrdering("timestamp");
    query.setFilter("eventKey == eventKeyParam");
    query.declareParameters("Key eventKeyParam");
   
    return queryDetachAndClose(uk.org.woodcraft.bookings.datamodel.Transaction.class, query, false, event.getKeyCheckNotNull());
View Full Code Here

Examples of javax.jdo.Query.declareImports()

  private static Collection<User> allUsers(Organisation org, Unit unit, boolean unapprovedOnly)
  {
    PersistenceManager pm = PMF.get().getPersistenceManager();
   
    Query query = pm.newQuery(User.class);
    query.declareImports("import com.google.appengine.api.datastore.Key");
    query.setOrdering("name");
     
    if (org != null) {
      query.setFilter("organisationKey == orgKeyParam");
      query.declareParameters("Key orgKeyParam");
View Full Code Here

Examples of javax.jdo.Query.declareImports()

  public static Event eventByName(String eventName, Key ignoreKey)
  {
    PersistenceManager pm = PMF.get().getPersistenceManager();
   
    Query query = pm.newQuery(Event.class);
    query.declareImports("import com.google.appengine.api.datastore.Key");
    if (ignoreKey == null)
    {
      query.setFilter("name == nameParam");
      query.declareParameters("String nameParam");
      return querySingleDetachAndClose(Event.class, query, false, eventName);
View Full Code Here

Examples of javax.jdo.Query.declareImports()

  {
    PersistenceManager pm = PMF.get().getPersistenceManager();
   
    Query query = pm.newQuery(Village.class);
    query.setOrdering("name");
    query.declareImports("import com.google.appengine.api.datastore.Key");
    query.setFilter("eventKey == eventKeyParam");
    query.declareParameters("Key eventKeyParam");
   
    return queryDetachAndClose(Village.class, query, true, event.getKeyCheckNotNull());
  }
View Full Code Here

Examples of javax.jdo.Query.declareImports()

  public static Village villageByName(String villageName, Key eventKey)
  {
    PersistenceManager pm = PMF.get().getPersistenceManager();
   
    Query query = pm.newQuery(Village.class);
    query.declareImports("import com.google.appengine.api.datastore.Key");
    query.setFilter("name == nameParam && eventKey == eventKeyParam");
    query.declareParameters("String nameParam, Key eventKeyParam");
   
    return querySingleDetachAndClose(Village.class, query, false, villageName, eventKey);
  }
View Full Code Here

Examples of javax.jdo.Query.declareImports()

  public static Village villageByName(String villageName, Key eventKey, Key ignoreKey)
  {
    PersistenceManager pm = PMF.get().getPersistenceManager();
   
    Query query = pm.newQuery(Village.class);
    query.declareImports("import com.google.appengine.api.datastore.Key");
    if(ignoreKey == null)
    {
      query.setFilter("name == nameParam && eventKey == eventKeyParam");
      query.declareParameters("String nameParam, Key eventKeyParam");
      return querySingleDetachAndClose(Village.class, query, false, villageName, eventKey);
View Full Code Here

Examples of javax.jdo.Query.declareImports()

            Extent extent = pm.getExtent( Profile.class, true );

            Query query = pm.newQuery( extent );

            query.declareImports( "import java.lang.String" );

            query.declareParameters( "String name" );

            query.setFilter( "this.jdk.name == name" );
View Full Code Here

Examples of javax.jdo.Query.declareImports()

            }

            // removing linked builder
            query = pm.newQuery( extent );

            query.declareImports( "import java.lang.String" );

            query.declareParameters( "String name" );

            query.setFilter( "this.builder.name == name" );
View Full Code Here

Examples of javax.jdo.Query.declareImports()

            }

            // removing linked env Var
            query = pm.newQuery( extent );

            query.declareImports( "import java.lang.String" );
            query.declareImports( "import " + Installation.class.getName() );

            query.declareParameters( "Installation installation" );

            query.setFilter( "environmentVariables.contains(installation)" );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.