Search in sources :

Example 71 with QueryFactory

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

the class HierarchicalRelationshipType method getByMdTermRelationship.

public static HierarchicalRelationshipType getByMdTermRelationship(MdTermRelationship mdTermRelationship) {
    HierarchicalRelationshipTypeQuery query = new HierarchicalRelationshipTypeQuery(new QueryFactory());
    query.WHERE(query.getMdTermRelationship().EQ(mdTermRelationship));
    try (OIterator<? extends HierarchicalRelationshipType> it = query.getIterator()) {
        if (it.hasNext()) {
            return it.next();
        }
    }
    return null;
}
Also used : QueryFactory(com.runwaysdk.query.QueryFactory)

Example 72 with QueryFactory

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

the class HierarchicalRelationshipType method getByMdEdge.

public static HierarchicalRelationshipType getByMdEdge(MdEdgeDAOIF mdEdge) {
    HierarchicalRelationshipTypeQuery query = new HierarchicalRelationshipTypeQuery(new QueryFactory());
    query.WHERE(query.getMdEdge().EQ(mdEdge.getOid()));
    try (OIterator<? extends HierarchicalRelationshipType> it = query.getIterator()) {
        if (it.hasNext()) {
            return it.next();
        }
    }
    return null;
}
Also used : QueryFactory(com.runwaysdk.query.QueryFactory)

Example 73 with QueryFactory

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

the class HierarchyMetadata method deleteByRelationship.

public static void deleteByRelationship(MdTermRelationship mdRelationship) {
    HierarchyMetadataQuery query = new HierarchyMetadataQuery(new QueryFactory());
    query.WHERE(query.getMdTermRelationship().EQ(mdRelationship));
    List<? extends HierarchyMetadata> hierarchies = query.getIterator().getAll();
    for (HierarchyMetadata hierarchy : hierarchies) {
        hierarchy.delete();
    }
}
Also used : QueryFactory(com.runwaysdk.query.QueryFactory)

Example 74 with QueryFactory

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

the class InheritedHierarchyAnnotation method getByInheritedHierarchy.

public static List<? extends InheritedHierarchyAnnotation> getByInheritedHierarchy(Universal universal, HierarchicalRelationshipType inheritedRelationship) {
    InheritedHierarchyAnnotationQuery query = new InheritedHierarchyAnnotationQuery(new QueryFactory());
    query.WHERE(query.getUniversal().EQ(universal));
    query.WHERE(query.getInheritedHierarchicalRelationshipType().EQ(inheritedRelationship));
    try (OIterator<? extends InheritedHierarchyAnnotation> iterator = query.getIterator()) {
        List<? extends InheritedHierarchyAnnotation> list = iterator.getAll();
        return list;
    }
}
Also used : QueryFactory(com.runwaysdk.query.QueryFactory)

Example 75 with QueryFactory

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

the class InheritedHierarchyAnnotation method getByForHierarchical.

public static InheritedHierarchyAnnotation getByForHierarchical(HierarchicalRelationshipType forHierarchicalRelationship) {
    InheritedHierarchyAnnotationQuery query = new InheritedHierarchyAnnotationQuery(new QueryFactory());
    query.WHERE(query.getForHierarchicalRelationshipType().EQ(forHierarchicalRelationship));
    try (OIterator<? extends InheritedHierarchyAnnotation> iterator = query.getIterator()) {
        if (iterator.hasNext()) {
            return iterator.next();
        }
    }
    return null;
}
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