Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.cache.pojo.impl
Class ReferenceImpl

    java.lang.Object
      org.jboss.cache.pojo.impl.ReferenceImpl

All Implemented Interfaces:
  Serializable, Reference

    @Immutable
    public final class ReferenceImpl

extends Object
implements Reference, Serializable

A reference from an attached object to another attached object. This class also contains the name of the field that contains the reference.

Author:
  Dan Berindei
See Also:
  Serialized Form

Constructor Summary
`ReferenceImpl(Fqn<?> fqn)`
`ReferenceImpl(Fqn<?> fqn, String key)`

Method Summary
`boolean` | `equals(Object o)`
`Fqn<?>` | `getFqn()` Returns the Fqn of the referring node.
`String` | `getKey()` Returns the name of the node key which references the attached object, or null if the Fqn is a normal alias to the internal node.
`int` | `hashCode()`
`String` | `toString()`

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

Constructor Detail

### ReferenceImpl

    public ReferenceImpl(Fqn<?> fqn)

### ReferenceImpl

    public ReferenceImpl(Fqn<?> fqn,
                         String key)

Parameters:
  `fqn` - `Fqn` of the referring node. Cannot be `null`.
  `key` - Name of the field, index in the field or key in the collection that is containing the reference.

Method Detail

### getKey

    public String getKey()

  Description copied from interface: `Reference`
  Returns the name of the node key which references the attached object, or null if the Fqn is a normal alias to the internal node. If there is a key, then this is typically a field name or collection index.

  Specified by:
    `getKey` in interface `Reference`
  Returns:
    Name of the field or key/index in the collection that is containing the reference.

### getFqn

    public Fqn<?> getFqn()

  Description copied from interface: `Reference`
  Returns the Fqn of the referring node. Cannot be `null`.

  Specified by:
    `getFqn` in interface `Reference`
  Returns:
    `Fqn` of the referring node.

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### equals

    public boolean equals(Object o)

  Overrides:
    `equals` in class `Object`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008 JBoss, a division of Red Hat. All Rights Reserved.