Holger's Java API

## com.antelmann.db
Class DefaultSpecialRelationship<F extends DBEntry,T extends DBEntry,R>

    java.lang.Object
      com.antelmann.db.AbstractDBEntry
          com.antelmann.db.DefaultEntryRelationship
              com.antelmann.db.DefaultSpecialRelationship<F,T,R>

All Implemented Interfaces:
  DBEntry, EntryRelationship, SpecialRelationship<F,T,R>, LifeCycleObject, Serializable

Direct Known Subclasses:
  FriendsEntry, GEventRelation, GPersonRelation

    public class DefaultSpecialRelationship<F extends DBEntry,T extends DBEntry,R>

extends DefaultEntryRelationship
implements SpecialRelationship<F,T,R>

provides a default implementation for SpecialRelationships. Subclasses are encouraged to provide strict type checking; this implementation may be used unsafe.

Since:
  12.09.2008, 23:56:48
Author:
  Holger Antelmann
See Also:
  Serialized Form

Field Summary

Fields inherited from interface com.antelmann.db.DBEntry
`ENTRY_FLAVOR, ENTRY_LIST_FLAVOR`

Constructor Summary
`DefaultSpecialRelationship(Object id, EntryRelationship er)`
`DefaultSpecialRelationship(Object id, Stub<F> fromReference, Stub<T> toReference, R type)`
`DefaultSpecialRelationship(Object id, Stub<F> fromReference, Stub<T> toReference, R type, boolean bidirectional)`

Method Summary
`Stub<F>` `getFromReference()` represents the first entry of this relationship
`R` `getRelationType()` defines the kind of relationship
`Stub<T>` `getToReference()` represents the second entry of this relationship

Methods inherited from class com.antelmann.db.DefaultEntryRelationship
`getBeginTime, getComment, getEndTime, getFromReferenceString, getRelationOption, getReverseRelationship, getToReferenceString, isBidirectional, isBroken, sameAs, setBeginTime, setComment, setEndTime, setRelationOption, toString`

Methods inherited from class com.antelmann.db.AbstractDBEntry
`equals, getID, hashCode, hashEntry, sameEntry`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Methods inherited from interface com.antelmann.db.EntryRelationship
`getComment, getRelationOption, isBidirectional`

Methods inherited from interface com.antelmann.db.DBEntry
`getID`

Methods inherited from interface com.antelmann.util.LifeCycleObject
`getBeginTime, getEndTime`

Constructor Detail

### DefaultSpecialRelationship

    public DefaultSpecialRelationship(Object id,
                                      EntryRelationship er)
                               throws IllegalArgumentException

Throws:
  `IllegalArgumentException`

### DefaultSpecialRelationship

    public DefaultSpecialRelationship(Object id,
                                      Stub<F> fromReference,
                                      Stub<T> toReference,
                                      R type)

### DefaultSpecialRelationship

    public DefaultSpecialRelationship(Object id,
                                      Stub<F> fromReference,
                                      Stub<T> toReference,
                                      R type,
                                      boolean bidirectional)

Method Detail

### getFromReference

    public Stub<F> getFromReference()

  Description copied from interface: `EntryRelationship`
  represents the first entry of this relationship

  Specified by:
    `getFromReference` in interface `EntryRelationship`
  Specified by:
    `getFromReference` in interface `SpecialRelationship<F extends DBEntry,T extends DBEntry,R>`
  Overrides:
    `getFromReference` in class `DefaultEntryRelationship`

### getToReference

    public Stub<T> getToReference()

  Description copied from interface: `EntryRelationship`
  represents the second entry of this relationship

  Specified by:
    `getToReference` in interface `EntryRelationship`
  Specified by:
    `getToReference` in interface `SpecialRelationship<F extends DBEntry,T extends DBEntry,R>`
  Overrides:
    `getToReference` in class `DefaultEntryRelationship`

### getRelationType

    public R getRelationType()

  Description copied from interface: `EntryRelationship`
  defines the kind of relationship

  Specified by:
    `getRelationType` in interface `EntryRelationship`
  Specified by:
    `getRelationType` in interface `SpecialRelationship<F extends DBEntry,T extends DBEntry,R>`
  Overrides:
    `getRelationType` in class `DefaultEntryRelationship`

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