Package net.solarnetwork.domain.datum
Class BasicDatumStreamMetadata
java.lang.Object
net.solarnetwork.domain.datum.BasicDatumStreamMetadata
- All Implemented Interfaces:
Serializable,DatumStreamMetadata
- Direct Known Subclasses:
BasicObjectDatumStreamMetadata
Implementation of
DatumStreamMetadata.- Since:
- 1.72
- Version:
- 2.0
- Author:
- matt
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBasicDatumStreamMetadata(UUID streamId, String timeZoneId, Object instantaneousProperties, Object accumulatingProperties, Object statusProperties) Constructor.BasicDatumStreamMetadata(UUID streamId, String timeZoneId, String[] instantaneousProperties, String[] accumulatingProperties, String[] statusProperties) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionbooleanintGet the accumulating property names array length.intGet the instantaneous property names array length.String[]Get all property names included in the stream.intGet the total number of instantaneous, accumulating, and status property names.intGet the status property names array length.Get the stream ID.Get the time zone ID associated with this stream.inthashCode()String[]Get the subset of all property names that are of a specific type.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.solarnetwork.domain.datum.DatumStreamMetadata
propertyIndex
-
Constructor Details
-
BasicDatumStreamMetadata
public BasicDatumStreamMetadata(UUID streamId, String timeZoneId, String[] instantaneousProperties, String[] accumulatingProperties, String[] statusProperties) Constructor.All arguments except
streamIdare allowed to be null. If any array is empty, it will be treated as if it were null.- Parameters:
streamId- the stream IDtimeZoneId- the time zone IDinstantaneousProperties- the instantaneous property namesaccumulatingProperties- the accumulating property namesstatusProperties- the status property names- Throws:
IllegalArgumentException- ifstreamIdis null
-
BasicDatumStreamMetadata
public BasicDatumStreamMetadata(UUID streamId, String timeZoneId, Object instantaneousProperties, Object accumulatingProperties, Object statusProperties) Constructor.All arguments except
streamIdare allowed to be null. The other arguments areObjectto work around MyBatis mapping issues. If any array is empty, it will be treated as if it were null.- Parameters:
streamId- the stream IDtimeZoneId- the time zone IDinstantaneousProperties- the instantaneous property names; must be aString[]accumulatingProperties- the accumulating property names; must be aString[]statusProperties- the status property names; must be aString[]- Throws:
IllegalArgumentException- ifstreamIdis null
-
-
Method Details
-
getStreamId
Description copied from interface:DatumStreamMetadataGet the stream ID.- Specified by:
getStreamIdin interfaceDatumStreamMetadata- Returns:
- the stream ID
-
getTimeZoneId
Description copied from interface:DatumStreamMetadataGet the time zone ID associated with this stream.- Specified by:
getTimeZoneIdin interfaceDatumStreamMetadata- Returns:
- the time zone ID, or null if not known
-
getPropertyNamesLength
public int getPropertyNamesLength()Get the total number of instantaneous, accumulating, and status property names.- Returns:
- the total number of properties
-
getPropertyNames
Description copied from interface:DatumStreamMetadataGet all property names included in the stream.- Specified by:
getPropertyNamesin interfaceDatumStreamMetadata- Returns:
- the property names
-
propertyNamesForType
Description copied from interface:DatumStreamMetadataGet the subset of all property names that are of a specific type.- Specified by:
propertyNamesForTypein interfaceDatumStreamMetadata- Parameters:
type- the type of property to get the names for- Returns:
- the property names, or null if none available or
typeisDatumSamplesType.Tag
-
getInstantaneousLength
public int getInstantaneousLength()Get the instantaneous property names array length.- Returns:
- the number of instantaneous property names
-
getAccumulatingLength
public int getAccumulatingLength()Get the accumulating property names array length.- Returns:
- the number of accumulating property names
-
getStatusLength
public int getStatusLength()Get the status property names array length.- Returns:
- the number of status property names
-
hashCode
public int hashCode() -
equals
-