Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Path - cps-persistence-spi-spi-docs\docs\dps-core-spi\com\ericsson\oss\itpf\datalayer\dps\object\spi


Name


Definition

 Capabilities

1

Interface PersistenceLayerPersistenceObject

Exposes functionality only available on the persistence layer objects.


  • setVersion

Sets the new version of this persistence object.

  • removeAllAssociations

Remove all associations of this persistence object.


2

Interface PersistenceLayerManagedObject

Exposes functionality only available on the persistence layer objects.


  • loadAllChildrenIntoMemory

Used to pre-load children from the database into memory. This method is provided to optimise use cases which will be doing multiple calls to ManagedObject.getChild(String) - it pre-loads all children from the database so that subsequent calls to ManagedObject.getChild(String) will not need round trips to the database.

3

Class MinimalObjectData


Provides the basic information needed to access an object.

  • getDbId

Get the native database ID of the object.

  • getType

Get the type of the object.

  • getVersion

Get the version of the object.

  • equals

  • hashCode

4

Interface DecoratedPersistenceObject


Extends the public persistence object interface with methods that are used internally by DPS but are not to be exposed externally to clients.
  • getNativeDbId

Get the native database identity of the database object backing this persistence object.

Use of this must be done with great care, as it will vary in its behaviour with respect to consistency, volatility, etc. depending on the database being used.

It should never be exposed to applications and is for use within the DPS layer only.

  • getBucketName

Gets the data bucket name to which this persistence object belongs.

  • getPersistenceLayerObject

Gets the persistence layer object without any layers of decoration.

If the innermost object is not a persistence layer object then a suitable exception will be thrown.

  • getDecoratedObject

Gets the object being decorated by the layer of decoration specified.

  • checkUserSuppliedAttributesAtCreation

Passes the attributes supplied by the user for a new persistence object so that they may be verified as required.

This method will be invoked when creating a new persistence object but should not be used to set the attribute values, that is the purpose of initializeAttributes(java.util.Map<java.lang.String, java.lang.Object>).

The purpose of this method is to allow decorators perform actions on the specific attributes supplied by the user, as opposed to the final set of attributes to be applied on the new object, which may contain merged in default values.

The implementation of this method may not modify the supplied attribute map as they are passed through the layers of decorators. And if the original map is required for later use it should be copied as it may get changed subsequently when initializeAttributes(java.util.Map<java.lang.String, java.lang.Object>) is called.

  • initializeAttributes

Initializes the attributes for a new persistence object. This method should be invoked when creating a new persistence object rather than using setAttributes() as it will have different behavior, namely:

  1. it verifies all mandatory attributes have been supplied

  2. it initializes all non-supplied attributes to their default value where relevant

  3. no notifications will be sent as a result of this method being called

The implementation of this method may modify the supplied attribute map as they are passed through the layers of decorators.

  • removeBackpointer

Removes backpointer from this persistence object to the persistence object which is referencing it by uni-directional with backpointer association.

  • setBackpointer

Sets backpointer from this persistence object to the persistence object which is referencing it by uni-directional with backpointer association.

  • getBackpointerAssociations

Retrieves referencing persistence objects for backpointer names for all uni-directional with backpointer associations referencing this persistence object.

  • getAttributesSpecificallySet

Gets the values for the attributes which have been specifically set on this object.

This includes attributes which:

  1. were supplied at creation of the object or

  2. had default values applied during creation or

  3. were specifically set after creation by invoking one of the setAttribute(s) methods.

Note that an attribute may have been specifically set to null so the values returned in the map may contain nulls.

  • isAttributeSet

Determines if the supplied attribute has been specifically set (includes attributes which were set to null).

  • getPrimaryTypeSpecification

Gets the primary type specification for this object.

  • getChangeIdentifier

Gets change identifier for this persistence object.

  • getAttributeNames

Gets all of the attribute names available in this persistence object.

  • unsetAttributes

Unsets the values of the supplied attributes.


5

Class BasicManagedObjectData

Used to efficiently transfer basic information about a Managed Object - without the full Managed Object and without the bloat of the existing Data Transfer Objects (DTOs).

  • getFdn
  • getNamespace
  • getType
  • getName
  • getVersion
  • getPoId
  • equals
  • hashCode
6

Interface DecoratedManagedObject


Extends the public managed object interface with methods that are used internally by DPS but are not to be exposed externally to clients.

  • getRdn

Get the RDN of the managed object.

  • getChildrenCardinality

Returns the existing amount of the managed object of the type referenced by type namespace and name.

  • setActiveChoiceCase

Sets the active choice case for the given choice.

  • getActiveChoiceCase

Retrieves the active choice case for the given choice.

  • getChildrenByType

Retrieves all the children managed object of a given type.



Object Exception

Path - cps-persistence-spi-spi-docs\docs\dps-core-spi\com\ericsson\oss\itpf\datalayer\dps\object\spi\exception


Name


Definition

 Capabilities

1

Class AssociationAlreadyDefinedException

Exception thrown when the user tries to create an association that already exists.


  • AssociationAlreadyDefinedException

2

Class ChildAlreadyDefinedException


Exception thrown when a new child object is attempted to be created under a parent which already has a child with that type and name.

  • ChildAlreadyDefinedException

3Class GroupAlreadyDefinedExceptionAn attempt was made to create a Group with non-unique namespace and name.
  • GroupAlreadyDefinedException
4

Class GroupNotAccessibleException


An exception thrown when the requested group is not accessible to current user.
  • GroupNotAccessibleException

5Class GroupNotFoundException

An exception thrown when a group requested from DPS method does not exist.


  • GroupNotFoundException