Holger's
Java API

com.antelmann.sql
Interface RelationshipManager

All Superinterfaces:
TransactionRequired
All Known Implementing Classes:
GPersonRelationStore, RelationshipStore

public interface RelationshipManager
extends TransactionRequired

allows to effectively work with relationships stored in a relational database.

Since:
14.04.2009, 16:40:03
Author:
Holger Antelmann
See Also:
Database.queryStoreForInterface(Class, Class)

Nested Class Summary
static class RelationshipManager.Column
          provides the topics for the mapping of the store
 
Method Summary
 int countRelations(Map<RelationshipManager.Column,Object> restrictions)
          the mapped values for the class columns RelationshipManager.Column.TO_CLASS and RelationshipManager.Column.FROM_CLASS may be represented as Class
 EntryClassMapper getEntryClassMapper()
          returns the EntryClassMapper used by the store to map the class of the references
 boolean hasRelationships(DBReference ref)
          determines if there are any relationsips present for a given reference (both: active and passive)
 Set<DefaultEntryRelationship> listAllRelations(DBReference ref, Object relationType)
          contains passive and active relationships for the given reference - restricted to the given type if non-null
 List<DefaultEntryRelationship> listRelations(Map<RelationshipManager.Column,Object> restrictions)
          the mapped values for the class columns RelationshipManager.Column.TO_CLASS and RelationshipManager.Column.FROM_CLASS may be represented as Class
 

Method Detail

listRelations

List<DefaultEntryRelationship> listRelations(Map<RelationshipManager.Column,Object> restrictions)
                                             throws DatabaseException
the mapped values for the class columns RelationshipManager.Column.TO_CLASS and RelationshipManager.Column.FROM_CLASS may be represented as Class objects as an alternative to the class name base on EntryClassMapper.STRING_MAPPER.

Throws:
DatabaseException

countRelations

int countRelations(Map<RelationshipManager.Column,Object> restrictions)
                   throws DatabaseException
the mapped values for the class columns RelationshipManager.Column.TO_CLASS and RelationshipManager.Column.FROM_CLASS may be represented as Class objects as an alternative to the class name base on EntryClassMapper.STRING_MAPPER.

Throws:
DatabaseException

hasRelationships

boolean hasRelationships(DBReference ref)
                         throws DatabaseException
determines if there are any relationsips present for a given reference (both: active and passive)

Throws:
DatabaseException

listAllRelations

Set<DefaultEntryRelationship> listAllRelations(DBReference ref,
                                               Object relationType)
                                               throws DatabaseException
contains passive and active relationships for the given reference - restricted to the given type if non-null

Throws:
DatabaseException

getEntryClassMapper

EntryClassMapper getEntryClassMapper()
returns the EntryClassMapper used by the store to map the class of the references



(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads