Package org.apache.jackrabbit.rmi.server
Class ServerQuery
- java.lang.Object
-
- java.rmi.server.RemoteObject
-
- java.rmi.server.RemoteServer
-
- java.rmi.server.UnicastRemoteObject
-
- org.apache.jackrabbit.rmi.server.ServerObject
-
- org.apache.jackrabbit.rmi.server.ServerQuery
-
- All Implemented Interfaces:
Serializable
,Remote
,RemoteQuery
public class ServerQuery extends ServerObject implements RemoteQuery
Remote adapter for the JCRQuery
interface. This class makes a local session available as an RMI service using theRemoteQuery
interface.- See Also:
Query
,RemoteQuery
, Serialized Form
-
-
Field Summary
-
Fields inherited from class java.rmi.server.RemoteObject
ref
-
-
Constructor Summary
Constructors Constructor Description ServerQuery(Query query, RemoteAdapterFactory factory)
Creates a remote adapter for the given localQuery
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bindValue(String varName, Value value)
RemoteQueryResult
execute()
String[]
getBindVariableNames()
String
getLanguage()
String
getStatement()
String
getStoredQueryPath()
void
setLimit(long limit)
void
setOffset(long offset)
RemoteNode
storeAsNode(String absPath)
-
Methods inherited from class org.apache.jackrabbit.rmi.server.ServerObject
getFactory, getRemoteItem, getRemoteNode, getRemoteNodeTypeArray, getRepositoryException, getSerialValue, getSerialValues
-
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, exportObject, exportObject, unexportObject
-
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
-
-
-
-
Constructor Detail
-
ServerQuery
public ServerQuery(Query query, RemoteAdapterFactory factory) throws RemoteException
Creates a remote adapter for the given localQuery
.- Parameters:
query
- localQuery
factory
- remote adapter factory- Throws:
RemoteException
- on RMI errors
-
-
Method Detail
-
execute
public RemoteQueryResult execute() throws RepositoryException, RemoteException
- Specified by:
execute
in interfaceRemoteQuery
- Returns:
- a
QueryResult
- Throws:
RepositoryException
- on repository errorsRemoteException
- on RMI errors- See Also:
Query.execute()
-
getStatement
public String getStatement() throws RemoteException
- Specified by:
getStatement
in interfaceRemoteQuery
- Returns:
- the query statement.
- Throws:
RemoteException
- on RMI errors- See Also:
Query.getStatement()
-
getLanguage
public String getLanguage() throws RemoteException
- Specified by:
getLanguage
in interfaceRemoteQuery
- Returns:
- the query language.
- Throws:
RemoteException
- on RMI errors- See Also:
Query.getLanguage()
-
getStoredQueryPath
public String getStoredQueryPath() throws RepositoryException, RemoteException
- Specified by:
getStoredQueryPath
in interfaceRemoteQuery
- Returns:
- path of the node representing this query.
- Throws:
RepositoryException
- on repository errorsRemoteException
- on RMI errors- See Also:
Query.getStoredQueryPath()
-
storeAsNode
public RemoteNode storeAsNode(String absPath) throws RepositoryException, RemoteException
- Specified by:
storeAsNode
in interfaceRemoteQuery
- Parameters:
absPath
- path at which to persist this query.- Returns:
- stored node
- Throws:
RepositoryException
- on repository errorsRemoteException
- on RMI errors- See Also:
Query.storeAsNode(String)
-
bindValue
public void bindValue(String varName, Value value) throws RepositoryException, RemoteException
- Specified by:
bindValue
in interfaceRemoteQuery
- Parameters:
varName
- name of variable in queryvalue
- value to bind- Throws:
RepositoryException
- on repository errorsRemoteException
- on RMI errors- See Also:
Query.bindValue(String, Value)
-
getBindVariableNames
public String[] getBindVariableNames() throws RepositoryException, RemoteException
- Specified by:
getBindVariableNames
in interfaceRemoteQuery
- Returns:
- the names of the bind variables in this query.
- Throws:
RepositoryException
- on repository errorsRemoteException
- on RMI errors- See Also:
Query.getBindVariableNames()
-
setLimit
public void setLimit(long limit) throws RemoteException
- Specified by:
setLimit
in interfaceRemoteQuery
- Parameters:
limit
- along
- Throws:
RemoteException
- on RMI errors- See Also:
Query.setLimit(long)
-
setOffset
public void setOffset(long offset) throws RemoteException
- Specified by:
setOffset
in interfaceRemoteQuery
- Parameters:
offset
- along
- Throws:
RemoteException
- on RMI errors- See Also:
Query.setOffset(long)
-
-