com.sas.entities
Interface RemoteBaseEntityValueInterface

All Superinterfaces:
java.rmi.Remote, com.sas.RemoteObjectInterface
All Known Subinterfaces:
EntityInterface, RemoteBaseEntityInterface, RemoteEntityInterface
All Known Implementing Classes:
Entity, RemoteEntity

public interface RemoteBaseEntityValueInterface
extends com.sas.RemoteObjectInterface

RemoteBaseEntityValueInterface represents a core API for accessing the attributes (name/value pairs) of an Entity. Similar to an EJB Entity Bean, an Entity contains data that is probably persisted as a record in a data table/database.

Entities act as collections of values. The Entity values are accessed via attributeName/value pairs. Those Entity values that have setter/getter methods are called type-based attributes. Entity values that do not have setter/getter methods are called instance-based attributes. Instance-based attributes may only be accessed via the generic methods that set/get values by name, such as setAttribute(String attributeName, Object value).

Entities may be accessed remotely, thus all methods may throw RemoteException.


Method Summary
 java.lang.Object getAttribute(java.lang.String attributeName)
          Get an attribute value from a entity.
 void setAttribute(java.lang.String attributeName, java.lang.Object value)
          Set an attribute and its value in this entity.
 

Method Detail

setAttribute

void setAttribute(java.lang.String attributeName,
                  java.lang.Object value)
                  throws java.rmi.RemoteException,
                         AttributeSetException
Set an attribute and its value in this entity.

Parameters:
attributeName - the name of the attribute.
value - the value to associate with the value name. Attribute values may be null.
Throws:
java.rmi.RemoteException - if there was an IO error communicating with the Entity
AttributeSetException - if the AttributeType of the parameter, value, is not compatible with a previous setting of the attribute OR the attribute corresponding to the parameter, attributeName, has been designated as non-modifiable

getAttribute

java.lang.Object getAttribute(java.lang.String attributeName)
                              throws java.rmi.RemoteException,
                                     java.util.NoSuchElementException
Get an attribute value from a entity.

Parameters:
attributeName - the name of the value.
Returns:
the object associated with the attributeName
Throws:
java.util.NoSuchElementException - if there is no such value in this entity. (this is necessary to distinguish between no such attributeName and a value of null.)
java.rmi.RemoteException - if there was an IO error communicating with the Entity



Copyright © 2009 SAS Institute Inc. All Rights Reserved.