|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.entities.RemoteEntity
public class RemoteEntity
RemoteEntity represents a possibly-remote implementation of RemoteEntityInterface.
Entity
,
RemoteEntityInterface
,
Serialized FormField Summary | |
---|---|
protected static java.util.ArrayList |
classLoaders
List of classloaders |
protected java.util.Map |
dynamicSupplementalProperties
Map of supplemental properties for dynamic (instance-based properties). |
static java.lang.Object |
NO_SUCH_OBJECT
Used for internal getAttribute(name, NO_SUCH_OBJECT) calls to detect no such object |
static java.lang.Object |
NULL_OBJECT_WRAPPER
A replacement for null for internally used JDK collections (Map)
which do not handle null. |
protected java.util.Map |
supplementalProperties
Map of supplemental properties. |
protected java.beans.VetoableChangeSupport |
vcs
Instance of VetoableChangeSupport |
Constructor Summary | |
---|---|
RemoteEntity()
Constructs an instance of RemoteEntity with a unique GUID (Globally Unique Identifier) or entity key. |
|
RemoteEntity(AttributeTypeFactoryInterface atfi)
Constructs an instance of Entity with a unique GUID (Globally Unique Identifier) or entity key. |
|
RemoteEntity(AttributeTypeFactoryInterface atfi,
java.util.Map supplementalProperties)
Constructs an instance of RemoteEntity with a unique GUID (Globally Unique Identifier) or entity key. |
|
RemoteEntity(int port,
java.rmi.server.RMIClientSocketFactory clientFactory,
java.rmi.server.RMIServerSocketFactory serverFactory)
Constructs an instance of RemoteEntity with a unique GUID (Globally Unique Identifier) or entity key. |
|
RemoteEntity(java.util.Map supplementalProperties)
Constructs an instance of RemoteEntity with a unique GUID (Globally Unique Identifier) or entity key. |
|
RemoteEntity(java.rmi.server.RMIClientSocketFactory clientFactory,
java.rmi.server.RMIServerSocketFactory serverFactory)
Constructs an instance of RemoteEntity with a unique GUID (Globally Unique Identifier) or entity key. |
Method Summary | |
---|---|
void |
addAttributeValidator(java.lang.String attributeName,
java.beans.VetoableChangeListener listener)
Convenience method for calling addVetoableChangeListener(String propertyName, VetoableChangeListener listener) . |
void |
addVetoableChangeListener(java.lang.String propertyName,
java.beans.VetoableChangeListener listener)
Add a VetoableChangeListener for the attribute. |
protected void |
checkSetEntityKey()
This method is called from setEntityKey before assigning a key. |
void |
clear()
Clear ("unset") all attribute values. |
void |
clearAttribute(java.lang.String attributeName)
Clear ("unset") an individual attribute. |
java.lang.Object |
clone()
Create a new RemoteEntity object using the RemoteEntity's attributes. |
boolean |
containsAttributeNamed(java.lang.String attributeName)
Test if this entity contains an attribute of a specified name. |
boolean |
equals(java.lang.Object o)
Returns a boolean indicating whether the Entities are "equal". |
boolean |
equals(RemoteEntity p)
Returns a boolean indicating whether the Entities are "equal". |
void |
fireVetoableChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
Report a bound property update to any registered listeners. |
java.lang.Object |
getAttribute(java.lang.String attributeName)
Get an attribute value from a entity. |
java.lang.Object |
getAttribute(java.lang.String attributeName,
java.lang.Object defaultValue)
Get a value of an attribute from the entity, or return a default value if it does not exist. |
protected java.lang.Object |
getAttribute(java.lang.String attributeName,
java.lang.Object defaultValue,
java.util.Map propertyDescriptors)
Get an attribute value from the RemoteEntity or return the default value if it does not exist. |
int |
getAttributeCount()
Returns the number of attributes defined. |
AttributeDescriptorInterface |
getAttributeDescriptor(java.lang.String attributeName)
Returns an AttributeDescriptor |
AttributeDescriptorInterface[] |
getAttributeDescriptors()
Returns an array of AttributeDescriptors |
AttributeGroupInterface |
getAttributeGroup()
Return a list of attributes and their descriptions. |
java.util.Map |
getAttributes(java.util.Map query)
Perform a bulk value get on this entity. |
protected java.util.Map |
getAttributes(java.util.Map query,
java.util.Set propertyNames)
Perform a bulk value get on the Entity. |
AttributeTypeInterface |
getAttributeType(java.lang.String attributeName)
Returns the type of an attribute. |
java.util.Map |
getAttributeValidators()
Return a map of attribute validators. |
AttributeDescriptorInterface[] |
getBooleanSpecifiedAttributeDescriptors(java.util.Map map)
Returns an array of AttributeDescriptors that meet specified boolean attribute criteria. |
java.lang.String |
getCustomizer(java.lang.String contextNotYetImplementedThusIGNORED)
Return this object's customizer. |
java.util.List |
getCustomizerContexts()
Not currently implemented |
java.lang.Object |
getDelegate()
Returns the map that holds the values of the instance-based attributes. |
java.lang.String |
getEntityKey()
Return the Entity's unique key. |
java.util.Map |
getPropertyDescriptors()
Returns a map of PropertyDescriptors. |
protected java.util.Map |
getPropertyDescriptors(java.lang.Class aClass)
Returns a map of PropertyDescriptors. |
RemoteEntityInterface |
getPrototype()
Get the prototype object from which the Entity inherits dynamic attributes from. |
java.lang.String |
getStringAttribute(java.lang.String attributeName,
java.lang.String defaultValue)
Get a string value of an attribute from an entity. |
protected void |
initialize()
Called by constructors. |
java.lang.Object |
invokeGetter(java.lang.reflect.Method getter)
Invokes the java.beans.PropertyDescriptor read method (specified in input parameter). |
boolean |
isAllRequiredAttributesAssigned()
Returns true if all attributes, designated as required, have had a value assigned or the attribute has a default value. |
boolean |
isAttributeAssigned(java.lang.String attributeName)
Returns true if an attribute has had a value assigned or the attribute has a default value. |
java.util.List |
listAllRequiredAttributesNotAssigned()
Returns a list of AttributeDescriptor names where the AttributeDescriptor has been designated as required, but has not had a value assigned (a value has not been set through the setAttribute method and the AttributeDescriptor does not have a default value assigned). |
java.lang.String[] |
listAttributeNames()
Return an array of the attribute names on this entity. |
java.lang.String[] |
listAttributeNames(boolean includeDynamicAttributes,
boolean includeStaticAttributes)
Return an array of the AttributeDescriptor names. |
protected static java.lang.Object |
map(java.lang.Object o)
Substitute the NULL_OBJECT_WRAPPER for null object references. |
void |
removeAllAttributes()
Remove all attributes from this entity. |
void |
removeAttribute(java.lang.String attributeName)
Remove an attribute from this entity if the attribute is an instance-based attribute. |
void |
removeAttributeValidator(java.lang.String attributeName,
java.beans.VetoableChangeListener listener)
Convenience method for calling removeVetoableChangeListener(String propertyName, VetoableChangeListener listener) . |
void |
removeVetoableChangeListener(java.lang.String propertyName,
java.beans.VetoableChangeListener listener)
Remove a VetoableChangeListener for the attribute. |
boolean |
sameEntity(EntityKeyInterface entity)
Test if this Entity's key equals the entity key of another Entity. |
protected boolean |
setAttribute(java.lang.String attributeName,
java.util.Map propertyDescriptors,
java.lang.Object[] args)
Set an attribute and its value. |
void |
setAttribute(java.lang.String attributeName,
java.lang.Object value)
Set an attribute and its value in this entity. |
void |
setAttributes(java.util.Map update)
Perform a bulk attribute set on this entity. |
protected void |
setAttributes(java.util.Map query,
java.util.Set entries,
java.util.Map propertyDescriptors,
java.lang.Object[] args)
Perform a bulk attribute set. |
void |
setCustomizer(java.lang.String contextNotYetImplementedThusIGNORED,
java.lang.String customizer)
Set the customizer for a specific context. |
void |
setDynamicSupplementalPropertiesDefaultMap(java.util.Map dynamicSupplementalProperties)
Sets the properties defined in the input map, dynamicSupplementalProperties, on all AttributeDescriptors associated with dynamic (instanced-based) attributes. |
void |
setEntityKey(java.lang.String key)
Assign this entity's key or GUID (Globally Unique Identifier). |
void |
setPrototype(RemoteEntityInterface prototype)
Set the prototype object from which the Entity inherits dynamic attributes from. |
java.lang.String |
toString()
Returns the string representation of the Entity. |
protected static java.lang.Object |
unmap(java.lang.Object o)
The inverse of the map(Object) call. |
protected boolean |
verifyAttributeType(java.lang.String attributeName,
java.lang.Object[] args)
Returns a boolean indicating whether the value is valid for the attribute based on the AttributeType of the attribute. |
Field Detail |
---|
protected java.util.Map supplementalProperties
protected java.util.Map dynamicSupplementalProperties
protected java.beans.VetoableChangeSupport vcs
protected static java.util.ArrayList classLoaders
public static final java.lang.Object NULL_OBJECT_WRAPPER
null
for internally used JDK collections (Map)
which do not handle null.
map(Object)
,
unmap(Object)
public static final java.lang.Object NO_SUCH_OBJECT
Constructor Detail |
---|
public RemoteEntity() throws java.rmi.RemoteException
property
parameter for all
AttributeDescriptors associated with static (type-based) attributes to true.
java.rmi.RemoteException
- if there was an IO error communicating with the RemoteEntitypublic RemoteEntity(java.util.Map supplementalProperties) throws java.rmi.RemoteException
property
parameter for all
AttributeDescriptors associated with static (type-based) attributes to true.
Sets the properties defined in the input map,
supplementalProperties, on all AttributeDescriptors
associated with static (type-based) attributes.
supplementalProperties
- name/value pairs of
supplemental properties
java.rmi.RemoteException
- if there was an IO error communicating with the RemoteEntitypublic RemoteEntity(AttributeTypeFactoryInterface atfi) throws java.rmi.RemoteException
property
parameter for all
AttributeDescriptors associated with static (type-based) attributes to true.
Uses the input AttributeTypeFactory, atfi, for creating
AttributeTypes for the AttributeDescriptors.
atfi
- instance of AttributeTypeFactoryInterface
java.rmi.RemoteException
- if there was an IO error communicating with the RemoteEntitypublic RemoteEntity(AttributeTypeFactoryInterface atfi, java.util.Map supplementalProperties) throws java.rmi.RemoteException
property
parameter for all
AttributeDescriptors associated with static (type-based) attributes to true.
Sets the properties defined in the input map,
supplementalProperties, on all AttributeDescriptors
associated with static (type-based) attributes.
Uses the input AttributeTypeFactory, atfi, for creating
AttributeTypes for the AttributeDescriptors.
supplementalProperties
- name/value pairs of
supplemental propertiesatfi
- instance of AttributeTypeFactoryInterface
java.rmi.RemoteException
- if there was an IO error communicating with the RemoteEntitypublic RemoteEntity(java.rmi.server.RMIClientSocketFactory clientFactory, java.rmi.server.RMIServerSocketFactory serverFactory) throws java.rmi.RemoteException
property
parameter for all
AttributeDescriptors associated with static (type-based) attributes to true.
Exports the remote object on an anonymous port using the specified socket factories.
RMIClientSocketFactory
- instance of RMIClientSocketFactory used by the RMI runtime
in order to obtain client sockets for RMI callsRMIServerSocketFactory
- instance of RMIServerSocketFactory used by the RMI runtime
in order to obtain server sockets for RMI calls
java.rmi.RemoteException
- if there was an IO error communicating with the RemoteEntitypublic RemoteEntity(int port, java.rmi.server.RMIClientSocketFactory clientFactory, java.rmi.server.RMIServerSocketFactory serverFactory) throws java.rmi.RemoteException
property
parameter for all
AttributeDescriptors associated with static (type-based) attributes to true.
Exports the remote object on the specified port using the specified socket factories.
port
- port numberRMIClientSocketFactory
- instance of RMIClientSocketFactory used by the RMI runtime
in order to obtain client sockets for RMI callsRMIServerSocketFactory
- instance of RMIServerSocketFactory RMI used used by the RMI runtime
in order to obtain server sockets for RMI calls
java.rmi.RemoteException
- if there was an IO error communicating with the RemoteEntityMethod Detail |
---|
protected void initialize() throws java.rmi.RemoteException
java.rmi.RemoteException
- if there was an IO error communicating with the RemoteEntitypublic java.lang.String getEntityKey() throws java.rmi.RemoteException
RemoteEntityInterface
getEntityKey
in interface RemoteEntityInterface
java.rmi.RemoteException
- if there was an IO error communicating with the Entitypublic void setEntityKey(java.lang.String key) throws java.rmi.RemoteException, java.lang.IllegalStateException
setEntityKey
in interface RemoteEntityInterface
guid
- a unique entity key also known as a globally unique identifer (GUID)
java.lang.IllegalStateException
- subclasses may throw an IllegalStateException if this
Entity already has a GUID although this base class method does not
java.rmi.RemoteException
- if there was an IO error communicating with the RemoteEntityprotected void checkSetEntityKey() throws java.rmi.RemoteException, java.lang.IllegalStateException
java.rmi.RemoteException
- if there was an IO error communicating with the RemoteEntity
java.lang.IllegalStateException
- if the entity already has a non-null key.
Not all entity implementations are required to throw this exception; some
may allow replacing a non-null key.public boolean sameEntity(EntityKeyInterface entity) throws java.rmi.RemoteException
sameEntity
in interface RemoteEntityInterface
getEntityKey()
. Return false if entity is
null
java.rmi.RemoteException
- if there was an IO error communicating with the RemoteEntitypublic void removeAttribute(java.lang.String attributeName) throws java.rmi.RemoteException
RemoteBaseEntityInterface
containsAttributeNamed(String attributeName)
will return false
and getAttribute(String attributeName)
will throw a NoSuchElementException
removeAttribute
in interface RemoteBaseEntityInterface
attributeName
- the name of the attribute
java.rmi.RemoteException
- if there was an IO error communicating with the Entitypublic void removeAllAttributes() throws java.rmi.RemoteException
RemoteBaseEntityInterface
removeAllAttributes
in interface RemoteBaseEntityInterface
java.rmi.RemoteException
- if there was an IO error communicating with the Entitypublic java.lang.Object getAttribute(java.lang.String attributeName) throws java.rmi.RemoteException, java.util.NoSuchElementException
RemoteBaseEntityValueInterface
getAttribute
in interface RemoteBaseEntityValueInterface
attributeName
- the name of the value.
java.rmi.RemoteException
- if there was an IO error communicating with the Entity
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.)public java.lang.Object getAttribute(java.lang.String attributeName, java.lang.Object defaultValue)
RemoteBaseEntityInterface
getAttribute
in interface RemoteBaseEntityInterface
attributeName
- the name of the value.defaultValue
- a default value to return if the named attribute does
not exist in this entity.
protected java.lang.Object getAttribute(java.lang.String attributeName, java.lang.Object defaultValue, java.util.Map propertyDescriptors)
attributeName
- the name of the attributedefaultValue
- a default value to return if the named attribute does not exist in the RemoteEntitypropertyDescriptors
- a map containing the Java properties associated with
this RemoteEntity. This map is used to determine whether the attribute is
associated with a java property. If so, then the read method associated
with the property is actually invoked to obtain the value of the attribute.
java.util.NoSuchElementException
- if there is no such value in this RemoteEntity
(this is necessary to distinguish between no such attributeName and a value of null)public java.lang.Object invokeGetter(java.lang.reflect.Method getter)
getter
- java.beans.PropertyDescriptor read method
public java.util.Map getAttributes(java.util.Map query)
RemoteBaseEntityInterface
getAttributes
in interface RemoteBaseEntityInterface
query
- a set of name/value pairs. This
object is updated if the operation is performed locally.
protected java.util.Map getAttributes(java.util.Map query, java.util.Set propertyNames)
query
- a set of name/value pairs. This
object is updated if the operation is performed locally.propertyNames
- set of propertyNames obtained by performing
a keySet() operation
public java.lang.String getStringAttribute(java.lang.String attributeName, java.lang.String defaultValue) throws java.rmi.RemoteException
RemoteBaseEntityInterface
(String) getAttribute(String attributeName)
.
getStringAttribute
in interface RemoteBaseEntityInterface
attributeName
- the name of the value.defaultValue
- a default value to return if the named value does
not exist in this entity.
java.rmi.RemoteException
- if there was an IO error communicating with the Entitypublic java.lang.String getCustomizer(java.lang.String contextNotYetImplementedThusIGNORED)
RemoteEntityInterface
getCustomizer
in interface RemoteEntityInterface
contextNotYetImplementedThusIGNORED
- the context, such as a Java, COM, or WEB context
EntityContextInterface
public java.util.List getCustomizerContexts()
getCustomizerContexts
in interface RemoteEntityInterface
public void setAttribute(java.lang.String attributeName, java.lang.Object value) throws AttributeSetException, java.rmi.RemoteException
RemoteBaseEntityValueInterface
setAttribute
in interface RemoteBaseEntityValueInterface
attributeName
- the name of the attribute.value
- the value to associate with the value name.
Attribute values may be null.
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
java.rmi.RemoteException
- if there was an IO error communicating with the Entityprotected boolean setAttribute(java.lang.String attributeName, java.util.Map propertyDescriptors, java.lang.Object[] args) throws AttributeSetException, java.rmi.RemoteException
attributeName
- the name of the attributepropertyDescriptors
- a map containing the Java properties associated with
the entity. This map is used to determine whether the attribute is
associated with a java property. If so, then the write method associated
with the property is used to set the attribute value.args
- the value to associate with the attribute.
Attribute values may be null.
AttributeSetException
- if the attribute corresponding to the
parameter, attributeName, has been designated as non-modifiable
java.rmi.RemoteException
- if there was an IO error communicating with the RemoteEntitypublic void setAttributes(java.util.Map update) throws AttributeSetException, java.rmi.RemoteException
RemoteBaseEntityInterface
setAttributes
in interface RemoteBaseEntityInterface
update
- a set of name/value pairs to assign to the attributes
of this entity
AttributeSetException
- if the AttributeType of a parameter is not compatible
with a previous setting of the attribute OR an attribute
has been designated as non-modifiable
java.rmi.RemoteException
- if there was an IO error communicating with the Entityprotected void setAttributes(java.util.Map query, java.util.Set entries, java.util.Map propertyDescriptors, java.lang.Object[] args) throws AttributeSetException, java.rmi.RemoteException
query
- a set of name/value pairs to assign to the attributesentries
- collection of name/value pairs (attribute name/value)propertyDescriptors
- a map containing the Java properties associated with
the entity. This map is used to determine whether the attribute is
associated with a java property. If so, then the write method associated
with the property is used to set the attribute value.args
- the values to set for the attributes
java.rmi.RemoteException
- if there was an IO error communicating with the RemoteEntity
AttributeSetException
- if any of the attributes
have been designated as non-modifiablepublic void setCustomizer(java.lang.String contextNotYetImplementedThusIGNORED, java.lang.String customizer)
RemoteEntityInterface
setCustomizer
in interface RemoteEntityInterface
contextNotYetImplementedThusIGNORED
- the context, such as a Java, COM, or WEB contextcustomizer
- the name of the customizerEntityContextInterface
public java.util.Map getPropertyDescriptors()
protected java.util.Map getPropertyDescriptors(java.lang.Class aClass)
aClass
- class to obtain PropertyDescriptors for
public boolean containsAttributeNamed(java.lang.String attributeName)
RemoteBaseEntityInterface
containsAttributeNamed
in interface RemoteBaseEntityInterface
attributeName
- the attribute name to test
public int getAttributeCount()
public java.lang.String[] listAttributeNames()
RemoteBaseEntityInterface
listAttributeNames
in interface RemoteBaseEntityInterface
public java.lang.String[] listAttributeNames(boolean includeDynamicAttributes, boolean includeStaticAttributes)
setAttribute(String attributeName, Object value)
method.
If set to true, this method will return the name of any
AttributeDescriptor that meets either of the following:
setAttribute(String attributeName, Object value)
(dynamic attribute) OR
If set to false, this method will return the names of only those attributes that
have been explicitly created through the setAttribute(String attributeName, Object value)
method.
The boolean parameter, includeStaticAttributes, indicates whether to include static (type-based) attributes. If set to true, this method will return the name of any AttributeDescriptor that corresponds to a type-based attribute. If set to false, this method will not return any type-based attribute names.
includeDynamicAttributes
- indicates whether to include instance-based
attributes that have not been explicitly createdincludeStaticDescriptors
- indicates whether to include type-based
attributes
java.rmi.RemoteException
- if there was an IO error communicating with the RemoteEntitypublic java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.rmi.server.UnicastRemoteObject
java.lang.CloneNotSupportedException
- if the Entity does not support the Cloneable interfacepublic boolean equals(RemoteEntity p)
p
- the RemoteEntity to compare
public boolean equals(java.lang.Object o)
equals
in class java.rmi.server.RemoteObject
o
- the object to compare
public java.lang.String toString()
toString
in class java.rmi.server.RemoteObject
public java.lang.Object getDelegate()
public void addAttributeValidator(java.lang.String attributeName, java.beans.VetoableChangeListener listener)
addVetoableChangeListener(String propertyName, VetoableChangeListener listener)
.
addAttributeValidator
in interface RemoteEntityInterface
attributeName
- name of the attributelistener
- object that implements VetoableChangeListenerpublic void removeAttributeValidator(java.lang.String attributeName, java.beans.VetoableChangeListener listener)
removeVetoableChangeListener(String propertyName, VetoableChangeListener listener)
.
removeAttributeValidator
in interface RemoteEntityInterface
RemoteEntityInterface.addAttributeValidator(String, VetoableChangeListener)
public java.util.Map getAttributeValidators() throws java.rmi.RemoteException
RemoteEntityInterface
getAttributeValidators
in interface RemoteEntityInterface
java.rmi.RemoteException
- if there was an IO error communicating with the Entitypublic AttributeGroupInterface getAttributeGroup() throws java.rmi.RemoteException
RemoteEntityInterface
getAttributeGroup
in interface RemoteEntityInterface
AttributeGroupInterface
from which you can access
each attribute by name or get them all as an array.
AttributeGroupInterface provides a structured, hierarchical grouping of an Entity's
attributes.
java.rmi.RemoteException
- if there was an IO error communicating with the Entitypublic RemoteEntityInterface getPrototype()
RemoteEntityInterface
getPrototype
in interface RemoteEntityInterface
public void setPrototype(RemoteEntityInterface prototype)
RemoteEntityInterface
setPrototype
in interface RemoteEntityInterface
prototype
- object from which the Entity inherits dynamic attributes frompublic AttributeTypeInterface getAttributeType(java.lang.String attributeName) throws java.rmi.RemoteException, java.util.NoSuchElementException
RemoteEntityInterface
getAttributeType
in interface RemoteEntityInterface
attributeName
- attribute name
java.rmi.RemoteException
- if there was an IO error communicating with the Entity
java.util.NoSuchElementException
- if there
is no such value in the Entity
(this is necessary to distinguish between
no such attributeName and a value of null)AttributeTypeInterface
public AttributeDescriptorInterface[] getAttributeDescriptors() throws java.rmi.RemoteException
RemoteEntityInterface
getAttributeDescriptors
in interface RemoteEntityInterface
java.rmi.RemoteException
- if there was an IO error communicating with the Entitypublic AttributeDescriptorInterface getAttributeDescriptor(java.lang.String attributeName) throws java.rmi.RemoteException, java.util.NoSuchElementException
RemoteEntityInterface
getAttributeDescriptor
in interface RemoteEntityInterface
java.rmi.RemoteException
- if there was an IO error communicating with the Entity
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)public boolean isAttributeAssigned(java.lang.String attributeName) throws java.rmi.RemoteException, java.util.NoSuchElementException
RemoteEntityInterface
isAttributeAssigned
in interface RemoteEntityInterface
java.rmi.RemoteException
- if there was an IO error communicating with the Entity
java.util.NoSuchElementException
- if there
is no such value in the Entity
(this is necessary to distinguish between
no such attributeName and a value of null)public boolean isAllRequiredAttributesAssigned() throws java.rmi.RemoteException
RemoteEntityInterface
isAllRequiredAttributesAssigned
in interface RemoteEntityInterface
java.rmi.RemoteException
- if there was an IO error communicating with the Entitypublic java.util.List listAllRequiredAttributesNotAssigned() throws java.rmi.RemoteException
java.rmi.RemoteException
- if there was an IO error communicating with the RemoteEntitypublic void clear() throws java.rmi.RemoteException
RemoteEntityInterface
clear
in interface RemoteEntityInterface
java.rmi.RemoteException
- if there was an IO error communicating with the Entitypublic void clearAttribute(java.lang.String attributeName) throws java.rmi.RemoteException
RemoteEntityInterface
clearAttribute
in interface RemoteEntityInterface
java.rmi.RemoteException
- if there was an IO error communicating with the Entitypublic AttributeDescriptorInterface[] getBooleanSpecifiedAttributeDescriptors(java.util.Map map) throws java.rmi.RemoteException, java.lang.NoSuchMethodException
RemoteEntityInterface
HashMap map = new HashMap(); map.put(AttributeDescriptorInterface.MODIFIABLE,Boolean.FALSE); map.put(AttributeDescriptorInterface.VISIBLE,Boolean.TRUE); try { RemoteEntity rentity = new RemoteEntity(); AttributeDescriptorInterface[] adi = rentity.getBooleanSpecifiedAttributeDescriptors(map); } catch(NoSuchMethodException e) {}
getBooleanSpecifiedAttributeDescriptors
in interface RemoteEntityInterface
map
- set of name/value pairs consisting of attribute/value
java.rmi.RemoteException
- if there was an IO error communicating with the Entity
java.lang.NoSuchMethodException
- if method does not exist on the AttributeDescriptorInterfaceAttributeDescriptorInterface
protected static java.lang.Object map(java.lang.Object o)
NULL_OBJECT_WRAPPER
for null object references.
Implementation classes which use other objects that do
not handle null references should use map(Object)
to change null references to a fixed non-null reference
(BaseCollection.NULL_OBJECT_WRAPPER
) before storing items
in the underlying object. For example, Dictionary uses a Hashtable which does
not allow null keys, so Dictionary runs all keys through map(key).
The mapped value can then be translated
back to null via the unmap(Object)
method.
o
- an object.
o == null
, else ounmap(java.lang.Object)
,
NULL_OBJECT_WRAPPER
protected static java.lang.Object unmap(java.lang.Object o)
map(Object)
call.
o
- an object in a collection (possibly the NULL_OBJECT_WRAPPER
)
NULL_OBJECT_WRAPPER
, else the object oNULL_OBJECT_WRAPPER
,
map(Object)
public void addVetoableChangeListener(java.lang.String propertyName, java.beans.VetoableChangeListener listener)
propertyName
- name of the attributelistener
- instance of VetoableChangeListenerpublic void removeVetoableChangeListener(java.lang.String propertyName, java.beans.VetoableChangeListener listener)
propertyName
- name of the attributelistener
- instance of VetoableChangeListenerpublic void fireVetoableChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
propertyName
- name of the attribute that was changedoldValue
- old value of the attributenewValue
- new value of the attributeprotected boolean verifyAttributeType(java.lang.String attributeName, java.lang.Object[] args) throws AttributeSetException, java.rmi.RemoteException
attributeName
- name of the attributeargs[0]
- value to be validated
java.rmi.RemoteException
- if there was an IO error communicating with the RemoteEntity
AttributeSetException
- thrown for the following conditions:
- AttributeType is null
- AttributeType does not have a valid sql type
- value is not valid for the AttributeType
public void setDynamicSupplementalPropertiesDefaultMap(java.util.Map dynamicSupplementalProperties)
setAttribute
method.
dynamicSupplementalProperties
- name/value pairs of
supplemental properties
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |