public abstract class MMTable extends FunctionProvider
| Modifier and Type | Field and Description |
|---|---|
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
|
functions, getFunctions| Constructor and Description |
|---|
MMTable()
Empty constructor.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
addFunction, createParameters, getFunction, getFunctions, getFunctionValue, newFunctionInstanceprotected MMBase mmb
protected String tableName
protected int maxNodesFromQuery
protected StorageConnector storageConnector
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 forint value which is the object type (otype) of the node.protected List<MMObjectNode> getNodes(Collection<MMObjectNode> virtuals)
virtuals - containing virtual nodespublic 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 fulfillEnumeration 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 fulfillpublic List<MMObjectNode> getNodes()
MMBase 1.9-SNAPSHOT - ${javadoctimestamp}