use of me.retrodaredevil.solarthing.misc.common.meta.DataMetaPacket in project solarthing by wildmountainfarms.
the class SolarThingGraphQLMetaService method getMeta.
@Nullable
private DataMetaPacket getMeta(PacketNode<? extends DataIdentifiable> packetNode) {
int fragmentId = packetNode.getFragmentId();
int dataId = packetNode.getPacket().getDataId();
MetaDatabase metaDatabase = simpleQueryHandler.queryMeta();
for (TargetedMetaPacket targetedMetaPacket : metaDatabase.getMeta(packetNode.getDateMillis(), fragmentId)) {
if (targetedMetaPacket instanceof DataMetaPacket) {
DataMetaPacket dataMetaPacket = (DataMetaPacket) targetedMetaPacket;
if (dataMetaPacket.getDataId() == dataId) {
return dataMetaPacket;
}
}
}
return null;
}
Aggregations