O
- Data typepublic class MaterializedRelation<O> extends AbstractHierarchicalResult implements Relation<O>
Modifier and Type | Field and Description |
---|---|
private DataStore<O> |
content
Map to hold the objects of the database.
|
private Database |
database
Our database
|
private StaticDBIDs |
ids
The DBIDs this is supposed to be defined for.
|
private String |
name
The relation name.
|
private String |
shortname
The relation name (short version)
|
private SimpleTypeInformation<O> |
type
The class of objects we store.
|
HINT_BULK, HINT_EXACT, HINT_HEAVY_USE, HINT_NO_CACHE, HINT_OPTIMIZED_ONLY, HINT_SINGLE
Constructor and Description |
---|
MaterializedRelation(Database database,
SimpleTypeInformation<O> type,
DBIDs ids)
Constructor.
|
MaterializedRelation(Database database,
SimpleTypeInformation<O> type,
DBIDs ids,
String name)
Constructor.
|
MaterializedRelation(Database database,
SimpleTypeInformation<O> type,
DBIDs ids,
String name,
DataStore<O> content)
Constructor.
|
MaterializedRelation(String name,
String shortname,
SimpleTypeInformation<O> type,
DataStore<O> content,
DBIDs ids)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
delete(DBID id)
Delete an objects values.
|
O |
get(DBID id)
Get the representation of an object.
|
Database |
getDatabase()
Get the associated database.
|
SimpleTypeInformation<O> |
getDataTypeInformation()
Get the data type of this representation
|
StaticDBIDs |
getDBIDs()
Get the IDs the query is defined for.
|
String |
getLongName()
A "pretty" name for the result, for use in titles, captions and menus.
|
String |
getShortName()
A short name for the result, useful for file names.
|
IterableIterator<DBID> |
iterDBIDs()
Get an iterator access to the DBIDs.
|
void |
set(DBID id,
O val)
Set an object representation.
|
int |
size()
Get the number of DBIDs.
|
addChildResult, getHierarchy, setHierarchy
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getHierarchy, setHierarchy
private final Database database
private final SimpleTypeInformation<O> type
private final StaticDBIDs ids
private String name
private String shortname
public MaterializedRelation(Database database, SimpleTypeInformation<O> type, DBIDs ids)
database
- Databasetype
- Type informationids
- IDspublic MaterializedRelation(Database database, SimpleTypeInformation<O> type, DBIDs ids, String name)
database
- Databasetype
- Type informationids
- IDsname
- Namepublic MaterializedRelation(Database database, SimpleTypeInformation<O> type, DBIDs ids, String name, DataStore<O> content)
database
- Databasetype
- Type informationids
- IDsname
- Namecontent
- Contentpublic Database getDatabase()
Relation
null
!getDatabase
in interface Relation<O>
public O get(DBID id)
Relation
public void set(DBID id, O val)
Relation
public void delete(DBID id)
public StaticDBIDs getDBIDs()
Relation
public IterableIterator<DBID> iterDBIDs()
Relation
public int size()
Relation
public SimpleTypeInformation<O> getDataTypeInformation()
Relation
getDataTypeInformation
in interface Relation<O>
public String getLongName()
Result
getLongName
in interface Result
public String getShortName()
Result
getShortName
in interface Result