Add stub repository implementations

This commit is contained in:
Jan Philipp Timme 2016-12-12 11:27:33 +01:00
parent a976c1a8fe
commit 542d5939af
Signed by untrusted user: JPT
GPG Key ID: 5F2C85EC6F3754B7
3 changed files with 64 additions and 2 deletions

View File

@ -0,0 +1,21 @@
package de.hsh.inform.orientdb_project.repository;
import java.util.List;
import com.tinkerpop.blueprints.impls.orient.OrientGraphNoTx;
import de.hsh.inform.orientdb_project.model.EthernetFrameModel;
public class EthernetFrameRepository {
private OrientGraphNoTx ogf;
public EthernetFrameRepository(OrientGraphNoTx ogf) {
this.ogf = ogf;
}
public List<EthernetFrameModel> findAllByRawData(byte[] content) {
// TODO!
return null;
}
}

View File

@ -0,0 +1,34 @@
package de.hsh.inform.orientdb_project.repository;
import java.util.List;
import com.tinkerpop.blueprints.impls.orient.OrientGraphNoTx;
import de.hsh.inform.orientdb_project.model.HostModel;
public class HostRepository {
private OrientGraphNoTx ogf;
public HostRepository(OrientGraphNoTx ogf) {
this.ogf = ogf;
}
public List<HostModel> findByConnectionsTo(String ipAddress, int port) {
// TODO!
return null;
}
public List<HostModel> findAllByConnectionsToOutsideHosts() {
// TODO!
return null;
}
public List<HostModel> findByIncomingConnectionOnPort(int port) {
return null;
}
}

View File

@ -1,5 +1,7 @@
package de.hsh.inform.orientdb_project.repository;
import java.util.List;
import com.tinkerpop.blueprints.GraphQuery;
import com.tinkerpop.blueprints.Predicate;
import com.tinkerpop.blueprints.Vertex;
@ -15,7 +17,7 @@ public class TcpConnectionRepository {
this.ogf = ogf;
}
public Object findByActiveWhen(long ts) {
public List<TcpConnectionModel> findByActiveWhen(long ts) {
GraphQuery gq = this.ogf.query();
gq = gq.has("@class", "TcpConnection");
@ -42,6 +44,11 @@ public class TcpConnectionRepository {
}
System.out.println("----");
return null;
}
}
public List<TcpConnectionModel> getTotalDataVolumeBetweenHosts(String ipA, String ipB) {
// TODO!
return null;
}
}