/** * Constructor */ private DeviceQueryImpl() { super(); setSortCriteria(new FieldSortCriteria(DeviceAttributes.CLIENT_ID, SortOrder.ASCENDING)); }
/** * Constructor. * * It defaults the {@link #sortCriteria} to order by the {@link KapuaEntity#getCreatedOn()} {@link SortOrder#ASCENDING}. * * @since 1.0.0 */ public AbstractKapuaQuery() { setSortCriteria(new FieldSortCriteria(KapuaEntityAttributes.CREATED_ON, SortOrder.ASCENDING)); }
/** * Constructor. * * It defaults the {@link #sortCriteria} to order by the {@link KapuaEntity#getCreatedOn()} {@link SortOrder#ASCENDING}. * * @since 1.0.0 */ public AbstractKapuaQuery() { setSortCriteria(new FieldSortCriteria(KapuaEntityAttributes.CREATED_ON, SortOrder.ASCENDING)); }
/** * Constructor */ private DeviceEventQueryImpl() { super(); setSortCriteria(new FieldSortCriteria(DeviceEventAttributes.RECEIVED_ON, SortOrder.DESCENDING)); }
certificateQuery.setSortCriteria(new FieldSortCriteria(CertificateAttributes.CREATED_BY, FieldSortCriteria.SortOrder.DESCENDING)); certificateQuery.setIncludeInherited(true); certificateQuery.setLimit(1);
certificateQuery.setSortCriteria(new FieldSortCriteria(CertificateAttributes.CREATED_BY, FieldSortCriteria.SortOrder.DESCENDING)); certificateQuery.setIncludeInherited(true); certificateQuery.setLimit(1);
query.setSortCriteria(new FieldSortCriteria(JobStepAttributes.STEP_INDEX, FieldSortCriteria.SortOrder.DESCENDING)); query.setLimit(1);
query.setSortCriteria(new FieldSortCriteria(JobStepAttributes.STEP_INDEX, FieldSortCriteria.SortOrder.DESCENDING)); query.setLimit(1);
@When("^I search for events from device \"(.+)\" in account \"(.+)\"$") public void searchForEventsFromDeviceWithClientID(String clientId, String account) throws KapuaException { DeviceEventQuery tmpQuery; Device tmpDev; DeviceEventListResult tmpList; Account tmpAcc; tmpAcc = KapuaLocator.getInstance().getService(AccountService.class).findByName(account); Assert.assertNotNull(tmpAcc); Assert.assertNotNull(tmpAcc.getId()); tmpDev = deviceRegistryService.findByClientId(tmpAcc.getId(), clientId); Assert.assertNotNull(tmpDev); Assert.assertNotNull(tmpDev.getId()); tmpQuery = new DeviceEventQueryImpl(tmpAcc.getId()); tmpQuery.setPredicate(AttributePredicateImpl.attributeIsEqualTo("deviceId", tmpDev.getId())); tmpQuery.setSortCriteria(new FieldSortCriteria("receivedOn", FieldSortCriteria.SortOrder.ASCENDING)); tmpList = deviceEventsService.query(tmpQuery); Assert.assertNotNull(tmpList); stepData.put("DeviceEventList", tmpList); }