MonitoredEntities
Class EntityRepositoryImpl

java.lang.Object
  |
  +--org.omg.PortableServer.Servant
        |
        +--MonitoredEntities.EntityRepositoryPOA
              |
              +--MonitoredEntities.EntityRepositoryImpl
All Implemented Interfaces:
MonitoredEntities.EntityRepositoryOperations, org.omg.CORBA.portable.InvokeHandler

public class EntityRepositoryImpl
extends MonitoredEntities.EntityRepositoryPOA

Implements the MonitoredEntities.EntityRepository interface.


Constructor Summary
EntityRepositoryImpl(org.omg.CORBA.ORB orb, org.omg.PortableServer.POA et_poa, org.omg.PortableServer.POA e_poa, org.omg.PortableServer.POA p_poa, Persistence pobj, EntityTypeLocatorImpl et_locator, EntityLocatorImpl e_locator, ParameterLocatorImpl p_locator)
          Receive references to orb, poa and Persistence objects.
 
Method Summary
 MonitoredEntities.Entity add_me(java.lang.String meid, MonitoredEntities.EntityType metype, java.lang.String description, java.lang.String[] attributes)
          Creates a entity object.
 MonitoredEntities.EntityType add_metype(java.lang.String metid, java.lang.String description)
          Creates a entity type object.
 MonitoredEntities.Parameter add_parameter(java.lang.String pid, java.lang.String description, MonitoredEntities.EntityType metype, MonitoredEntities.range[] ranges)
          Creates a parameter object.
 void erase_me(java.lang.String meid)
          Destroy an entity object by removing it from persistent storage.
 void erase_metype(java.lang.String metid)
          Destroy an entity type object by removing it from persistent storage.
 void erase_parameter(java.lang.String pid)
          Destroy an parameter object by removing it from persistent storage.
 MonitoredEntities.Entity get_me_ref(java.lang.String meid)
          Returns the ior reference for the entity identified by meid.
 MonitoredEntities.EntityType get_metype_ref(java.lang.String metid)
          Returns the ior reference for the entity type identified by metid.
 MonitoredEntities.Parameter get_parameter_ref(java.lang.String pid)
          Returns the ior reference for the parameter identified by pid.
 
Methods inherited from class MonitoredEntities.EntityRepositoryPOA
_all_interfaces, _invoke, _this, _this
 
Methods inherited from class org.omg.PortableServer.Servant
_default_POA, _get_delegate, _get_interface, _is_a, _non_existent, _object_id, _orb, _poa, _set_delegate, _this_object, _this_object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityRepositoryImpl

public EntityRepositoryImpl(org.omg.CORBA.ORB orb,
                            org.omg.PortableServer.POA et_poa,
                            org.omg.PortableServer.POA e_poa,
                            org.omg.PortableServer.POA p_poa,
                            Persistence pobj,
                            EntityTypeLocatorImpl et_locator,
                            EntityLocatorImpl e_locator,
                            ParameterLocatorImpl p_locator)
Receive references to orb, poa and Persistence objects.
Parameters:
orb - reference to orb
the_poa - refence to poa
Pobj - reference to Persistence object
et_locator - reference to entity type locator
e_locator - reference to entity locator
p_locator - reference to parameter locator
Method Detail

add_metype

public MonitoredEntities.EntityType add_metype(java.lang.String metid,
                                               java.lang.String description)
                                        throws MonitoredEntities.EntityTypeAlreadyExist
Creates a entity type object. Creates a entity type object and saves it state to persistent storage.
Overrides:
add_metype in class MonitoredEntities.EntityRepositoryPOA
Parameters:
metid - the identification of the object being created
description - its description
Returns:
the ior reference for the entity type object that was created

add_me

public MonitoredEntities.Entity add_me(java.lang.String meid,
                                       MonitoredEntities.EntityType metype,
                                       java.lang.String description,
                                       java.lang.String[] attributes)
                                throws MonitoredEntities.EntityAlreadyExist
Creates a entity object. Creates a entity object and saves it state to persistent storage.
Overrides:
add_me in class MonitoredEntities.EntityRepositoryPOA
Parameters:
meid - the identification of the object being created
metype - a reference for the entity type of the entity to be created
description - its description
attributes - its list of attributes
Returns:
the ior reference for the entity object that was created

add_parameter

public MonitoredEntities.Parameter add_parameter(java.lang.String pid,
                                                 java.lang.String description,
                                                 MonitoredEntities.EntityType metype,
                                                 MonitoredEntities.range[] ranges)
                                          throws MonitoredEntities.ParameterAlreadyExist
Creates a parameter object. Creates a parameter object and saves it state to persistent storage.
Overrides:
add_parameter in class MonitoredEntities.EntityRepositoryPOA
Parameters:
pid - the identification of the object being created
description - its description
metype - a reference to the entity type the parameter is related to
range - its list of ranges
Returns:
the ior reference for the parameter object that was created

get_metype_ref

public MonitoredEntities.EntityType get_metype_ref(java.lang.String metid)
                                            throws MonitoredEntities.NoSuchEntityType
Returns the ior reference for the entity type identified by metid.
Overrides:
get_metype_ref in class MonitoredEntities.EntityRepositoryPOA
Parameters:
metid - the identification of the entity type
Returns:
the reference for the entity type

get_me_ref

public MonitoredEntities.Entity get_me_ref(java.lang.String meid)
                                    throws MonitoredEntities.NoSuchEntity
Returns the ior reference for the entity identified by meid.
Overrides:
get_me_ref in class MonitoredEntities.EntityRepositoryPOA
Parameters:
meid - the identification of the entity
Returns:
the reference for the entity

get_parameter_ref

public MonitoredEntities.Parameter get_parameter_ref(java.lang.String pid)
                                              throws MonitoredEntities.NoSuchParameter
Returns the ior reference for the parameter identified by pid.
Overrides:
get_parameter_ref in class MonitoredEntities.EntityRepositoryPOA
Parameters:
pid - the identification of the parameter
Returns:
the reference for the parameter

erase_metype

public void erase_metype(java.lang.String metid)
                  throws MonitoredEntities.NoSuchEntityType,
                         MonitoredEntities.RIViolate
Destroy an entity type object by removing it from persistent storage.
Overrides:
erase_metype in class MonitoredEntities.EntityRepositoryPOA
Parameters:
metid - the identification of the entity type to be destroyed

erase_me

public void erase_me(java.lang.String meid)
              throws MonitoredEntities.NoSuchEntity
Destroy an entity object by removing it from persistent storage.
Overrides:
erase_me in class MonitoredEntities.EntityRepositoryPOA
Parameters:
meid - the identification of the entity to be destroyed

erase_parameter

public void erase_parameter(java.lang.String pid)
                     throws MonitoredEntities.NoSuchParameter
Destroy an parameter object by removing it from persistent storage.
Overrides:
erase_parameter in class MonitoredEntities.EntityRepositoryPOA
Parameters:
pid - the identification of the parameter to be destroyed