Search in sources :

Example 6 with TimeSeriesConstraint

use of com.emc.storageos.db.client.constraint.TimeSeriesConstraint in project coprhd-controller by CoprHD.

the class BourneDbClient method findAllOrdersByTimeRange.

@Override
public List<NamedElement> findAllOrdersByTimeRange(URI tid, String columnField, Date startTime, Date endTime, int maxCount) throws DataAccessException {
    LOG.debug("findAllOrdersByTimeRange(tid={} columnField={}, startTime={} endTime={} maxCount={})", new Object[] { tid, columnField, startTime, endTime, maxCount });
    long startTimeInMS = startTime.getTime();
    long endTimeInMS = endTime.getTime();
    TimeSeriesConstraint constraint = TimeSeriesConstraint.Factory.getOrders(tid, startTimeInMS, endTimeInMS);
    List<NamedElement> allOrderIds = queryNamedElementsByConstraint(constraint, maxCount);
    return allOrderIds;
}
Also used : TimeSeriesConstraint(com.emc.storageos.db.client.constraint.TimeSeriesConstraint) NamedElement(com.emc.storageos.db.client.constraint.NamedElementQueryResultList.NamedElement)

Aggregations

TimeSeriesConstraint (com.emc.storageos.db.client.constraint.TimeSeriesConstraint)6 Order (com.emc.storageos.db.client.model.uimodels.Order)4 DbClientImpl (com.emc.storageos.db.client.impl.DbClientImpl)3 URI (java.net.URI)3 NamedElementQueryResultList (com.emc.storageos.db.client.constraint.NamedElementQueryResultList)2 ConnectionException (com.netflix.astyanax.connectionpool.exceptions.ConnectionException)2 NamedElement (com.emc.storageos.db.client.constraint.NamedElementQueryResultList.NamedElement)1 OrderStatus (com.emc.storageos.db.client.model.uimodels.OrderStatus)1 DatabaseException (com.emc.storageos.db.exceptions.DatabaseException)1 APIException (com.emc.storageos.svcs.errorhandling.resources.APIException)1 BadRequestException (com.emc.storageos.svcs.errorhandling.resources.BadRequestException)1 PrintStream (java.io.PrintStream)1 URISyntaxException (java.net.URISyntaxException)1 InvalidParameterException (java.security.InvalidParameterException)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 WebApplicationException (javax.ws.rs.WebApplicationException)1