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;
}
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();
}
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;
}
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());
}
}
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();
}
}
}
Aggregations