Class FilterResult
java.lang.Object
com.galliumdata.server.logic.FilterResult
- All Implemented Interfaces:
org.graalvm.polyglot.proxy.Proxy
,org.graalvm.polyglot.proxy.ProxyObject
A filter returns an instance of this class, which indicates to Gallium Data what to do.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
byte[]
int
boolean
boolean
boolean
isSkip()
boolean
/////////////////////////////////////////////////////////////////////void
setCloseConnection
(boolean closeConnection) If set to true, tell the server that this database connection should be terminated.void
setConnectionName
(String connectionName) void
setDoNotCall
(boolean doNotCall) If set to true, and we're in the middle of a result set, then the filter indicates that it does not want to be called for the rest of the result set.void
setErrorCode
(int code) If errorMessage is set, errorCode can also be set, and it will be part of the error message that is sent back to the client.void
setErrorMessage
(String errorMessage) If this is set to a string, then the server will return an error to the client rather than forward the packet.void
setErrorResponse
(byte[] bytes) If this is set, then the given bytes will be sent to the client instead of forwarding the packet.void
setFilterName
(String filterName) void
setResponse
(Object obj) Advanced filters can set this to the actual bytes that should be forwarded by the server instead of the current packet.void
setSkip
(boolean skip) If set to true, this tells the server to throw away the current packet and not forward it.void
setSqlStatus
(int n) void
setSuccess
(boolean success) Sets whether the filter has executed successfully and processing should continue normally.
-
Constructor Details
-
FilterResult
public FilterResult()
-
-
Method Details
-
isSuccess
public boolean isSuccess()///////////////////////////////////////////////////////////////////// -
setSuccess
public void setSuccess(boolean success) Sets whether the filter has executed successfully and processing should continue normally. If success is set to false, the server will throw an exception. -
isSkip
public boolean isSkip() -
setSkip
public void setSkip(boolean skip) If set to true, this tells the server to throw away the current packet and not forward it. -
getFilterName
-
setFilterName
-
getConnectionName
-
setConnectionName
-
getResponse
-
setResponse
Advanced filters can set this to the actual bytes that should be forwarded by the server instead of the current packet. -
getErrorMessage
-
setErrorMessage
If this is set to a string, then the server will return an error to the client rather than forward the packet. -
getErrorCode
public int getErrorCode() -
setErrorCode
public void setErrorCode(int code) If errorMessage is set, errorCode can also be set, and it will be part of the error message that is sent back to the client. -
getErrorParameters
-
getSqlStatus
public int getSqlStatus() -
setSqlStatus
public void setSqlStatus(int n) -
getErrorResponse
public byte[] getErrorResponse() -
setErrorResponse
public void setErrorResponse(byte[] bytes) If this is set, then the given bytes will be sent to the client instead of forwarding the packet. -
isCloseConnection
public boolean isCloseConnection() -
setCloseConnection
public void setCloseConnection(boolean closeConnection) If set to true, tell the server that this database connection should be terminated. -
isDoNotCall
public boolean isDoNotCall() -
setDoNotCall
public void setDoNotCall(boolean doNotCall) If set to true, and we're in the middle of a result set, then the filter indicates that it does not want to be called for the rest of the result set. This is useful if, for instance, the filter has determined that the result set does not contain any columns of interest, or if the user is not of interest.
-