|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.usergrid.persistence.cassandra.RelationManagerImpl
public class RelationManagerImpl
Field Summary | |
---|---|
static me.prettyprint.cassandra.serializers.ByteBufferSerializer |
be
|
static me.prettyprint.cassandra.serializers.LongSerializer |
le
|
static me.prettyprint.cassandra.serializers.StringSerializer |
se
|
static me.prettyprint.cassandra.serializers.UUIDSerializer |
ue
|
Constructor Summary | |
---|---|
RelationManagerImpl()
|
Method Summary | |
---|---|
Entity |
addToCollection(String collectionName,
EntityRef itemRef)
|
Entity |
addToCollections(List<EntityRef> owners,
String collectionName)
|
me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> |
batchAddConnectionIndexEntries(IndexUpdate indexUpdate,
IndexUpdate.IndexEntry entry,
ConnectionRefImpl connection,
UUID[] index_keys)
|
me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> |
batchAddToCollection(me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> batch,
String collectionName,
Entity entity,
UUID timestampUuid)
Batch add to collection. |
me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> |
batchAddToCollections(me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> batch,
String ownerType,
List<UUID> ownerIds,
String collectionName,
Entity entity,
UUID timestampUuid)
|
void |
batchCreateCollectionMembership(me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> batch,
EntityRef ownerRef,
String collectionName,
EntityRef itemRef,
EntityRef membershipRef,
UUID timestampUuid)
|
me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> |
batchDeleteConnectionIndexEntries(IndexUpdate indexUpdate,
IndexUpdate.IndexEntry entry,
ConnectionRefImpl connection,
UUID[] index_keys)
|
void |
batchDisconnect(me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> batch,
UUID timestampUuid)
|
me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> |
batchRemoveFromCollection(me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> batch,
String collectionName,
Entity entity,
boolean force,
UUID timestampUuid)
|
me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> |
batchRemoveFromCollection(me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> batch,
String collectionName,
Entity entity,
UUID timestampUuid)
Batch remove from collection. |
void |
batchRemoveFromContainers(me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> m,
UUID timestampUuid)
|
IndexUpdate |
batchStartIndexUpdate(me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> batch,
Entity entity,
String entryName,
Object entryValue,
UUID timestampUuid,
boolean schemaHasProperty,
boolean isMultiValue,
boolean removeListEntry,
boolean fulltextIndexed)
|
IndexUpdate |
batchStartIndexUpdate(me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> batch,
Entity entity,
String entryName,
Object entryValue,
UUID timestampUuid,
boolean schemaHasProperty,
boolean isMultiValue,
boolean removeListEntry,
boolean fulltextIndexed,
boolean skipRead)
|
IndexUpdate |
batchUpdateBackwardConnectionsDictionaryIndexes(IndexUpdate indexUpdate)
Batch update backword connections set indexes. |
IndexUpdate |
batchUpdateBackwardConnectionsPropertyIndexes(IndexUpdate indexUpdate)
Batch update backword connections property indexes. |
IndexUpdate |
batchUpdateCollectionIndex(IndexUpdate indexUpdate,
EntityRef owner,
String collectionName)
Batch update collection index. |
IndexUpdate |
batchUpdateConnectionIndex(IndexUpdate indexUpdate,
ConnectionRefImpl connection)
Batch update connection index. |
me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> |
batchUpdateEntityConnection(me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> batch,
boolean disconnect,
ConnectionRefImpl connection,
UUID timestampUuid)
|
void |
batchUpdatePropertyIndexes(me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> batch,
String propertyName,
Object propertyValue,
boolean entitySchemaHasProperty,
boolean noRead,
UUID timestampUuid)
|
void |
batchUpdateSetIndexes(me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> batch,
String setName,
Object elementValue,
boolean removeFromSet,
UUID timestampUuid)
|
boolean |
connectionExists(ConnectionRef connectionRef)
|
ConnectionRef |
connectionRef(ConnectedEntityRef... connections)
|
ConnectionRef |
connectionRef(String connectionType,
EntityRef connectedEntityRef)
|
ConnectionRef |
connectionRef(String pairedConnectionType,
EntityRef pairedEntity,
String connectionType,
EntityRef connectedEntityRef)
|
void |
copyRelationships(String srcRelationName,
EntityRef dstEntityRef,
String dstRelationName)
|
ConnectionRef |
createConnection(ConnectedEntityRef... connections)
|
ConnectionRef |
createConnection(ConnectionRef connection)
|
ConnectionRef |
createConnection(String connectionType,
EntityRef connectedEntityRef)
|
ConnectionRef |
createConnection(String pairedConnectionType,
EntityRef pairedEntity,
String connectionType,
EntityRef connectedEntityRef)
|
Entity |
createItemInCollection(String collectionName,
String itemType,
Map<String,Object> properties)
|
void |
deleteConnection(ConnectionRef connectionRef)
|
org.springframework.context.ApplicationContext |
getApplicationContext()
|
Map<String,Object> |
getAssociatedProperties(AssociatedEntityRef associatedEntityRef)
|
Object |
getAssociatedProperty(AssociatedEntityRef associatedEntityRef,
String propertyName)
|
Object |
getCFKeyForSubkey(CollectionInfo collection,
SliceNode node)
Gets the cF key for subkey. |
Results |
getCollection(String collectionName,
Query query,
Results.Level resultsLevel)
|
Results |
getCollection(String collectionName,
UUID startResult,
int count,
Results.Level resultsLevel,
boolean reversed)
|
Set<String> |
getCollectionIndexes(String collectionName)
|
Set<String> |
getCollections()
|
long |
getCollectionSize(String collectionName)
|
Results |
getConnectedEntities(String connectionType,
String connectedEntityType,
Results.Level resultsLevel)
|
Results |
getConnectingEntities(String connectionType,
String connectedEntityType,
Results.Level resultsLevel)
|
Set<String> |
getConnectionIndexes(ConnectionRefImpl connection)
|
Set<String> |
getConnectionIndexes(String connectionType)
|
List<ConnectionRefImpl> |
getConnections(ConnectionRefImpl connection,
boolean includeConnectionEntities)
Gets the connections. |
List<ConnectionRefImpl> |
getConnections(List<UUID> connectionIds)
|
List<ConnectedEntityRef> |
getConnections(Query query)
|
List<ConnectionRefImpl> |
getConnectionsWithEntity(UUID participatingEntityId)
|
Set<String> |
getConnectionTypes()
|
Set<String> |
getConnectionTypes(boolean filterConnection)
|
Set<String> |
getConnectionTypes(UUID connectedEntityId)
|
Map<EntityRef,Set<String>> |
getContainingCollections()
|
Results |
getIndexResults(List<me.prettyprint.hector.api.beans.HColumn<ByteBuffer,ByteBuffer>> results,
boolean compositeResults,
String connectionType,
String entityType,
Results.Level level)
Process index results. |
Map<String,Map<UUID,Set<String>>> |
getOwners()
|
RelationManagerImpl |
init(EntityManagerImpl em,
CassandraService cass,
UUID applicationId,
EntityRef headEntity,
IndexBucketLocator indexBucketLocator)
|
void |
removeFromCollection(String collectionName,
EntityRef itemRef)
|
Results |
searchCollection(String collectionName,
Query query)
|
Results |
searchConnectedEntities(Query query)
|
List<ConnectionRef> |
searchConnections(Query query)
|
List<me.prettyprint.hector.api.beans.HColumn<ByteBuffer,ByteBuffer>> |
searchIndex(Object indexKey,
String searchName,
Object searchStartValue,
Object searchFinishValue,
UUID startResult,
String cursor,
int count,
boolean reversed)
Search index. |
void |
setAssociatedProperty(AssociatedEntityRef associatedEntityRef,
String propertyName,
Object propertyValue)
|
void |
updateEntityConnection(boolean disconnect,
ConnectionRefImpl connection)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final me.prettyprint.cassandra.serializers.StringSerializer se
public static final me.prettyprint.cassandra.serializers.ByteBufferSerializer be
public static final me.prettyprint.cassandra.serializers.UUIDSerializer ue
public static final me.prettyprint.cassandra.serializers.LongSerializer le
Constructor Detail |
---|
public RelationManagerImpl()
Method Detail |
---|
public RelationManagerImpl init(EntityManagerImpl em, CassandraService cass, UUID applicationId, EntityRef headEntity, IndexBucketLocator indexBucketLocator)
public org.springframework.context.ApplicationContext getApplicationContext()
public List<ConnectionRefImpl> getConnections(ConnectionRefImpl connection, boolean includeConnectionEntities) throws Exception
applicationId
- the application idconnection
- the connection
Exception
- the exceptionpublic List<ConnectionRefImpl> getConnectionsWithEntity(UUID participatingEntityId) throws Exception
Exception
public List<ConnectionRefImpl> getConnections(List<UUID> connectionIds) throws Exception
Exception
public Object getCFKeyForSubkey(CollectionInfo collection, SliceNode node)
collection
- the collectionproperties
- the properties
public IndexUpdate batchUpdateCollectionIndex(IndexUpdate indexUpdate, EntityRef owner, String collectionName) throws Exception
batch
- the batchapplicationId
- the application idownerType
- the owner typeownerId
- the owner idjointOwnerId
- the joint owner idcollectionName
- the collection nameentityType
- the entity typeentityId
- the entity identityProperties
- the entity propertiesentryName
- the entry nameentryValue
- the entry valueisSet
- the is setremoveSetEntry
- the remove set entrytimestamp
- the timestamp
Exception
- the exceptionpublic Set<String> getCollectionIndexes(String collectionName) throws Exception
getCollectionIndexes
in interface RelationManager
Exception
public Map<EntityRef,Set<String>> getContainingCollections() throws Exception
Exception
public void batchCreateCollectionMembership(me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> batch, EntityRef ownerRef, String collectionName, EntityRef itemRef, EntityRef membershipRef, UUID timestampUuid) throws Exception
Exception
public me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> batchAddToCollection(me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> batch, String collectionName, Entity entity, UUID timestampUuid) throws Exception
batch
- the batchapplicationId
- the application idownerType
- the owner typeownerId
- the owner idjointOwnerId
- the joint owner idcollectionName
- the collection nameentityType
- the entity typeentityId
- the entity identityProperties
- the entity propertiestimestamp
- the timestamp
Exception
- the exceptionpublic me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> batchAddToCollections(me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> batch, String ownerType, List<UUID> ownerIds, String collectionName, Entity entity, UUID timestampUuid) throws Exception
Exception
public me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> batchRemoveFromCollection(me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> batch, String collectionName, Entity entity, UUID timestampUuid) throws Exception
batch
- the batchapplicationId
- the application idownerType
- the owner typeownerId
- the owner idcollectionName
- the collection nameentityType
- the entity typeentityId
- the entity identityProperties
- the entity propertiestimestamp
- the timestamp
Exception
- the exceptionpublic me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> batchRemoveFromCollection(me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> batch, String collectionName, Entity entity, boolean force, UUID timestampUuid) throws Exception
Exception
public me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> batchDeleteConnectionIndexEntries(IndexUpdate indexUpdate, IndexUpdate.IndexEntry entry, ConnectionRefImpl connection, UUID[] index_keys) throws Exception
Exception
public me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> batchAddConnectionIndexEntries(IndexUpdate indexUpdate, IndexUpdate.IndexEntry entry, ConnectionRefImpl connection, UUID[] index_keys)
public IndexUpdate batchUpdateConnectionIndex(IndexUpdate indexUpdate, ConnectionRefImpl connection) throws Exception
batch
- the batchapplicationId
- the application idconnection
- the connectionentryName
- the entry nameentryValue
- the entry valueisSet
- the is setremoveListEntry
- the remove set entrytimestamp
- the timestamp
Exception
- the exceptionpublic Set<String> getConnectionIndexes(ConnectionRefImpl connection) throws Exception
Exception
public IndexUpdate batchUpdateBackwardConnectionsPropertyIndexes(IndexUpdate indexUpdate) throws Exception
batch
- the batchapplicationId
- the application iditemType
- the item typeitemId
- the item idpropertyName
- the property namepropertyValue
- the property valuetimestamp
- the timestamp
Exception
- the exceptionpublic IndexUpdate batchUpdateBackwardConnectionsDictionaryIndexes(IndexUpdate indexUpdate) throws Exception
batch
- the batchapplicationId
- the application iditemType
- the item typeitemId
- the item idsetName
- the set nameproperty
- the propertyelementValue
- the set valueremoveFromSet
- the remove from settimestamp
- the timestamp
Exception
- the exceptionpublic me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> batchUpdateEntityConnection(me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> batch, boolean disconnect, ConnectionRefImpl connection, UUID timestampUuid) throws Exception
Exception
public void updateEntityConnection(boolean disconnect, ConnectionRefImpl connection) throws Exception
Exception
public void batchDisconnect(me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> batch, UUID timestampUuid) throws Exception
Exception
public IndexUpdate batchStartIndexUpdate(me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> batch, Entity entity, String entryName, Object entryValue, UUID timestampUuid, boolean schemaHasProperty, boolean isMultiValue, boolean removeListEntry, boolean fulltextIndexed) throws Exception
Exception
public IndexUpdate batchStartIndexUpdate(me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> batch, Entity entity, String entryName, Object entryValue, UUID timestampUuid, boolean schemaHasProperty, boolean isMultiValue, boolean removeListEntry, boolean fulltextIndexed, boolean skipRead) throws Exception
Exception
public void batchUpdatePropertyIndexes(me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> batch, String propertyName, Object propertyValue, boolean entitySchemaHasProperty, boolean noRead, UUID timestampUuid) throws Exception
Exception
public void batchUpdateSetIndexes(me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> batch, String setName, Object elementValue, boolean removeFromSet, UUID timestampUuid) throws Exception
Exception
public Results getIndexResults(List<me.prettyprint.hector.api.beans.HColumn<ByteBuffer,ByteBuffer>> results, boolean compositeResults, String connectionType, String entityType, Results.Level level) throws Exception
results
- the resultscompositeResults
- the composite resultscompositeOffset
- the composite offsetconnectionType
- the connection typeentityType
- the entity typeoutputList
- the output listoutputDetails
- the output details
Exception
- the exceptionpublic List<me.prettyprint.hector.api.beans.HColumn<ByteBuffer,ByteBuffer>> searchIndex(Object indexKey, String searchName, Object searchStartValue, Object searchFinishValue, UUID startResult, String cursor, int count, boolean reversed) throws Exception
applicationId
- the application idindexKey
- the index keysearchName
- the search namesearchStartValue
- the search start valuesearchFinishValue
- the search finish valuestartResult
- the start resultcount
- the count
Exception
- the exceptionpublic Map<String,Map<UUID,Set<String>>> getOwners() throws Exception
getOwners
in interface RelationManager
Exception
public Set<String> getCollections() throws Exception
getCollections
in interface RelationManager
Exception
public Results getCollection(String collectionName, UUID startResult, int count, Results.Level resultsLevel, boolean reversed) throws Exception
getCollection
in interface RelationManager
Exception
public long getCollectionSize(String collectionName) throws Exception
getCollectionSize
in interface RelationManager
Exception
public Results getCollection(String collectionName, Query query, Results.Level resultsLevel) throws Exception
getCollection
in interface RelationManager
Exception
public Entity addToCollection(String collectionName, EntityRef itemRef) throws Exception
addToCollection
in interface RelationManager
Exception
public Entity addToCollections(List<EntityRef> owners, String collectionName) throws Exception
addToCollections
in interface RelationManager
Exception
public Entity createItemInCollection(String collectionName, String itemType, Map<String,Object> properties) throws Exception
createItemInCollection
in interface RelationManager
Exception
public void removeFromCollection(String collectionName, EntityRef itemRef) throws Exception
removeFromCollection
in interface RelationManager
Exception
public void batchRemoveFromContainers(me.prettyprint.hector.api.mutation.Mutator<ByteBuffer> m, UUID timestampUuid) throws Exception
Exception
public void copyRelationships(String srcRelationName, EntityRef dstEntityRef, String dstRelationName) throws Exception
copyRelationships
in interface RelationManager
Exception
public Results searchCollection(String collectionName, Query query) throws Exception
searchCollection
in interface RelationManager
Exception
public ConnectionRef createConnection(ConnectionRef connection) throws Exception
createConnection
in interface RelationManager
Exception
public ConnectionRef createConnection(String connectionType, EntityRef connectedEntityRef) throws Exception
createConnection
in interface RelationManager
Exception
public ConnectionRef createConnection(String pairedConnectionType, EntityRef pairedEntity, String connectionType, EntityRef connectedEntityRef) throws Exception
createConnection
in interface RelationManager
Exception
public ConnectionRef createConnection(ConnectedEntityRef... connections) throws Exception
createConnection
in interface RelationManager
Exception
public ConnectionRef connectionRef(String connectionType, EntityRef connectedEntityRef) throws Exception
connectionRef
in interface RelationManager
Exception
public ConnectionRef connectionRef(String pairedConnectionType, EntityRef pairedEntity, String connectionType, EntityRef connectedEntityRef) throws Exception
connectionRef
in interface RelationManager
Exception
public ConnectionRef connectionRef(ConnectedEntityRef... connections)
connectionRef
in interface RelationManager
public void deleteConnection(ConnectionRef connectionRef) throws Exception
deleteConnection
in interface RelationManager
Exception
public boolean connectionExists(ConnectionRef connectionRef) throws Exception
connectionExists
in interface RelationManager
Exception
public Set<String> getConnectionTypes(UUID connectedEntityId) throws Exception
getConnectionTypes
in interface RelationManager
Exception
public Set<String> getConnectionTypes() throws Exception
getConnectionTypes
in interface RelationManager
Exception
public Set<String> getConnectionTypes(boolean filterConnection) throws Exception
getConnectionTypes
in interface RelationManager
Exception
public Results getConnectedEntities(String connectionType, String connectedEntityType, Results.Level resultsLevel) throws Exception
getConnectedEntities
in interface RelationManager
Exception
public Results getConnectingEntities(String connectionType, String connectedEntityType, Results.Level resultsLevel) throws Exception
getConnectingEntities
in interface RelationManager
Exception
public List<ConnectedEntityRef> getConnections(Query query) throws Exception
getConnections
in interface RelationManager
Exception
public Results searchConnectedEntities(Query query) throws Exception
searchConnectedEntities
in interface RelationManager
Exception
public List<ConnectionRef> searchConnections(Query query) throws Exception
searchConnections
in interface RelationManager
Exception
public Set<String> getConnectionIndexes(String connectionType) throws Exception
getConnectionIndexes
in interface RelationManager
Exception
public Object getAssociatedProperty(AssociatedEntityRef associatedEntityRef, String propertyName) throws Exception
getAssociatedProperty
in interface RelationManager
Exception
public Map<String,Object> getAssociatedProperties(AssociatedEntityRef associatedEntityRef) throws Exception
getAssociatedProperties
in interface RelationManager
Exception
public void setAssociatedProperty(AssociatedEntityRef associatedEntityRef, String propertyName, Object propertyValue) throws Exception
setAssociatedProperty
in interface RelationManager
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |