com.sas.services
Class DefaultEntityKeyImpl

com.sas.services.DefaultEntityKeyImpl
All Implemented Interfaces:
com.sas.entities.EntityKeyInterface, java.io.Serializable, java.rmi.Remote

public class DefaultEntityKeyImpl
implements com.sas.entities.EntityKeyInterface, java.io.Serializable

The default implementation for the EntityKeyInterface as supported by the various services.

Since:
1.0
See Also:
Serialized Form

Constructor Summary
DefaultEntityKeyImpl()
           
 
Method Summary
 java.lang.String getEntityKey()
          Gets the entity's key.
 boolean sameEntity(com.sas.entities.EntityKeyInterface entity)
          Determines whether or not the specified entity has the same key as this entity.
 void setEntityKey(java.lang.String entityKey)
          Set the unique entity key for the service.
 

Constructor Detail

DefaultEntityKeyImpl

public DefaultEntityKeyImpl()
Method Detail

getEntityKey

public java.lang.String getEntityKey()
                              throws java.rmi.RemoteException
Gets the entity's key.

Specified by:
getEntityKey in interface com.sas.entities.EntityKeyInterface
Returns:
Entity's key.
Throws:
java.rmi.RemoteException - if a network anomaly is encountered.

setEntityKey

public void setEntityKey(java.lang.String entityKey)
                  throws java.rmi.RemoteException,
                         java.lang.IllegalStateException
Set the unique entity key for the service. The entity key for the services cannot be changed. This method will throw an IllegalStateException.

Specified by:
setEntityKey in interface com.sas.entities.EntityKeyInterface
Parameters:
entityKey - Unique entity key.
Throws:
java.lang.IllegalStateException - if the unique entity key for a service cannot be changed.
java.rmi.RemoteException - if a network anomaly is encountered.

sameEntity

public boolean sameEntity(com.sas.entities.EntityKeyInterface entity)
                   throws java.rmi.RemoteException
Determines whether or not the specified entity has the same key as this entity.

Specified by:
sameEntity in interface com.sas.entities.EntityKeyInterface
Parameters:
entity - Entity whose key is to be compared to this key.
Returns:
true if the keys are the same or false if they aren't.
Throws:
java.rmi.RemoteException - if a network anomaly is encountered.



Copyright © 2009 SAS Institute Inc. All Rights Reserved.