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.acegisecurity.acl.basic
Class NamedEntityObjectIdentity

    java.lang.Object
      org.acegisecurity.acl.basic.NamedEntityObjectIdentity

All Implemented Interfaces:
  Serializable, AclObjectIdentity

    public class NamedEntityObjectIdentity

extends Object
implements AclObjectIdentity

Simple implementation of `AclObjectIdentity`.

Uses `String`s to store the identity of the domain object instance. Also offers a constructor that uses reflection to build the identity information.

See Also:
  Serialized Form

Constructor Summary
`protected` | `NamedEntityObjectIdentity()`
`` | `NamedEntityObjectIdentity(Object object)` Creates the `NamedEntityObjectIdentity` based on the passed object instance.
`` | `NamedEntityObjectIdentity(String classname, String id)`

Method Summary
`boolean` | `equals(Object arg0)` Important so caching operates properly.
`String` | `getClassname()` Indicates the classname portion of the object identity.
`String` | `getId()` Indicates the instance identity portion of the object identity.
`int` | `hashCode()` Important so caching operates properly.
`String` | `toString()`

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

Constructor Detail

### NamedEntityObjectIdentity

    public NamedEntityObjectIdentity(String classname,
                                     String id)

### NamedEntityObjectIdentity

    protected NamedEntityObjectIdentity()

### NamedEntityObjectIdentity

    public NamedEntityObjectIdentity(Object object)
                              throws IllegalAccessException,
                                     InvocationTargetException

  Creates the `NamedEntityObjectIdentity` based on the passed object instance. The passed object must provide a `getId()` method, otherwise an exception will be thrown.

  Parameters:
    `object` - the domain object instance to create an identity for
  Throws:
    `IllegalAccessException`
    `InvocationTargetException`
    `IllegalArgumentException`

Method Detail

### equals

    public boolean equals(Object arg0)

  Important so caching operates properly.

  Considers an object of the same class equal if it has the same `classname` and `id` properties.

  Specified by:
    `equals` in interface `AclObjectIdentity`
  Overrides:
    `equals` in class `Object`
  Parameters:
    `arg0` - object to compare
  Returns:
    `true` if the presented object matches this object

### getClassname

    public String getClassname()

  Indicates the classname portion of the object identity.

  Returns:
    the classname (never `null`)

### getId

    public String getId()

  Indicates the instance identity portion of the object identity.

  Returns:
    the instance identity (never `null`)

### hashCode

    public int hashCode()

  Important so caching operates properly.

  Specified by:
    `hashCode` in interface `AclObjectIdentity`
  Overrides:
    `hashCode` in class `Object`
  Returns:
    the hash of the classname and id

### 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 © 2004-2005 Acegi Technology Pty Limited. All Rights Reserved.