jsdai.lang
Class AEntity

java.lang.Object
  extended byjsdai.lang.SdaiCommon
      extended byjsdai.lang.A_basis
          extended byjsdai.lang.CAggregate
              extended byjsdai.lang.AEntity
All Implemented Interfaces:
Aggregate, QuerySource, SdaiEventSource
Direct Known Subclasses:
AEntitySelect

public class AEntity
extends CAggregate

Specialized class implementing Aggregate for members of type EEntity. See Aggregate for detailed description of methods whose specializations are given here.


Constructor Summary
AEntity()
          Constructs a new object of aggregate AEntity without aggregation type.
AEntity(SdaiSession owning_session)
          Constructs a new object linked to the session of aggregate AEntity without aggregation type.
 
Method Summary
 void addAfter(SdaiIterator it, EEntity value)
          It is a specialization of addAfter(SdaiIterator, Object, EDefined_type []) method - the second parameter is of type EEntity and the third parameter is dropped.
 void addBefore(SdaiIterator it, EEntity value)
          It is a specialization of addBefore(SdaiIterator, Object, EDefined_type []) method - the second parameter is of type EEntity and the third parameter is dropped.
 void addByIndex(int index, EEntity value)
          It is a specialization of addByIndex(int, Object, EDefined_type []) method - the second parameter is of type EEntity and the third parameter is dropped.
 void addUnordered(EEntity value)
          It is a specialization of addUnordered(Object, EDefined_type []) method - the first parameter is of type EEntity and the second parameter is dropped.
 AEntity findMappingInstances(jsdai.dictionary.EEntity_definition sourceEntity, ASdaiModel targetDomain, ASdaiModel mappingDomain, jsdai.mapping.AEntity_mapping instanceMappings, int mode)
          Finds instances that are mappings of given source entity.
 AEntity findMappingInstances(jsdai.dictionary.EEntity_definition sourceEntity, ASdaiModel targetDomain, ASdaiModel mappingDomain, int mode)
          Finds instances that are mappings of given source entity.
 AEntity findMappingInstances(jsdai.mapping.EEntity_mapping entityMapping, ASdaiModel targetDomain, ASdaiModel mappingDomain, jsdai.mapping.AEntity_mapping instanceMappings, int mode)
          Finds instances that are mappings of given source entity.
 AEntity findMappingInstances(jsdai.mapping.EEntity_mapping entityMapping, ASdaiModel targetDomain, ASdaiModel mappingDomain, int mode)
          Finds instances that are mappings of given entity mapping.
 jsdai.mapping.AEntity_mapping findMostSpecificMappings(ASdaiModel dataDomain, ASdaiModel mappingDomain, jsdai.mapping.AEntity_mapping baseMappings, int mode)
          Finds most specific ARM mappings for the instances in the aggregate.
 EEntity getByIndexEntity(int index)
          It is getByIndexObject method with return value of type EEntity instead of Object.
 EEntity getCurrentMemberEntity(SdaiIterator iter)
          It is getCurrentMemberObject method with return value of type EEntity instead of Object.
 ASdaiModel getQuerySourceDomain()
          Returns domain in which to perform a search.
 jsdai.query.SerializableRef getQuerySourceDomainRef()
           
 jsdai.query.SerializableRef getQuerySourceInstanceRef()
           
 AEntity getQuerySourceInstances()
          Returns starting instances which serve as the first input instance set for a query.
 boolean isMember(EEntity value)
          It is a specialization of isMember(Object, EDefined_type []) method - the first parameter is of type EEntity and the second parameter is dropped.
 void removeUnordered(EEntity value)
          It is a specialization of removeUnordered(Object, EDefined_type []) method - the first parameter is of type EEntity and the second parameter is dropped.
 void setByIndex(int index, EEntity value)
          It is a specialization of setByIndex(int, Object, EDefined_type []) method - the second parameter is of type EEntity and the third parameter is dropped.
 void setCurrentMember(SdaiIterator it, EEntity value)
          It is a specialization of setCurrentMember(SdaiIterator, Object, EDefined_type []) method - the second parameter is of type EEntity and the third parameter is dropped.
 
Methods inherited from class jsdai.lang.CAggregate
addAfter, addAfter, addAfter, addAfter, addAggregateByIndex, addBefore, addBefore, addBefore, addBefore, addByIndex, addByIndex, addByIndex, addByIndex, addSdaiListener, addUnordered, addUnordered, addUnordered, addUnordered, attachIterator, clear, createAggregateAfter, createAggregateAsCurrentMember, createAggregateBefore, createAggregateByIndex, createAggregateUnordered, createIterator, equals, getAggregationType, getByIndexBoolean, getByIndexDouble, getByIndexInt, getByIndexObject, getCurrentMemberBoolean, getCurrentMemberDouble, getCurrentMemberInt, getCurrentMemberObject, getLowerBound, getLowerIndex, getMemberCount, getUpperBound, getUpperIndex, getValueBoundByIndex, hashCode, isMember, isMember, isMember, isMember, query, reindexArray, removeByIndex, removeSdaiListener, removeUnordered, removeUnordered, removeUnordered, removeUnordered, resetArrayIndex, setByIndex, setByIndex, setByIndex, setByIndex, setCurrentMember, setCurrentMember, setCurrentMember, setCurrentMember, testByIndex, testByIndex, testCurrentMember, testCurrentMember, testCurrentMemberI, toString, unsetAll, unsetAll, unsetValueByIndex
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jsdai.lang.SdaiEventSource
addSdaiListener, removeSdaiListener
 

Constructor Detail

AEntity

public AEntity()
Constructs a new object of aggregate AEntity without aggregation type. The aggregates of such kind are used as non-persistent lists.

See Also:
Aggregate.getAggregationType()

AEntity

public AEntity(SdaiSession owning_session)
Constructs a new object linked to the session of aggregate AEntity without aggregation type. The aggregates of such kind are used as non-persistent lists.

Parameters:
owning_session - a SdaiSession value
See Also:
Aggregate.getAggregationType()
Method Detail

isMember

public boolean isMember(EEntity value)
                 throws SdaiException
It is a specialization of isMember(Object, EDefined_type []) method - the first parameter is of type EEntity and the second parameter is dropped.

Overrides:
isMember in class CAggregate
Throws:
SdaiException

getByIndexEntity

public EEntity getByIndexEntity(int index)
                         throws SdaiException
It is getByIndexObject method with return value of type EEntity instead of Object.

Overrides:
getByIndexEntity in class CAggregate
Throws:
SdaiException

setByIndex

public void setByIndex(int index,
                       EEntity value)
                throws SdaiException
It is a specialization of setByIndex(int, Object, EDefined_type []) method - the second parameter is of type EEntity and the third parameter is dropped.

Overrides:
setByIndex in class CAggregate
Throws:
SdaiException

addByIndex

public void addByIndex(int index,
                       EEntity value)
                throws SdaiException
It is a specialization of addByIndex(int, Object, EDefined_type []) method - the second parameter is of type EEntity and the third parameter is dropped.

Overrides:
addByIndex in class CAggregate
Throws:
SdaiException

addUnordered

public void addUnordered(EEntity value)
                  throws SdaiException
It is a specialization of addUnordered(Object, EDefined_type []) method - the first parameter is of type EEntity and the second parameter is dropped.

Overrides:
addUnordered in class CAggregate
Throws:
SdaiException

removeUnordered

public void removeUnordered(EEntity value)
                     throws SdaiException
It is a specialization of removeUnordered(Object, EDefined_type []) method - the first parameter is of type EEntity and the second parameter is dropped.

Overrides:
removeUnordered in class CAggregate
Throws:
SdaiException

setCurrentMember

public void setCurrentMember(SdaiIterator it,
                             EEntity value)
                      throws SdaiException
It is a specialization of setCurrentMember(SdaiIterator, Object, EDefined_type []) method - the second parameter is of type EEntity and the third parameter is dropped.

Overrides:
setCurrentMember in class CAggregate
Throws:
SdaiException

addBefore

public void addBefore(SdaiIterator it,
                      EEntity value)
               throws SdaiException
It is a specialization of addBefore(SdaiIterator, Object, EDefined_type []) method - the second parameter is of type EEntity and the third parameter is dropped.

Overrides:
addBefore in class CAggregate
Throws:
SdaiException

addAfter

public void addAfter(SdaiIterator it,
                     EEntity value)
              throws SdaiException
It is a specialization of addAfter(SdaiIterator, Object, EDefined_type []) method - the second parameter is of type EEntity and the third parameter is dropped.

Overrides:
addAfter in class CAggregate
Throws:
SdaiException

getCurrentMemberEntity

public EEntity getCurrentMemberEntity(SdaiIterator iter)
                               throws SdaiException
It is getCurrentMemberObject method with return value of type EEntity instead of Object.

Overrides:
getCurrentMemberEntity in class CAggregate
Throws:
SdaiException

findMappingInstances

public AEntity findMappingInstances(jsdai.dictionary.EEntity_definition sourceEntity,
                                    ASdaiModel targetDomain,
                                    ASdaiModel mappingDomain,
                                    int mode)
                             throws SdaiException
Finds instances that are mappings of given source entity. Instances that satisfies mapping constraints must be in this aggregate of instances, but other instances required by mapping constraints may be in other models within given data domain. This method first finds all possible mappings. These mappings should be defined in specified mapping domain. Then it finds instances for every mapping.

Example:

    AEntity ae = ...;
    EEntity_definition sourceEntity = ...;  // definition of source entity
    AEntity instances = ae.findMappingInstances(sourceEntity, targetDomain, mappingDomain, EEntity.NO_RESTRICTIONS);

This method is part of the mapping extensions of JSDAI.

Parameters:
sourceEntity - this method searches instances that are mappings of this entity
targetDomain - an application domain where to search instances to satisfy mapping constraints. It can be null; then this aggregate of models is used as data domain.
mappingDomain - a domain for mapping constraints and dictionary data.
mode - EEntity.NO_RESTRICTIONS - no restrictions, EEntity.MOST_SPECIFC_ENTITY - returned mappings are restricted to most specific, EEntity.MANDATORY_ATTRIBUTES_SET - in addition to MOST_SPECIFIC_ENTITY it also requires, that all explicit mandatory attributes are set. If there is mapping of subtype entity then mapping of supertype entity is not included. Entities that can not be instanciated are also not included.
Returns:
list of instances that satisfy requirements. Every instance is mentioned only once in this list (elements of list are unique). It will return null if there are no instances that are valid mappings of given entity.
Throws:
SdaiException
See Also:
findMappingInstances(EEntity_mapping, ASdaiModel, ASdaiModel, int), SdaiModel.findMappingInstances(EEntity_definition, ASdaiModel, ASdaiModel, int), EEntity.findEntityMappings(ASdaiModel, ASdaiModel, AEntity_mapping, int)

findMappingInstances

public AEntity findMappingInstances(jsdai.dictionary.EEntity_definition sourceEntity,
                                    ASdaiModel targetDomain,
                                    ASdaiModel mappingDomain,
                                    jsdai.mapping.AEntity_mapping instanceMappings,
                                    int mode)
                             throws SdaiException
Finds instances that are mappings of given source entity. This method provides the similar functionality as findMappingInstances(EEntity_definition, ASdaiModel, ASdaiModel, int) and adds extra possibility to get most specific mappings of the instances.

This method is part of the mapping extensions of JSDAI.

Parameters:
sourceEntity - this method searches instances that are mappings of this entity
targetDomain - the domain where to search instances to satisfy mapping constraints. It can be null.
mappingDomain - the domain for mapping constraints and dictionary data.
instanceMappings - if not null should be an empty aggregate. The most specific entity mappings are returned in this aggregate. The member indexes are synchronized with instance aggregate which is returned from this method. If null then the method works as findMappingInstances(EEntity_definition, ASdaiModel, ASdaiModel, int)
mode - Should always be EEntity.NO_RESTRICTIONS - no restrictions.
Returns:
list of instances that satisfy requirements. If instanceMappings is not null then member indexes in both aggregates make pairs. Every pair (instance, instanceMapping) is mentioned in both aggregates only once. If instanceMappings is null then every instance is mentioned only once in this aggregate.
Throws:
SdaiException - if an error occurs during the operation or in underlying JSDAI operations
See Also:
findMappingInstances(EEntity_definition, ASdaiModel, ASdaiModel, int), SdaiModel.findMappingInstances(EEntity_definition, ASdaiModel, ASdaiModel, AEntity_mapping, int), EEntity.findMostSpecificMappings(jsdai.lang.ASdaiModel, jsdai.lang.ASdaiModel, jsdai.mapping.AEntity_mapping, int), JSDAI Mapping Extension

findMappingInstances

public AEntity findMappingInstances(jsdai.mapping.EEntity_mapping entityMapping,
                                    ASdaiModel targetDomain,
                                    ASdaiModel mappingDomain,
                                    int mode)
                             throws SdaiException
Finds instances that are mappings of given entity mapping. This method is more specific than findMappingInstances(EEntity_definition, ASdaiModel, ASdaiModel, int), because it searches instances that meets requirements only for specified mapping. Instances that satisfy mapping constraints must be in supplied this aggregate of instances, but other instances required by mapping constraints may be in other models within data domain.

Example:

    AEntity ae = ...;
    EEntity_mapping mapping = ...;  // mapping of source entity
    AEntity instances = ae.findMappingInstances(sourceEntity, targetDomain, mappingDomain, EEntity.NO_RESTRICTIONS);

This method is part of the mapping extensions of JSDAI.

Parameters:
entityMapping - this method searches instances that satisfies constraints for this entity mapping.
targetDomain - an application domain where to search instances to satisfy mapping constraints. It can be null; then this aggregate of models is used as data domain.
mappingDomain - a domain for mapping constraints and dictionary data.
mode - EEntity.NO_RESTRICTIONS - no restrictions, EEntity.MOST_SPECIFC_ENTITY - returned mappings are restricted to most specific, EEntity.MANDATORY_ATTRIBUTES_SET - in addition to MOST_SPECIFIC_ENTITY it also requires, that all explicit mandatory attributes are set. If there is mapping of subtype entity then mapping of supertype entity is not included. Entities that can not be instantiated are also not included.
Returns:
list of instances that satisfy requirements. Every instance is mentioned only once in this list (elements of list are unique). It will return null if there are no instances that are valid mappings of given entity.
Throws:
SdaiException
See Also:
findMappingInstances(EEntity_definition, ASdaiModel, ASdaiModel, int), SdaiModel.findMappingInstances(EEntity_mapping, ASdaiModel, ASdaiModel, int), EEntity.findEntityMappings(ASdaiModel, ASdaiModel, AEntity_mapping, int), JSDAI Mapping Extension

findMappingInstances

public AEntity findMappingInstances(jsdai.mapping.EEntity_mapping entityMapping,
                                    ASdaiModel targetDomain,
                                    ASdaiModel mappingDomain,
                                    jsdai.mapping.AEntity_mapping instanceMappings,
                                    int mode)
                             throws SdaiException
Finds instances that are mappings of given source entity. This method provides the similar functionality as findMappingInstances(EEntity_mapping, ASdaiModel, ASdaiModel, int) and adds extra possibility to get most specific mappings of the instances.

This method is part of the mapping extensions of JSDAI.

Parameters:
entityMapping - this method searches instances that satisfies constraints for this entity mapping.
targetDomain - the domain where to search instances to satisfy mapping constraints. It can be null.
mappingDomain - the domain for mapping constraints and dictionary data.
instanceMappings - if not null should be an empty aggregate. The most specific entity mappings are returned in this aggregate. The member indexes are synchronized with instance aggregate which is returned from this method. If null then the method works as findMappingInstances(EEntity_definition, ASdaiModel, ASdaiModel, int)
mode - Should always be EEntity.NO_RESTRICTIONS - no restrictions.
Returns:
list of instances that satisfy requirements. If instanceMappings is not null then member indexes in both aggregates make pairs. Every pair (instance, instanceMapping) is mentioned in both aggregates only once. If instanceMappings is null then every instance is mentioned only once in this aggregate.
Throws:
SdaiException - if an error occurs during the operation or in underlying JSDAI operations
See Also:
findMappingInstances(EEntity_mapping, ASdaiModel, ASdaiModel, int), SdaiModel.findMappingInstances(EEntity_mapping, ASdaiModel, ASdaiModel, AEntity_mapping, int), EEntity.findMostSpecificMappings(jsdai.lang.ASdaiModel, jsdai.lang.ASdaiModel, jsdai.mapping.AEntity_mapping, int), JSDAI Mapping Extension

findMostSpecificMappings

public jsdai.mapping.AEntity_mapping findMostSpecificMappings(ASdaiModel dataDomain,
                                                              ASdaiModel mappingDomain,
                                                              jsdai.mapping.AEntity_mapping baseMappings,
                                                              int mode)
                                                       throws SdaiException
Finds most specific ARM mappings for the instances in the aggregate. This is ARM (mapping) operations support method. It finds most specific mappings for entities in the aggregate. Most specific mapping can be viewed as means to define of which ARM type the AIM entity really is.

Parameters:
dataDomain - is domain which defines where to search instances that satisfy mapping constraints. In the case it is null owning model of target instance will be used as data domain.
mappingDomain - is domain for mapping constraints.
baseMappings - is an aggregate of mapings which define where to start looking for most specific mappings. The mappings returned will be mappings for subtypes of source enitity of base mappings.
mode - is mode for mapping operations. It can be one of: EEntity.NO_RESTRICTIONS EEntity.MOST_SPECIFC_ENTITY EEntity.MANDATORY_ATTRIBUTES_SET
Returns:
it returns an aggregate of entity_mappings that represent most specific mappings. If some instances have more than one most specific mapping all mappings are returned and corresponding instances are duplicates in the aggregate which this method is called for. Beware that number of members in the aggregate may change! Resulting entity_mapping aggregate is always synchronized with the members of the aggregate.
Throws:
SdaiException - All variety of SdaiExceptions can be thrown.
See Also:
JSDAI Mapping Extension

getQuerySourceDomain

public ASdaiModel getQuerySourceDomain()
                                throws SdaiException
Description copied from interface: QuerySource
Returns domain in which to perform a search.

Specified by:
getQuerySourceDomain in interface QuerySource
Overrides:
getQuerySourceDomain in class CAggregate
Throws:
SdaiException

getQuerySourceInstances

public AEntity getQuerySourceInstances()
                                throws SdaiException
Description copied from interface: QuerySource
Returns starting instances which serve as the first input instance set for a query.

Specified by:
getQuerySourceInstances in interface QuerySource
Overrides:
getQuerySourceInstances in class CAggregate
Throws:
SdaiException

getQuerySourceInstanceRef

public jsdai.query.SerializableRef getQuerySourceInstanceRef()
                                                      throws SdaiException
Specified by:
getQuerySourceInstanceRef in interface QuerySource
Overrides:
getQuerySourceInstanceRef in class CAggregate
Throws:
SdaiException
Since:
3.6.0

getQuerySourceDomainRef

public jsdai.query.SerializableRef getQuerySourceDomainRef()
                                                    throws SdaiException
Specified by:
getQuerySourceDomainRef in interface QuerySource
Overrides:
getQuerySourceDomainRef in class CAggregate
Throws:
SdaiException
Since:
3.6.0

Copyright © LKSoftWare GmbH, 1999-2008