Class BasicCoreCriteria
- All Implemented Interfaces:
Cloneable,EnabledCriteria,LocationCriteria,NodeCriteria,NodeOwnershipCriteria,SearchFilterCriteria,SecurityTokenCriteria,SourceCriteria,UserCriteria,UserModifiableFilter,net.solarnetwork.dao.PaginationCriteria
- Direct Known Subclasses:
BasicLocationRequestCriteria,BasicUserEventFilter,BasicUserMetadataFilter
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.BasicCoreCriteria(net.solarnetwork.dao.PaginationCriteria criteria) Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionclone()voidcopyFrom(net.solarnetwork.dao.PaginationCriteria criteria) Copy the properties of another criteria into this instance.booleanGet the enabled flag.net.solarnetwork.domain.SimpleLocationGet a location to use as geographic criteria.Get the first location ID.Long[]Get an array of location IDs.Get the first node ID.Long[]Get an array of node IDs.Get the order-by list.Get the search filter.Get the first source ID.String[]Get an array of source IDs.Get the first token ID.String[]Get an array of token IDs.Get the first user ID.Long[]Get an array of user IDs.Get the valid node ownership flag.inthashCode()voidsetEnabled(Boolean enabled) Set the enabled flag.voidsetLocation(net.solarnetwork.domain.SimpleLocation location) Set the location geographic criteria.voidsetLocationId(Long locationId) Set a single location ID.voidsetLocationIds(Long[] locationIds) Set the location IDs.voidSet a single node ID.voidsetNodeIds(Long[] nodeIds) Set the node IDs.voidsetOrderBy(List<String> orderBys) Set the order-by list.voidsetSearchFilter(String searchFilter) Set the search filter.voidsetSourceId(String sourceId) Set a single source ID.voidsetSourceIds(String[] sourceIds) Set the source IDs.voidsetTokenId(String tokenId) Set a single token ID.voidsetTokenIds(String[] tokenIds) Set the token IDs.voidSet a single user ID.voidsetUserIds(Long[] userIds) Set a list of user IDs to filter on.voidsetValidNodeOwnership(Boolean validNodeOwnership) Set the valid node ownership flag.Methods inherited from class net.solarnetwork.domain.SimplePagination
getMax, getOffset, getSorts, matches, setMax, setOffset, setSortsMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.solarnetwork.central.common.dao.EnabledCriteria
hasEnabledCriteriaMethods inherited from interface net.solarnetwork.central.common.dao.LocationCriteria
hasLocationCriteriaMethods inherited from interface net.solarnetwork.central.common.dao.NodeCriteria
hasNodeCriteriaMethods inherited from interface net.solarnetwork.central.common.dao.NodeOwnershipCriteria
hasNodeOwnershipCriteriaMethods inherited from interface net.solarnetwork.dao.PaginationCriteria
getMax, getOffset, getSorts, hasSortsMethods inherited from interface net.solarnetwork.central.common.dao.SearchFilterCriteria
hasSearchFilterCriteria, searchFilterMethods inherited from interface net.solarnetwork.central.common.dao.SecurityTokenCriteria
hasTokenCriteriaMethods inherited from interface net.solarnetwork.central.common.dao.SourceCriteria
hasSourceCriteriaMethods inherited from interface net.solarnetwork.central.common.dao.UserCriteria
hasUserCriteria
-
Constructor Details
-
BasicCoreCriteria
public BasicCoreCriteria()Default constructor. -
BasicCoreCriteria
public BasicCoreCriteria(net.solarnetwork.dao.PaginationCriteria criteria) Copy constructor.
-
-
Method Details
-
clone
- Overrides:
clonein classnet.solarnetwork.domain.SimplePagination
-
hashCode
public int hashCode()- Overrides:
hashCodein classnet.solarnetwork.domain.SimplePagination
-
equals
- Overrides:
equalsin classnet.solarnetwork.domain.SimplePagination
-
copyFrom
public void copyFrom(net.solarnetwork.dao.PaginationCriteria criteria) Copy the properties of another criteria into this instance.This method will test for conformance to all the various criteria interfaces implemented by this class, and copy those properties as well.
- Parameters:
criteria- the criteria to copy
-
setLocationId
Set a single location ID.This is a convenience method for requests that use a single location ID at a time. The location ID is still stored on the
locationIdsarray, as the first value. Calling this method replaces any existinglocationIdsvalue with a new array containing just the ID passed into this method.- Parameters:
locationId- the ID of the location
-
getLocationId
Description copied from interface:LocationCriteriaGet the first location ID.This returns the first available location ID from the
LocationCriteria.getLocationIds()array, or null if not available.- Specified by:
getLocationIdin interfaceLocationCriteria- Returns:
- the location ID, or null if not available
-
getLocationIds
Description copied from interface:LocationCriteriaGet an array of location IDs.- Specified by:
getLocationIdsin interfaceLocationCriteria- Returns:
- array of locations IDs (may be null)
-
setLocationIds
Set the location IDs.- Parameters:
locationIds- the location IDs to set
-
setNodeId
Set a single node ID.This is a convenience method for requests that use a single node ID at a time. The node ID is still stored on the
nodeIdsarray, as the first value. Calling this method replaces any existingnodeIdsvalue with a new array containing just the ID passed into this method.- Parameters:
nodeId- the ID of the node
-
getNodeId
Description copied from interface:NodeCriteriaGet the first node ID.This returns the first available node ID from the
NodeCriteria.getNodeIds()array, or null if not available.- Specified by:
getNodeIdin interfaceNodeCriteria- Returns:
- the node ID, or null if not available
-
getNodeIds
Description copied from interface:NodeCriteriaGet an array of node IDs.- Specified by:
getNodeIdsin interfaceNodeCriteria- Returns:
- array of node IDs (may be null)
-
setNodeIds
Set the node IDs.- Parameters:
nodeIds- the nodeIds to set
-
setSourceId
Set a single source ID.This is a convenience method for requests that use a single source ID at a time. The source ID is still stored on the
sourceIdsarray, as the first value. Calling this method replaces any existingsourceIdsvalue with a new array containing just the ID passed into this method.- Parameters:
sourceId- the source ID
-
getSourceId
Description copied from interface:SourceCriteriaGet the first source ID.This returns the first available source ID from the
SourceCriteria.getSourceIds()array, or null if not available.- Specified by:
getSourceIdin interfaceSourceCriteria- Returns:
- the first source ID, or null if not available
-
getSourceIds
Description copied from interface:SourceCriteriaGet an array of source IDs.- Specified by:
getSourceIdsin interfaceSourceCriteria- Returns:
- array of source IDs (may be null)
-
setSourceIds
Set the source IDs.- Parameters:
sourceIds- the sourceIds to set
-
setUserId
Set a single user ID.This is a convenience method for requests that use a single user ID at a time. The user ID is still stored on the
userIdsarray, just as the first value. Calling this method replaces any existinguserIdsvalue with a new array containing just the ID passed into this method.- Parameters:
userId- the ID of the user
-
getUserId
Description copied from interface:UserCriteriaGet the first user ID.This returns the first available user ID from the
UserCriteria.getUserIds()array, or null if not available.- Specified by:
getUserIdin interfaceUserCriteria- Returns:
- the first user ID, or null if not available
-
getUserIds
Description copied from interface:UserCriteriaGet an array of user IDs.- Specified by:
getUserIdsin interfaceUserCriteria- Returns:
- array of user IDs (may be null)
-
setUserIds
Set a list of user IDs to filter on.- Parameters:
userIds- The user IDs to filter on.
-
setTokenId
Set a single token ID.This is a convenience method for requests that use a single token ID at a time. The token ID is still stored on the
tokenIdsarray, as the first value. Calling this method replaces any existingtokenIdsvalue with a new array containing just the ID passed into this method.- Parameters:
tokenId- the token ID
-
getTokenId
Description copied from interface:SecurityTokenCriteriaGet the first token ID.This returns the first available token ID from the
SecurityTokenCriteria.getTokenIds()array, or null if not available.- Specified by:
getTokenIdin interfaceSecurityTokenCriteria- Returns:
- the first token ID, or null if not available
-
getTokenIds
Description copied from interface:SecurityTokenCriteriaGet an array of token IDs.- Specified by:
getTokenIdsin interfaceSecurityTokenCriteria- Returns:
- array of token IDs (may be null)
-
setTokenIds
Set the token IDs.- Parameters:
tokenIds- the tokenIds to set
-
getLocation
public net.solarnetwork.domain.SimpleLocation getLocation()Description copied from interface:LocationCriteriaGet a location to use as geographic criteria.- Specified by:
getLocationin interfaceLocationCriteria- Returns:
- the location whose properties represent geographic search criteria
-
setLocation
public void setLocation(net.solarnetwork.domain.SimpleLocation location) Set the location geographic criteria.- Parameters:
location- the location to set
-
getSearchFilter
Description copied from interface:SearchFilterCriteriaGet the search filter.The actual syntax of this search filter is not defined by this API, and is implementation and context specific.
- Specified by:
getSearchFilterin interfaceSearchFilterCriteria- Returns:
- the search filter
-
setSearchFilter
Set the search filter.- Parameters:
searchFilter- the filter to set
-
getOrderBy
Get the order-by list.This is derived from the
SimplePagination.getSorts()list. The returned list will contain all theSortDescriptor.getSortKey()values. Any descriptor whereSortDescriptor.isDescending()returns true will cause a ~ character to be added to the end of the associated sort key value.- Returns:
- the order-by list
- Since:
- 1.2
-
setOrderBy
Set the order-by list.This creates the
SimplePagination.getSorts()list. The values of theorderByslist represent the sort descriptor key values. If the value ends with a ~ character the descriptor will be set to descending order.- Parameters:
orderBys- the order-by list- Since:
- 1.2
- See Also:
-
getEnabled
Description copied from interface:EnabledCriteriaGet the enabled flag.- Specified by:
getEnabledin interfaceEnabledCriteria- Returns:
- the true or false to filter by that state, or null to not filter
-
setEnabled
Set the enabled flag.- Parameters:
enabled- the enabled to set- Since:
- 1.3
-
getValidNodeOwnership
Description copied from interface:NodeOwnershipCriteriaGet the valid node ownership flag.This flag, when true, indicates a desire to filter the results to only the set of nodes actually owned by the users specified with the data. For example, a table might have a node ID column that is not a foreign key to the user_node mapping table, so there is no guarantee the record's node ID is actually owned by that record's account owner.
- Specified by:
getValidNodeOwnershipin interfaceNodeOwnershipCriteria- Returns:
- the true or false to filter by that state, or null to not filter
-
setValidNodeOwnership
Set the valid node ownership flag.- Parameters:
validNodeOwnership- the flag to set- Since:
- 1.3
-