new DatumFilter( [props])
Constructor.
Extends:
Parameters:
Name | Type | Argument | Description |
---|---|---|---|
props |
object |
<optional> |
initial property values |
Extends
Members
-
aggregation :module:domain~Aggregation
-
An aggregation.
Including this in a filter will cause SolarNet to return aggregated results, rather than raw results.
Type:
-
dataPath :string
-
A data path, in dot-delimited notation like
i.watts
.Type:
- string
-
endDate :Date
-
A maximum date.
Type:
- Date
-
location :module:domain~Location
-
A location, used as an example-based search criteria.
Type:
-
locationId :number
-
A location ID.
This manages the first available location ID from the
locationIds
property.Type:
- number
-
locationIds :Array.<number>
-
An array of location IDs.
Type:
- Array.<number>
-
metadataFilter :string
-
A metadata filter (LDAP style search criteria).
Type:
- string
-
mostRecent :boolean
-
The "most recent" flag.
Type:
- boolean
-
nodeId :number
-
A node ID.
This manages the first available node ID from the
nodeIds
property.Type:
- number
-
nodeIds :Array.<number>
-
An array of node IDs.
Type:
- Array.<number>
-
props :object
-
The object that all properties are stored on.
Type:
- object
- Inherited From:
-
query :string
-
A general full-text style query string.
Type:
- string
-
sourceId :string
-
A source ID.
This manages the first available source ID from the
sourceIds
property.Type:
- string
-
sourceIds :Array.<string>
-
An array of source IDs.
Type:
- Array.<string>
-
startDate :Date
-
A minimumin date.
Type:
- Date
-
tags :Array.<string>
-
An array of tags.
Type:
- Array.<string>
-
userId :number
-
A user ID.
This manages the first available location ID from the
userIds
property.Type:
- number
-
userIds :Array.<number>
-
An array of user IDs.
Type:
- Array.<number>
Methods
-
prop(key [, newValue])
-
Get, set, or remove a property value.
Parameters:
Name Type Argument Description key
string the key to get or set the value for
newValue
* <optional>
if defined, the new value to set for the given
key
; ifnull
then thekey
property will be removed- Inherited From:
Returns:
if called as a getter, the associated value for the given
key
, otherwise this object- Type
- *
-
properties( [newProps])
-
Get, set, or remove multiple properties.
Parameters:
Name Type Argument Description newProps
object <optional>
the new values to set; if any value is
null
that property will be deleted- Inherited From:
Returns:
if called as a getter, all properties of this object copied into a simple object; otherwise this object
- Type
- object
-
toUriEncoding( [propertyName] [, callbackFn])
-
Get this object as a standard URI encoded (query parameters) string value.
All enumerable properties of the
props
property will be added to the result. If any property value is an array, the values of the array will be joined by a comma. Anymodule:util~Enum
values will have theirname
property used. Any value that has atoUriEncoding()
function property will have that function invoked, passing the associated property name as the first argument, and the returned value will be used.Parameters:
Name Type Argument Description propertyName
string <optional>
an optional object property prefix to add to all properties
callbackFn
function <optional>
An optional function that will be called for each property. The function will be passed property name and value arguments, and must return either
null
to skip the property, a 2-element array with the property name and value to use, or anything else to use the property as- is.- Inherited From:
- Overrides:
Returns:
the URI encoded string
- Type
- string
-
toUriEncodingWithSorting( [sorts] [, pagination] [, propertyName] [, callbackFn])
-
Get this object as a standard URI encoded (query parameters) string value with sorting and pagination parameters.
This calls
module:util~PropMap#toUriEncoding
first, then encodes thesorts
andpagination
parameters, if provided.Parameters:
Name Type Argument Description sorts
Array.<module:domain~SortDescriptor> <optional>
optional sort settings to use
pagination
module:domain~Pagination <optional>
optional pagination settings to use
propertyName
string <optional>
an optional object property prefix to add to all properties
callbackFn
function <optional>
An optional function that will be called for each property. The function will be passed property name and value arguments, and must return either
null
to skip the property, a 2-element array with the property name and value to use, or anything else to use the property as- is.- Inherited From:
Returns:
the URI encoded string
- Type
- string