Search in sources :

Example 26 with QueryFactory

use of com.runwaysdk.query.QueryFactory in project geoprism-registry by terraframe.

the class MasterListVersion method getJobs.

public List<ExecutableJob> getJobs() {
    LinkedList<ExecutableJob> jobs = new LinkedList<ExecutableJob>();
    PublishShapefileJobQuery psjq = new PublishShapefileJobQuery(new QueryFactory());
    psjq.WHERE(psjq.getVersion().EQ(this));
    try (OIterator<? extends PublishShapefileJob> it = psjq.getIterator()) {
        jobs.addAll(it.getAll());
    }
    PublishMasterListVersionJobQuery pmlvj = new PublishMasterListVersionJobQuery(new QueryFactory());
    pmlvj.WHERE(pmlvj.getMasterListVersion().EQ(this));
    try (OIterator<? extends PublishMasterListVersionJob> it = pmlvj.getIterator()) {
        jobs.addAll(it.getAll());
    }
    return jobs;
}
Also used : QueryFactory(com.runwaysdk.query.QueryFactory) PublishMasterListVersionJobQuery(net.geoprism.registry.etl.PublishMasterListVersionJobQuery) ExecutableJob(com.runwaysdk.system.scheduler.ExecutableJob) PublishShapefileJobQuery(net.geoprism.registry.etl.PublishShapefileJobQuery) LinkedList(java.util.LinkedList)

Example 27 with QueryFactory

use of com.runwaysdk.query.QueryFactory in project geoprism-registry by terraframe.

the class Organization method getOrganizations.

public static List<? extends Organization> getOrganizations() {
    OrganizationQuery query = new OrganizationQuery(new QueryFactory());
    query.ORDER_BY_ASC(query.getDisplayLabel().localize());
    return query.getIterator().getAll();
}
Also used : QueryFactory(com.runwaysdk.query.QueryFactory)

Example 28 with QueryFactory

use of com.runwaysdk.query.QueryFactory in project geoprism-registry by terraframe.

the class SynchronizationConfig method getCount.

public static long getCount() {
    List<Organization> organizations = Organization.getUserAdminOrganizations();
    if (organizations.size() > 0) {
        SynchronizationConfigQuery query = new SynchronizationConfigQuery(new QueryFactory());
        for (int i = 0; i < organizations.size(); i++) {
            Organization organization = organizations.get(i);
            query.OR(query.getOrganization().EQ(organization));
        }
        return query.getCount();
    }
    return 0;
}
Also used : QueryFactory(com.runwaysdk.query.QueryFactory)

Example 29 with QueryFactory

use of com.runwaysdk.query.QueryFactory in project geoprism-registry by terraframe.

the class SynchronizationConfig method getAll.

public static List<SynchronizationConfig> getAll(ExternalSystem system) {
    SynchronizationConfigQuery query = new SynchronizationConfigQuery(new QueryFactory());
    query.WHERE(query.getSystem().EQ(system.getOid()));
    try (OIterator<? extends SynchronizationConfig> it = query.getIterator()) {
        return new LinkedList<SynchronizationConfig>(it.getAll());
    }
}
Also used : QueryFactory(com.runwaysdk.query.QueryFactory) LinkedList(java.util.LinkedList)

Example 30 with QueryFactory

use of com.runwaysdk.query.QueryFactory in project geoprism-registry by terraframe.

the class TileCache method deleteTiles.

public static void deleteTiles(MasterListVersion version) {
    TileCacheQuery query = new TileCacheQuery(new QueryFactory());
    query.WHERE(query.getVersion().EQ(version));
    try (OIterator<? extends TileCache> it = query.getIterator()) {
        while (it.hasNext()) {
            it.next().delete();
        }
    }
}
Also used : QueryFactory(com.runwaysdk.query.QueryFactory)

Aggregations

QueryFactory (com.runwaysdk.query.QueryFactory)158 Transaction (com.runwaysdk.dataaccess.transaction.Transaction)37 LinkedList (java.util.LinkedList)35 Request (com.runwaysdk.session.Request)31 JsonArray (com.google.gson.JsonArray)19 JsonObject (com.google.gson.JsonObject)19 ServerGeoObjectType (net.geoprism.registry.model.ServerGeoObjectType)19 SimpleDateFormat (java.text.SimpleDateFormat)15 List (java.util.List)14 Date (java.util.Date)13 ChangeRequest (net.geoprism.registry.action.ChangeRequest)13 OIterator (com.runwaysdk.query.OIterator)12 Universal (com.runwaysdk.system.gis.geo.Universal)12 ChangeRequestQuery (net.geoprism.registry.action.ChangeRequestQuery)12 ServerHierarchyType (net.geoprism.registry.model.ServerHierarchyType)11 BusinessQuery (com.runwaysdk.business.BusinessQuery)10 Session (com.runwaysdk.session.Session)10 GeoprismUser (net.geoprism.GeoprismUser)10 ProgrammingErrorException (com.runwaysdk.dataaccess.ProgrammingErrorException)9 MdBusinessDAOIF (com.runwaysdk.dataaccess.MdBusinessDAOIF)8