change database interface
This commit is contained in:
parent
47b58ed770
commit
a7afeb1f7c
|
@ -64,7 +64,7 @@ public class LevelDBLoader implements IWaveformDbLoader {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<IWaveform> getAllWaves() {
|
public Collection<IWaveform> getAllWaves() {
|
||||||
List<IWaveform> streams=new ArrayList<IWaveform>();
|
List<IWaveform> streams=new ArrayList<IWaveform>();
|
||||||
SeekingIterator<String, String> it = levelDb.iterator();
|
SeekingIterator<String, String> it = levelDb.iterator();
|
||||||
it.seek("s~");
|
it.seek("s~");
|
||||||
|
|
|
@ -61,7 +61,7 @@ public class SQLiteDbLoader implements IWaveformDbLoader {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<IWaveform> getAllWaves() {
|
public Collection<IWaveform> getAllWaves() {
|
||||||
SQLiteDatabaseSelectHandler<ScvStream> handler = new SQLiteDatabaseSelectHandler<ScvStream>(ScvStream.class, database);
|
SQLiteDatabaseSelectHandler<ScvStream> handler = new SQLiteDatabaseSelectHandler<ScvStream>(ScvStream.class, database);
|
||||||
List<IWaveform> streams=new ArrayList<IWaveform>();
|
List<IWaveform> streams=new ArrayList<IWaveform>();
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -50,8 +50,8 @@ public class TextDbLoader implements IWaveformDbLoader{
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<IWaveform> getAllWaves() {
|
public Collection<IWaveform> getAllWaves() {
|
||||||
return new LinkedList<IWaveform>(streams);
|
return streams;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<Long, ITxGenerator> getGeneratorsById() {
|
public Map<Long, ITxGenerator> getGeneratorsById() {
|
||||||
|
|
|
@ -128,7 +128,7 @@ public class VCDDbLoader implements IWaveformDbLoader, IVCDDatabaseBuilder {
|
||||||
* @see com.minres.scviewer.database.ITrDb#getAllWaves()
|
* @see com.minres.scviewer.database.ITrDb#getAllWaves()
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<IWaveform> getAllWaves() {
|
public Collection<IWaveform> getAllWaves() {
|
||||||
return signals;
|
return signals;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,6 @@ package com.minres.scviewer.database;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public interface IWaveformDbLoader {
|
public interface IWaveformDbLoader {
|
||||||
|
|
||||||
|
@ -20,7 +19,7 @@ public interface IWaveformDbLoader {
|
||||||
|
|
||||||
public Long getMaxTime();
|
public Long getMaxTime();
|
||||||
|
|
||||||
public List<IWaveform> getAllWaves() ;
|
public Collection<IWaveform> getAllWaves() ;
|
||||||
|
|
||||||
public Collection<RelationType> getAllRelationTypes() ;
|
public Collection<RelationType> getAllRelationTypes() ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue