use of com.hortonworks.registries.storage.StorableKey in project streamline by hortonworks.
the class StreamCatalogService method getTopologyTestRunCaseSink.
public TopologyTestRunCaseSink getTopologyTestRunCaseSink(Long testcaseId, Long id) {
TopologyTestRunCaseSink testCaseSink = new TopologyTestRunCaseSink();
testCaseSink.setId(id);
TopologyTestRunCaseSink retrieved = dao.get(new StorableKey(TopologyTestRunCaseSink.NAMESPACE, testCaseSink.getPrimaryKey()));
if (retrieved == null || !retrieved.getTestCaseId().equals(testcaseId)) {
return null;
}
return retrieved;
}
use of com.hortonworks.registries.storage.StorableKey in project streamline by hortonworks.
the class StreamCatalogService method removeUDF.
public UDF removeUDF(Long id) {
UDF udf = new UDF();
udf.setId(id);
return dao.remove(new StorableKey(UDF_NAMESPACE, udf.getPrimaryKey()));
}
use of com.hortonworks.registries.storage.StorableKey in project streamline by hortonworks.
the class StreamCatalogService method getTopologySink.
public TopologySink getTopologySink(Long topologyId, Long sinkId, Long versionId) {
TopologySink topologySink = new TopologySink();
topologySink.setId(sinkId);
topologySink.setVersionId(versionId);
TopologySink sink = dao.get(new StorableKey(TOPOLOGY_SINK_NAMESPACE, topologySink.getPrimaryKey()));
if (sink == null || !sink.getTopologyId().equals(topologyId)) {
return null;
}
sink.setVersionTimestamp(getVersionTimestamp(versionId));
return sink;
}
use of com.hortonworks.registries.storage.StorableKey in project streamline by hortonworks.
the class StreamCatalogService method getUDF.
public UDF getUDF(Long id) {
UDF udf = new UDF();
udf.setId(id);
return this.dao.get(new StorableKey(UDF_NAMESPACE, udf.getPrimaryKey()));
}
use of com.hortonworks.registries.storage.StorableKey in project streamline by hortonworks.
the class StreamCatalogService method getTopologyEdge.
public TopologyEdge getTopologyEdge(Long topologyId, Long edgeId, Long versionId) {
TopologyEdge topologyEdge = new TopologyEdge();
topologyEdge.setId(edgeId);
topologyEdge.setVersionId(versionId);
TopologyEdge edge = dao.get(new StorableKey(TOPOLOGY_EDGE_NAMESPACE, topologyEdge.getPrimaryKey()));
if (edge == null || !edge.getTopologyId().equals(topologyId)) {
return null;
}
edge.setVersionTimestamp(getVersionTimestamp(versionId));
return edge;
}
Aggregations