Package step.client.collections.remote
Class RemoteCollection<T>
- java.lang.Object
-
- step.client.collections.remote.RemoteCollection<T>
-
- All Implemented Interfaces:
step.core.collections.Collection<T>
public class RemoteCollection<T> extends java.lang.Object implements step.core.collections.Collection<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected AbstractRemoteClient
client
protected java.lang.Class<T>
entityClass
protected java.lang.String
path
-
Constructor Summary
Constructors Constructor Description RemoteCollection(AbstractRemoteClient client, java.lang.String collection, java.lang.Class<T> entityClass)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
count(step.core.collections.Filter filter, java.lang.Integer limit)
void
createOrUpdateCompoundIndex(java.lang.String... fields)
void
createOrUpdateIndex(java.lang.String field)
java.util.List<java.lang.String>
distinct(java.lang.String columnName, step.core.collections.Filter filter)
void
drop()
long
estimatedCount()
java.util.stream.Stream<T>
find(step.core.collections.Filter filter, step.core.collections.SearchOrder order, java.lang.Integer skip, java.lang.Integer limit, int maxTime)
java.util.stream.Stream<T>
findReduced(step.core.collections.Filter filter, step.core.collections.SearchOrder order, java.lang.Integer skip, java.lang.Integer limit, int maxTime, java.util.List<java.lang.String> reduceFields)
protected java.lang.UnsupportedOperationException
notImplemented()
void
remove(step.core.collections.Filter filter)
void
rename(java.lang.String newName)
void
save(java.lang.Iterable<T> entities)
T
save(T entity)
-
-
-
Field Detail
-
path
protected final java.lang.String path
-
entityClass
protected final java.lang.Class<T> entityClass
-
client
protected AbstractRemoteClient client
-
-
Constructor Detail
-
RemoteCollection
public RemoteCollection(AbstractRemoteClient client, java.lang.String collection, java.lang.Class<T> entityClass)
-
-
Method Detail
-
find
public java.util.stream.Stream<T> find(step.core.collections.Filter filter, step.core.collections.SearchOrder order, java.lang.Integer skip, java.lang.Integer limit, int maxTime)
- Specified by:
find
in interfacestep.core.collections.Collection<T>
-
distinct
public java.util.List<java.lang.String> distinct(java.lang.String columnName, step.core.collections.Filter filter)
- Specified by:
distinct
in interfacestep.core.collections.Collection<T>
-
findReduced
public java.util.stream.Stream<T> findReduced(step.core.collections.Filter filter, step.core.collections.SearchOrder order, java.lang.Integer skip, java.lang.Integer limit, int maxTime, java.util.List<java.lang.String> reduceFields)
- Specified by:
findReduced
in interfacestep.core.collections.Collection<T>
-
remove
public void remove(step.core.collections.Filter filter)
- Specified by:
remove
in interfacestep.core.collections.Collection<T>
-
save
public void save(java.lang.Iterable<T> entities)
- Specified by:
save
in interfacestep.core.collections.Collection<T>
-
createOrUpdateIndex
public void createOrUpdateIndex(java.lang.String field)
- Specified by:
createOrUpdateIndex
in interfacestep.core.collections.Collection<T>
-
createOrUpdateCompoundIndex
public void createOrUpdateCompoundIndex(java.lang.String... fields)
- Specified by:
createOrUpdateCompoundIndex
in interfacestep.core.collections.Collection<T>
-
rename
public void rename(java.lang.String newName)
- Specified by:
rename
in interfacestep.core.collections.Collection<T>
-
drop
public void drop()
- Specified by:
drop
in interfacestep.core.collections.Collection<T>
-
notImplemented
protected java.lang.UnsupportedOperationException notImplemented()
-
count
public long count(step.core.collections.Filter filter, java.lang.Integer limit)
- Specified by:
count
in interfacestep.core.collections.Collection<T>
-
estimatedCount
public long estimatedCount()
- Specified by:
estimatedCount
in interfacestep.core.collections.Collection<T>
-
-