# com.bea.p13n.controls.ejb.property
EntityPropertyManager Interface

public interface EntityPropertyManager
extends `Control`

EntityPropertyManager is the remote interface for a session bean that manages persistence of ConfigurableEntity EJB's and their properties. The default implementation uses the WLPS database as its backing store, other implementations may use other datastores such as an LDAP server.

Each ConfigurableEntity must have an ejb-ref in its deployment descriptor that can be used to identify the correct EntityPropertyManager to use.

This control has been deprecated. Instead, use the ProfileControl to get an instance of the EntityPropertyManager associated with that profile manager, and use the API directly on the EntityPropertyManager.

Related Topics

``EntityPropertyManager``
``EntityPropertyCache``
``ConfigurableEntity``
``PropertyLocator``

All Superinterfaces
  `Control`, `Control`, `Serializable`

## Method Summary

`public long` | `createUniqueId`(`String` jndiHomeName, `String` pkString) Create a record for a new ConfigurableEntity, as identified by the given jndiHomeName and pkString.
`public `String`[]` | `getDynamicProperties`(`PropertyLocator` locator, `String` pkString) Returns a list of dynamically assigned properties for the given entity, that have been named with the given property set name.
`public `String`[]` | `getEntityNames`(`String` anEntityId) Get the PropertyLocator for the entity identified by the given entity id
`public `EntityPropertyCache`` | `getProperties`(`PropertyLocator` locator) Returns an EntityPropertyCache full of all properties that are persisted for the given ConfigurableEntity
`public `Object`` | `getProperty`(`PropertyLocator` locator, `String` propertySet, `String` propertyName) Returns the value of the property defined for the specified property and property set.
`public `PropertyLocator`` | `getPropertyLocator`(long anEntityId) Get the PropertyLocator for the entity identified by the given entity id
`public long` | `getUniqueId`(`String` homeName, `String` pkString) Returns the number that uniquely identifies the entity specified by the home name and the pk string.
`public void` | `removeEntity`(`PropertyLocator` locator) Remove all properties, and the entity record, for the entity identified by the given property locator
`public void` | `removeProperties`(`PropertyLocator` locator) Removes all property values associated with the entity specified by the property locator.scope
`public `Object`` | `removeProperty`(`PropertyLocator` locator, `String` propertySet, `String` propertyName) Removes a specific property value from the entity specified by the property locator.
`public void` | `setProperty`(`PropertyLocator` locator, `String` propertySet, `String` propertyName, `Object` value) Sets the property identified by the given property set and property name to the given value for the entity specified by the given property locator.

## Method Detail

### createUniqueId(String, String) Method

DEPRECATED with no replacement

    public long createUniqueId(String jndiHomeName,
                               String pkString)
         throws P13nControlException

Create a record for a new ConfigurableEntity, as identified by the given jndiHomeName and pkString.

#### Parameters

jndiHomeName
  the entity's home name

pkString
  the entity's identifier string

#### Returns

the newly created entity id

#### Exceptions

``P13nControlException``
  if there is an error creating the new Configurable Entity.

### getDynamicProperties(PropertyLocator, String) Method

DEPRECATED with no replacement

    public String[] getDynamicProperties(PropertyLocator locator,
                                       String pkString)
         throws P13nControlException

Returns a list of dynamically assigned properties for the given entity, that have been named with the given property set name. Dynamic properties are properties that have values persisted, and may even have a property set name, but are not actually defined in a property set.

Dynamic properties could exist if the property set definition has been changed to remove a property but the given entity still has a value for this property. They could also exist if the entity has properties that were set using the property set name as the scope, but the property set definition does not contain the properties.

If the given property set name is null then this method returns the property names that were set for this entity using null for the property set name.

#### Parameters

locator
  a PropertyLocator identifying the entity to look up

pkString
  the propertySet to look up

#### Returns

a String array of property names

#### Exceptions

``P13nControlException``
  if the Entity cannot be found

### getEntityNames(String) Method

DEPRECATED with no replacement

    public String[] getEntityNames(String anEntityId)
         throws P13nControlException

Get the PropertyLocator for the entity identified by the given entity id

#### Parameters

anEntityId
  the unique id for the entity to look up

#### Returns

the entity's PropertyLocator

#### Exceptions

``P13nControlException``
  if database errors occur while attempting the query

### getProperties(PropertyLocator) Method

DEPRECATED Use the ProfileControl to get the user or group profile manager, then call getProperties() on that. For example: ProfileControl.getUserProfileManager().getProperties(profileName, propertySetName)

    public EntityPropertyCache getProperties(PropertyLocator locator)
         throws P13nControlException

Returns an EntityPropertyCache full of all properties that are persisted for the given ConfigurableEntity

#### Parameters

locator
  a PropertyLocator that identifies the entity

#### Returns

a populated EntityPropertyCache

#### Exceptions

``P13nControlException``
  if the entity is not found

### getProperty(PropertyLocator, String, String) Method

DEPRECATED Use the ProfileControl to get the user or group profile manager, then call getProperties() on that. For example: ProfileControl.getUserProfileManager().getProperty(profileName, propertySet, propertyName)

    public Object getProperty(PropertyLocator locator,
                              String propertySet,
                              String propertyName)
         throws P13nControlException

Returns the value of the property defined for the specified property and property set.

If the property does not have a value persisted, then null is returned.

#### Parameters

locator
  a PropertyLocator identifying the entity to look up

propertySet
  the name of the property set

propertyName
  the name of the property

#### Returns

the property's value, or null if there is none

#### Exceptions

``P13nControlException``
  if the Entity cannot be found

### getPropertyLocator(long) Method

DEPRECATED with no replacement

    public PropertyLocator getPropertyLocator(long anEntityId)
         throws P13nControlException

Get the PropertyLocator for the entity identified by the given entity id

#### Parameters

anEntityId
  the unique id for the entity to look up

#### Returns

the entity's PropertyLocator

#### Exceptions

``P13nControlException``
  if the Entity cannot be found

### getUniqueId(String, String) Method

DEPRECATED with no replacement

    public long getUniqueId(String homeName,
                            String pkString)
         throws P13nControlException

Returns the number that uniquely identifies the entity specified by the home name and the pk string.

If the entity is not found, -1 will be returned.

#### Parameters

homeName
  the entity's JNDI home name

pkString
  the entity's string identifier

#### Returns

the entity's unique id, or -1 if it was not found

#### Exceptions

``P13nControlException``
  if the Entity cannot be found

### removeEntity(PropertyLocator) Method

DEPRECATED with no replacement

    public void removeEntity(PropertyLocator locator)
         throws P13nControlException

Remove all properties, and the entity record, for the entity identified by the given property locator

#### Parameters

locator
  the PropertyLocator identifying the entity to remove

#### Exceptions

``P13nControlException``
  if the Entity cannot be found

### removeProperties(PropertyLocator) Method

DEPRECATED with no replacement

    public void removeProperties(PropertyLocator locator)
         throws P13nControlException

Removes all property values associated with the entity specified by the property locator.scope

#### Parameters

locator
  a PropertyLocator identifying the entity to modify

#### Exceptions

``P13nControlException``
  if the Entity cannot be found

### removeProperty(PropertyLocator, String, String) Method

DEPRECATED Use the ProfileControl to get the user or group profile manager, then call getProperties() on that . For example: ProfileControl.getUserProfileManager().removeProperty(profileName, propertySet, propertyName)

    public Object removeProperty(PropertyLocator locator,
                                 String propertySet,
                                 String propertyName)
         throws P13nControlException

Removes a specific property value from the entity specified by the property locator.

#### Parameters

locator
  a PropertyLocator identifying the entity to modify

propertySet
  the property set containing the property to remove

propertyName
  the name of the property to remove

#### Returns

The old value of the property, if any

#### Exceptions

``P13nControlException``
  if the Entity cannot be found

### setProperty(PropertyLocator, String, String, Object) Method

DEPRECATED Use the ProfileControl to get the user or group profile manager, then call setProperty() on that. For example: ProfileControl.getUserProfileManager().setProperty(profileName, propertySet, propertyName, value)

    public void setProperty(PropertyLocator locator,
                            String propertySet,
                            String propertyName,
                            Object value)
         throws P13nControlException

Sets the property identified by the given property set and property name to the given value for the entity specified by the given property locator.

#### Parameters

locator
  a PropertyLocator identifying the entity to modify

propertySet
  the property set containing the property to modify

propertyName
  the name of the property to modify

value
  the value to persist for the given property and entity

#### Exceptions

``P13nControlException``
  if the entity cannot be found, or if the value is not valid for the given property