org.usergrid.persistence
Class Results
java.lang.Object
org.usergrid.persistence.Results
- All Implemented Interfaces:
- Iterable<Entity>
public class Results
- extends Object
- implements Iterable<Entity>
Method Summary |
void |
and(Results results)
Perform an intersection of the 2 results |
Results |
excludeCursorMetadataAttribute()
|
Results |
findForProperty(String propertyName,
Object propertyValue)
|
Results |
findForProperty(String propertyName,
Object propertyValue,
int count)
|
static Results |
fromConnections(List<? extends ConnectionRef> connections)
|
static Results |
fromConnections(List<? extends ConnectionRef> connections,
boolean forward)
|
static Results |
fromCounters(AggregateCounterSet counters)
|
static Results |
fromCounters(List<AggregateCounterSet> counters)
|
static Results |
fromData(Object obj)
|
static Results |
fromEntities(List<? extends Entity> l)
|
static Results |
fromEntity(Entity e)
|
static Results |
fromId(UUID id)
|
static Results |
fromIdList(List<UUID> l)
|
static Results |
fromIdList(List<UUID> l,
String type)
|
static Results |
fromRef(EntityRef ref)
|
static Results |
fromRefList(List<EntityRef> l)
|
List<ConnectionRef> |
getConnections()
|
List<AggregateCounterSet> |
getCounters()
|
String |
getCursor()
|
Object |
getData()
|
List<Entity> |
getEntities()
|
List<Entity> |
getEntitiesByType(String type)
|
Map<UUID,Entity> |
getEntitiesMap()
|
Entity |
getEntity()
|
List<EntityRef> |
getEntityRefsByType(String type)
|
UUID |
getId()
|
List<UUID> |
getIds()
|
Set<UUID> |
getIdSet()
|
Results.Level |
getLevel()
|
|
getList()
|
UUID |
getNextResult()
|
Object |
getObject()
|
String |
getObjectName()
|
Query |
getQuery()
|
EntityRef |
getRef()
|
List<EntityRef> |
getRefs()
|
Map<UUID,EntityRef> |
getRefsMap()
|
Set<String> |
getTypes()
|
boolean |
hasConnections()
|
boolean |
hasData()
|
boolean |
hasMoreResults()
|
Iterator<UUID> |
idIterator()
|
void |
init()
|
boolean |
isEmpty()
|
Iterator<Entity> |
iterator()
|
|
iterator(Class<E> cls)
|
void |
merge(Results results)
|
void |
mergeEntitiesWithMetadata()
|
void |
replace(Entity entity)
|
void |
setCounters(List<AggregateCounterSet> counters)
|
void |
setCursor(String cursor)
|
void |
setCursorMax()
Set the cursor to the empty value. |
void |
setCursorToLastResult()
|
void |
setData(Object data)
|
void |
setDataName(String dataName)
|
void |
setEntities(List<? extends Entity> resultsEntities)
|
void |
setEntity(Entity resultEntity)
|
void |
setIds(List<UUID> resultsIds)
|
void |
setMetadata(Map<UUID,Map<String,Object>> metadata)
|
void |
setMetadata(UUID id,
Map<String,Object> data)
|
void |
setMetadata(UUID id,
String name,
Object value)
|
void |
setNextResult(UUID nextResult)
|
void |
setQuery(Query query)
|
void |
setRef(EntityRef ref)
|
void |
setRefs(List<EntityRef> resultsRefs)
|
int |
size()
|
Results |
startingFrom(UUID entityId)
|
void |
subtract(Results results)
Remove the passed in results from the current results |
Results |
trim(int count)
|
Results |
withCounters(List<AggregateCounterSet> counters)
|
Results |
withCursor(String cursor)
|
Results |
withData(Object data)
|
Results |
withDataName(String dataName)
|
Results |
withEntities(List<? extends Entity> resultsEntities)
|
Results |
withEntity(Entity resultEntity)
|
Results |
withIds(List<UUID> resultsIds)
|
Results |
withMetadata(Map<UUID,Map<String,Object>> metadata)
|
Results |
withMetadata(UUID id,
Map<String,Object> data)
|
Results |
withMetadata(UUID id,
String name,
Object value)
|
Results |
withNextResult(UUID nextResult)
|
Results |
withQuery(Query query)
|
Results |
withRef(EntityRef ref)
|
Results |
withRefs(List<EntityRef> resultsRefs)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Results
public Results()
Results
public Results(Results r)
init
public void init()
fromIdList
public static Results fromIdList(List<UUID> l)
fromIdList
public static Results fromIdList(List<UUID> l,
String type)
fromId
public static Results fromId(UUID id)
fromRefList
public static Results fromRefList(List<EntityRef> l)
fromEntities
public static Results fromEntities(List<? extends Entity> l)
fromEntity
public static Results fromEntity(Entity e)
fromRef
public static Results fromRef(EntityRef ref)
fromData
public static Results fromData(Object obj)
fromCounters
public static Results fromCounters(AggregateCounterSet counters)
fromCounters
public static Results fromCounters(List<AggregateCounterSet> counters)
fromConnections
public static Results fromConnections(List<? extends ConnectionRef> connections)
fromConnections
public static Results fromConnections(List<? extends ConnectionRef> connections,
boolean forward)
getLevel
public Results.Level getLevel()
getQuery
public Query getQuery()
setQuery
public void setQuery(Query query)
withQuery
public Results withQuery(Query query)
getId
public UUID getId()
getIds
public List<UUID> getIds()
setIds
public void setIds(List<UUID> resultsIds)
withIds
public Results withIds(List<UUID> resultsIds)
getIdSet
public Set<UUID> getIdSet()
getRefs
public List<EntityRef> getRefs()
setRefs
public void setRefs(List<EntityRef> resultsRefs)
withRefs
public Results withRefs(List<EntityRef> resultsRefs)
setRef
public void setRef(EntityRef ref)
withRef
public Results withRef(EntityRef ref)
getRef
public EntityRef getRef()
getRefsMap
public Map<UUID,EntityRef> getRefsMap()
getEntity
public Entity getEntity()
setEntity
public void setEntity(Entity resultEntity)
withEntity
public Results withEntity(Entity resultEntity)
idIterator
public Iterator<UUID> idIterator()
getEntities
public List<Entity> getEntities()
getEntitiesMap
public Map<UUID,Entity> getEntitiesMap()
getEntityRefsByType
public List<EntityRef> getEntityRefsByType(String type)
getEntitiesByType
public List<Entity> getEntitiesByType(String type)
getTypes
public Set<String> getTypes()
merge
public void merge(Results results)
subtract
public void subtract(Results results)
- Remove the passed in results from the current results
- Parameters:
results
-
and
public void and(Results results)
- Perform an intersection of the 2 results
- Parameters:
results
-
replace
public void replace(Entity entity)
startingFrom
public Results startingFrom(UUID entityId)
getList
public <E extends Entity> List<E> getList()
iterator
public <E extends Entity> Iterator<E> iterator(Class<E> cls)
iterator
public Iterator<Entity> iterator()
- Specified by:
iterator
in interface Iterable<Entity>
findForProperty
public Results findForProperty(String propertyName,
Object propertyValue)
findForProperty
public Results findForProperty(String propertyName,
Object propertyValue,
int count)
setEntities
public void setEntities(List<? extends Entity> resultsEntities)
withEntities
public Results withEntities(List<? extends Entity> resultsEntities)
hasConnections
public boolean hasConnections()
getConnections
public List<ConnectionRef> getConnections()
getObject
public Object getObject()
getObjectName
public String getObjectName()
setDataName
public void setDataName(String dataName)
withDataName
public Results withDataName(String dataName)
hasData
public boolean hasData()
setData
public void setData(Object data)
withData
public Results withData(Object data)
getData
public Object getData()
getCounters
public List<AggregateCounterSet> getCounters()
setCounters
public void setCounters(List<AggregateCounterSet> counters)
withCounters
public Results withCounters(List<AggregateCounterSet> counters)
size
public int size()
isEmpty
public boolean isEmpty()
getNextResult
public UUID getNextResult()
excludeCursorMetadataAttribute
public Results excludeCursorMetadataAttribute()
trim
public Results trim(int count)
hasMoreResults
public boolean hasMoreResults()
setNextResult
public void setNextResult(UUID nextResult)
withNextResult
public Results withNextResult(UUID nextResult)
getCursor
public String getCursor()
setCursorToLastResult
public void setCursorToLastResult()
setCursorMax
public void setCursorMax()
- Set the cursor to the empty value. This signifies that no more results can be found for this range
setCursor
public void setCursor(String cursor)
withCursor
public Results withCursor(String cursor)
setMetadata
public void setMetadata(UUID id,
String name,
Object value)
withMetadata
public Results withMetadata(UUID id,
String name,
Object value)
setMetadata
public void setMetadata(UUID id,
Map<String,Object> data)
withMetadata
public Results withMetadata(UUID id,
Map<String,Object> data)
setMetadata
public void setMetadata(Map<UUID,Map<String,Object>> metadata)
withMetadata
public Results withMetadata(Map<UUID,Map<String,Object>> metadata)
mergeEntitiesWithMetadata
public void mergeEntitiesWithMetadata()
Copyright © 2013. All Rights Reserved.