Class AbstractMongoDbFindDocuments
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.transformer.mongodbfinddocuments.AbstractMongoDbFindDocuments
-
- All Implemented Interfaces:
adams.core.Destroyable
,adams.core.GlobalInfoSupporter
,adams.core.logging.LoggingLevelHandler
,adams.core.logging.LoggingSupporter
,adams.core.option.OptionHandler
,adams.core.QuickInfoSupporter
,adams.core.SizeOfHandler
,adams.flow.core.FlowContextHandler
,MongoDbFindDocuments
,Serializable
public abstract class AbstractMongoDbFindDocuments extends adams.core.option.AbstractOptionHandler implements MongoDbFindDocuments
Ancestor for MongoDB collection update schemes.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected adams.flow.core.Actor
m_FlowContext
the context.
-
Constructor Summary
Constructors Constructor Description AbstractMongoDbFindDocuments()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected String
check(com.mongodb.client.MongoCollection coll)
Hook method for checking the collection before updating it.protected abstract com.mongodb.client.FindIterable<org.bson.Document>
doFind(com.mongodb.client.MongoCollection coll)
Filters the collection.com.mongodb.client.FindIterable<org.bson.Document>
find(com.mongodb.client.MongoCollection coll)
Filters the collection.adams.flow.core.Actor
getFlowContext()
Returns the context.String
getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.void
setFlowContext(adams.flow.core.Actor value)
Sets the context.-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, defineOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
-
-
-
Method Detail
-
setFlowContext
public void setFlowContext(adams.flow.core.Actor value)
Sets the context.- Specified by:
setFlowContext
in interfaceadams.flow.core.FlowContextHandler
- Parameters:
value
- the context
-
getFlowContext
public adams.flow.core.Actor getFlowContext()
Returns the context.- Specified by:
getFlowContext
in interfaceadams.flow.core.FlowContextHandler
- Returns:
- the context, null if none set
-
getQuickInfo
public String getQuickInfo()
Returns a quick info about the object, which can be displayed in the GUI.
Default implementation returns null.- Specified by:
getQuickInfo
in interfaceadams.core.QuickInfoSupporter
- Returns:
- null if no info available, otherwise short string
-
check
protected String check(com.mongodb.client.MongoCollection coll)
Hook method for checking the collection before updating it.- Parameters:
coll
- the collection to check- Returns:
- null if successful, otherwise error message
-
doFind
protected abstract com.mongodb.client.FindIterable<org.bson.Document> doFind(com.mongodb.client.MongoCollection coll)
Filters the collection.- Parameters:
coll
- the collection to filter- Returns:
- the documents matching the query
-
find
public com.mongodb.client.FindIterable<org.bson.Document> find(com.mongodb.client.MongoCollection coll)
Filters the collection.- Specified by:
find
in interfaceMongoDbFindDocuments
- Parameters:
coll
- the collection to filter- Returns:
- the documents matching the query
- Throws:
IllegalStateException
- if check fails- See Also:
check(MongoCollection)
-
-