|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectorg.mmbase.util.functions.FunctionProvider
org.mmbase.module.core.MMTable
public abstract class MMTable
MMTable is the base abstraction of a cloud of objects stored in one database table, essentially a cloud of objects of the same type. It provides a starting point for MMObjectBuilder by defining a scope - the database table - and basic functionality to create the table and query properties such as its size. This class does not contain actual management of nodes (this is left to MMOBjectBuilder).
| Field Summary | |
|---|---|
protected int |
maxNodesFromQuery
Maximum number of nodes to return on a query (-1 means no limit, and is also the default) |
protected MMBase |
mmb
The MMBase module that this table belongs to |
protected StorageConnector |
storageConnector
|
protected String |
tableName
The table name |
| Fields inherited from class org.mmbase.util.functions.FunctionProvider |
|---|
functions, getFunctions |
| Constructor Summary | |
|---|---|
MMTable()
Empty constructor. |
|
| Method Summary | |
|---|---|
int |
count(NodeSearchQuery query)
Counts number of nodes matching a specified constraint. |
int |
count(String where)
Deprecated. Use count(NodeSearchQuery)
instead. |
boolean |
created()
Check whether the table is accessible. |
String |
getFullTableName()
Retrieve the full table name (including the clouds' base name) |
MMBase |
getMMBase()
Return the MMBase object |
MMObjectNode |
getNode(int number,
boolean useCache)
Retrieves a node based on it's number (a unique key). |
List<MMObjectNode> |
getNodes()
Returns all the nodes from the builder. |
protected List<MMObjectNode> |
getNodes(Collection<MMObjectNode> virtuals)
Convert virtual nodes to real nodes based on their otype Normally a multirelations-search will return virtual nodes. |
List<MMObjectNode> |
getNodes(NodeSearchQuery query)
Returns nodes matching a specified constraint. |
int |
getNodeType(int number)
Retrieves an object's type. |
StorageConnector |
getStorageConnector()
|
String |
getTableName()
Retrieve the table name (without the clouds' base name) |
Enumeration<MMObjectNode> |
search(String where)
Deprecated. Use getNodes(NodeSearchQuery to perform a node search. |
Vector<MMObjectNode> |
searchVector(String where)
Deprecated. Use getNodes(NodeSearchQuery to perform a node search. |
void |
setMMBase(MMBase m)
Set the MMBase object, and retrieve the storage layer. |
void |
setTableName(String tableName)
Set tablename of the builder. |
int |
size()
Determine the number of objects in this table. |
| Methods inherited from class org.mmbase.util.functions.FunctionProvider |
|---|
addFunction, createParameters, getFunction, getFunctions, getFunctionValue, newFunctionInstance |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected MMBase mmb
protected String tableName
protected int maxNodesFromQuery
protected StorageConnector storageConnector
| Constructor Detail |
|---|
public MMTable()
| Method Detail |
|---|
public void setMMBase(MMBase m)
m - the MMBase object to set as owner of this builderpublic MMBase getMMBase()
public void setTableName(String tableName)
tableName - the name of the tablepublic String getTableName()
String containing the table namepublic String getFullTableName()
String containing the full table namepublic int size()
public boolean created()
true if the table is accessible, false otherwise.public StorageConnector getStorageConnector()
public MMObjectNode getNode(int number,
boolean useCache)
number - The number of the node to search foruseCache - If true, the node is retrieved from the node cache if possible.
null if the node does not exist, the key is invalid,or a
MMObjectNode containing the contents of the requested node.public int getNodeType(int number)
number - The number of the node to search for
int value which is the object type (otype) of the node.protected List<MMObjectNode> getNodes(Collection<MMObjectNode> virtuals)
virtuals - containing virtual nodes
public int count(String where)
count(NodeSearchQuery)
instead.
where - The constraint, can be a SQL where-clause, a MMNODE
expression or an altavista-formatted expression.
public int count(NodeSearchQuery query)
throws SearchQueryException
query - The query.
IllegalArgumentException - when an invalid argument is supplied.
SearchQueryException - when failing to retrieve the data.
public List<MMObjectNode> getNodes(NodeSearchQuery query)
throws SearchQueryException
query - The query.
IllegalArgumentException - When the nodetype specified
by the query is not the nodetype corresponding to this builder.
SearchQueryExceptionpublic Enumeration<MMObjectNode> search(String where)
getNodes(NodeSearchQuery to perform a node search.
where - scan expression that the objects need to fulfill
Enumeration containing all the objects that apply.public Vector<MMObjectNode> searchVector(String where)
getNodes(NodeSearchQuery to perform a node search.
where - scan expression that the objects need to fulfill
public List<MMObjectNode> getNodes()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||