Package net.splitcells.gel.data.database
Class DatabaseMetaAspect
- java.lang.Object
-
- net.splitcells.gel.data.database.DatabaseMetaAspect
-
- All Implemented Interfaces:
net.splitcells.dem.data.Identifiable
,net.splitcells.dem.lang.dom.Domable
,net.splitcells.dem.object.Discoverable
,Database
,Table
public class DatabaseMetaAspect extends Object implements Database
This aspect adds mainly logging and runtime check functionality to
Database
instances.TODO Make this an aspect in order to make it usable for other implementations of
Database
.TODO Require the usage of a non empty name during construction.
TODO Invalidate Lines pointing to an index where values are already replaced.
TODO PERFORMANCE Abstract Database implementation with generic storage in order to simplify implementation and maintenance row and column based Databases.
TODO IDEA Implement Java collection interface.
-
-
Field Summary
-
Fields inherited from interface net.splitcells.gel.data.table.Table
GET_LINE_VIA_STREAM
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Line
add(Line line)
TODO PERFORMANCE No copies have to be created, as it is guaranteed that a Line does not change its content during its life cycle.Line
addTranslated(net.splitcells.dem.data.set.list.List<? extends Object> lineValues)
TODO REMOVE Code duplication ofaddTranslated(net.splitcells.dem.data.set.list.List<? extends java.lang.Object>)
methods.net.splitcells.dem.data.set.list.List<Column<Object>>
columnsView()
<T> ColumnView<T>
columnView(Attribute<T> attribute)
static Database
databaseIRef(Database database)
boolean
equals(Object arg)
int
hashCode()
net.splitcells.dem.data.set.list.List<Attribute<Object>>
headerView()
net.splitcells.dem.data.set.list.List<Attribute<? extends Object>>
headerView2()
Object
identity()
Line
lookupEquals(Attribute<Line> attribute, Line values)
net.splitcells.dem.data.set.list.List<String>
path()
net.splitcells.dem.data.set.list.List<Line>
rawLines()
net.splitcells.dem.data.set.list.ListView<Line>
rawLinesView()
void
remove(int lineIndex)
void
remove(Line line)
int
size()
void
subscribeToAfterAdditions(AfterAdditionSubscriber subscriber)
void
subscribeToAfterRemoval(BeforeRemovalSubscriber subscriber)
void
subscribeToBeforeRemoval(BeforeRemovalSubscriber subscriber)
Node
toDom()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.splitcells.gel.data.database.Database
query, replace, synchronize
-
Methods inherited from interface net.splitcells.gel.data.table.Table
contains, distinctLines, distinctLineValues, hasContent, isEmpty, isPresent, line, lines, linesStream, lookup, lookupEquals, rawLine, toCSV, toFods, toHtmlTable
-
-
-
-
Method Detail
-
add
public Line add(Line line)
TODO PERFORMANCE No copies have to be created, as it is guaranteed that a Line does not change its content during its life cycle. This is important for constraints. TODO Test whether the line is added to the correct place. TODO FIX Why does List> not work? TODO PERFORMANCE Reduce the high number of copies.
-
addTranslated
public Line addTranslated(net.splitcells.dem.data.set.list.List<? extends Object> lineValues)
TODO REMOVE Code duplication ofaddTranslated(net.splitcells.dem.data.set.list.List<? extends java.lang.Object>)
methods.- Specified by:
addTranslated
in interfaceDatabase
-
subscribeToAfterAdditions
public void subscribeToAfterAdditions(AfterAdditionSubscriber subscriber)
- Specified by:
subscribeToAfterAdditions
in interfaceDatabase
-
subscribeToBeforeRemoval
public void subscribeToBeforeRemoval(BeforeRemovalSubscriber subscriber)
- Specified by:
subscribeToBeforeRemoval
in interfaceDatabase
-
subscribeToAfterRemoval
public void subscribeToAfterRemoval(BeforeRemovalSubscriber subscriber)
- Specified by:
subscribeToAfterRemoval
in interfaceDatabase
-
toDom
public Node toDom()
- Specified by:
toDom
in interfacenet.splitcells.dem.lang.dom.Domable
-
path
public net.splitcells.dem.data.set.list.List<String> path()
- Specified by:
path
in interfacenet.splitcells.dem.object.Discoverable
-
headerView
public net.splitcells.dem.data.set.list.List<Attribute<Object>> headerView()
- Specified by:
headerView
in interfaceTable
-
headerView2
public net.splitcells.dem.data.set.list.List<Attribute<? extends Object>> headerView2()
- Specified by:
headerView2
in interfaceTable
-
columnView
public <T> ColumnView<T> columnView(Attribute<T> attribute)
- Specified by:
columnView
in interfaceTable
-
columnsView
public net.splitcells.dem.data.set.list.List<Column<Object>> columnsView()
- Specified by:
columnsView
in interfaceTable
-
rawLinesView
public net.splitcells.dem.data.set.list.ListView<Line> rawLinesView()
- Specified by:
rawLinesView
in interfaceTable
-
rawLines
public net.splitcells.dem.data.set.list.List<Line> rawLines()
-
lookupEquals
public Line lookupEquals(Attribute<Line> attribute, Line values)
- Specified by:
lookupEquals
in interfaceTable
-
identity
public Object identity()
- Specified by:
identity
in interfacenet.splitcells.dem.data.Identifiable
-
-