Package ome.services.blitz.impl
Class TableCloserI
- java.lang.Object
-
- ome.services.blitz.impl.AbstractAmdServant
-
- ome.services.blitz.impl.AbstractCloseableAmdServant
-
- ome.services.blitz.impl.TableCloserI
-
- All Implemented Interfaces:
_ServiceInterfaceOperations,_StatefulServiceInterfaceOperations,_TableOperations,CloseableServant,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware
public class TableCloserI extends AbstractCloseableAmdServant implements _StatefulServiceInterfaceOperations, _TableOperations
Blitz-specific wrapper for table proxies to facilitate the cleanup of files on session exit.
-
-
Constructor Summary
Constructors Constructor Description TableCloserI(ServiceFactoryI sf, TablePrx tablePrx, Ice.Identity id)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intaddColumn(Column col, Ice.Current __current)Adds a column and returns the position index of the new column.voidaddData(Column[] cols, Ice.Current __current)voiddelete(Ice.Current __current)java.util.Map<java.lang.String,RType>getAllMetadata(Ice.Current __current)Column[]getHeaders(Ice.Current __current)Returns empty columns.RTypegetMetadata(java.lang.String key, Ice.Current __current)longgetNumberOfRows(Ice.Current __current)Return the number of rows of a table.OriginalFilegetOriginalFile(Ice.Current __current)TablePrxgetProxy()long[]getWhereList(java.lang.String condition, java.util.Map<java.lang.String,RType> variables, long start, long stop, long step, Ice.Current __current)Run a query on a table.voidinitialize(Column[] cols, Ice.Current __current)Initializes the structure based onprotected voidpostClose(Ice.Current current)Should not throw any exceptions which should be detected by clients since it is called in a finally block after the client thread has been released.protected voidpreClose(Ice.Current current)Dataread(long[] colNumbers, long start, long stop, Ice.Current __current)Read a subset of columns and consecutive rows from a table.DatareadCoordinates(long[] rowNumbers, Ice.Current __current)Read a set of entire rows in the table.voidsetAllMetadata(java.util.Map<java.lang.String,RType> dict, Ice.Current __current)voidsetMetadata(java.lang.String key, RType value, Ice.Current __current)Dataslice(long[] colNumbers, long[] rowNumbers, Ice.Current __current)Read a subset of columns and consecutive rows from a table.voidupdate(Data modifiedData, Ice.Current __current)Allows the user to modify a Data instance passed back from a query method and have the values modified.-
Methods inherited from class ome.services.blitz.impl.AbstractCloseableAmdServant
close, close_async
-
Methods inherited from class ome.services.blitz.impl.AbstractAmdServant
activate_async, applyHardWiredInterceptors, callInvokerOnMappedArgs, callInvokerOnRawArgs, executorWorkCall, getCurrentEventContext_async, onSetOmeroContext, passivate_async, runnableCall, safeRunnableCall, setApplicationContext, setHolder
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface omero.api._StatefulServiceInterfaceOperations
activate_async, close_async, getCurrentEventContext_async, passivate_async
-
Methods inherited from interface omero.grid._TableOperations
close
-
-
-
-
Constructor Detail
-
TableCloserI
public TableCloserI(ServiceFactoryI sf, TablePrx tablePrx, Ice.Identity id) throws ServerError
- Throws:
ServerError
-
-
Method Detail
-
getProxy
public TablePrx getProxy()
-
preClose
protected void preClose(Ice.Current current) throws java.lang.Throwable- Specified by:
preClosein classAbstractCloseableAmdServant- Throws:
java.lang.Throwable
-
postClose
protected void postClose(Ice.Current current)
Description copied from class:AbstractCloseableAmdServantShould not throw any exceptions which should be detected by clients since it is called in a finally block after the client thread has been released.- Specified by:
postClosein classAbstractCloseableAmdServant
-
getOriginalFile
public OriginalFile getOriginalFile(Ice.Current __current) throws ServerError
- Specified by:
getOriginalFilein interface_TableOperations- Throws:
ServerError
-
getHeaders
public Column[] getHeaders(Ice.Current __current) throws ServerError
Description copied from interface:_TableOperationsReturns empty columns.- Specified by:
getHeadersin interface_TableOperations- Parameters:
__current- The Current object for the invocation.- Throws:
ServerError
-
getNumberOfRows
public long getNumberOfRows(Ice.Current __current) throws ServerErrorDescription copied from interface:_TableOperationsReturn the number of rows of a table.- Specified by:
getNumberOfRowsin interface_TableOperations- Parameters:
__current- The Current object for the invocation.- Throws:
ServerError
-
getWhereList
public long[] getWhereList(java.lang.String condition, java.util.Map<java.lang.String,RType> variables, long start, long stop, long step, Ice.Current __current) throws ServerErrorDescription copied from interface:_TableOperationsRun a query on a table. The meaning of the start and stop parameters are the same as in the built-in Python slices. Setting start, step and stop to 0 is interpreted as running the query against all rows.- Specified by:
getWhereListin interface_TableOperations- Parameters:
condition- A query string - see the tables query language for more details.variables- A mapping of strings and variable values to be substituted into condition. This can often be left empty.start- The start of the range of rows to consider.stop- The end of the range of rows to consider.step- The stepping interval of the range of rows to consider. Set to 0 to disable stepping.__current- The Current object for the invocation.- Returns:
- A list of row indices matching the condition which can be passed as a
parameter of
_TableOperations.readCoordinates(long[], Ice.Current)or_TableOperations.slice(long[], long[], Ice.Current). - Throws:
ServerError
-
readCoordinates
public Data readCoordinates(long[] rowNumbers, Ice.Current __current) throws ServerError
Description copied from interface:_TableOperationsRead a set of entire rows in the table.- Specified by:
readCoordinatesin interface_TableOperations- Parameters:
rowNumbers- A list of row indices to be retrieved from the table. The indices may be non-consecutive and must contain at least one element or anApiUsageExceptionwill be thrown.__current- The Current object for the invocation.- Returns:
- The requested rows as a
Dataobject. The results will be returned in the same order as the row indices. - Throws:
ServerError
-
read
public Data read(long[] colNumbers, long start, long stop, Ice.Current __current) throws ServerError
Description copied from interface:_TableOperationsRead a subset of columns and consecutive rows from a table. The meaning of the start and stop parameters are the same as in the built-in Python slices. Setting both start and stop to 0 is interpreted as returning all rows.- Specified by:
readin interface_TableOperations- Parameters:
colNumbers- A list of column indices to be retrieved from the table. The indices may be non-consecutive and must contain at least one element or anApiUsageExceptionwill be thrown.start- The first element of the range of rows to retrieve. Must be non null.stop- The stop of the range of rows to retrieve. Must be non null.__current- The Current object for the invocation.- Returns:
- The requested columns and rows as a
Dataobject. - Throws:
ServerError
-
slice
public Data slice(long[] colNumbers, long[] rowNumbers, Ice.Current __current) throws ServerError
Description copied from interface:_TableOperationsRead a subset of columns and consecutive rows from a table.- Specified by:
slicein interface_TableOperations- Parameters:
colNumbers- A list of column indices to be retrieved from the table. The indices may be non-consecutive. If set to empty or null, all columns will be returned.rowNumbers- A list of row indices to be retrieved from the table. The indices may be non-consecutive. If set empty or null, all rows will be returned.__current- The Current object for the invocation.- Returns:
- The requested columns and rows as a
Dataobject. The results will be returned in the same order as the column and row indices. - Throws:
ServerError
-
addData
public void addData(Column[] cols, Ice.Current __current) throws ServerError
- Specified by:
addDatain interface_TableOperations- Throws:
ServerError
-
update
public void update(Data modifiedData, Ice.Current __current) throws ServerError
Description copied from interface:_TableOperationsAllows the user to modify a Data instance passed back from a query method and have the values modified. It is critical that theData.lastModificationand theData.rowNumbersfields are properly set. An exception will be thrown if the data has since been modified.- Specified by:
updatein interface_TableOperations__current- The Current object for the invocation.- Throws:
ServerError
-
getAllMetadata
public java.util.Map<java.lang.String,RType> getAllMetadata(Ice.Current __current) throws ServerError
- Specified by:
getAllMetadatain interface_TableOperations- Throws:
ServerError
-
getMetadata
public RType getMetadata(java.lang.String key, Ice.Current __current) throws ServerError
- Specified by:
getMetadatain interface_TableOperations- Throws:
ServerError
-
setAllMetadata
public void setAllMetadata(java.util.Map<java.lang.String,RType> dict, Ice.Current __current) throws ServerError
- Specified by:
setAllMetadatain interface_TableOperations- Throws:
ServerError
-
setMetadata
public void setMetadata(java.lang.String key, RType value, Ice.Current __current) throws ServerError- Specified by:
setMetadatain interface_TableOperations- Throws:
ServerError
-
initialize
public void initialize(Column[] cols, Ice.Current __current) throws ServerError
Description copied from interface:_TableOperationsInitializes the structure based on- Specified by:
initializein interface_TableOperations__current- The Current object for the invocation.- Throws:
ServerError
-
addColumn
public int addColumn(Column col, Ice.Current __current) throws ServerError
Description copied from interface:_TableOperationsAdds a column and returns the position index of the new column.- Specified by:
addColumnin interface_TableOperations__current- The Current object for the invocation.- Throws:
ServerError
-
delete
public void delete(Ice.Current __current) throws ServerError- Specified by:
deletein interface_TableOperations- Throws:
ServerError
-
-