pl.edu.agh.cast.data.model.general
Interface IOneToOneRelation

All Superinterfaces:
Identifiable, IDisposable, IDomainElement, IElement, IGeneralElement, IManyToManyRelation, IPropertyContainer, IReplicable, IValidatable, Observer, Serializable
All Known Subinterfaces:
ITimedOneToOneRelation
All Known Implementing Classes:
OneToOneRelation, TimedOneToOneRelation

public interface IOneToOneRelation
extends IManyToManyRelation

An interface of one-to-one relations which have exactly one source and exactly one target entity. A one-to-one relation is a special case of many-to-many relation and may be treated as such.

Author:
AGH CAST Team
See Also:
IManyToManyRelation

Nested Class Summary
 
Nested classes/interfaces inherited from interface pl.edu.agh.cast.data.model.general.IManyToManyRelation
IManyToManyRelation.Properties
 
Field Summary
static Type TYPE
          The type of one-to-one relation elements.
 
Method Summary
 IEntity getSourceEntity()
          Returns the source entity.
 IEntity getTargetEntity()
          Returns the target entity.
 void setSourceEntity(IEntity entity)
          Sets the source entity.
 void setTargetEntity(IEntity entity)
          Sets the target entity.
 
Methods inherited from interface pl.edu.agh.cast.data.model.general.IManyToManyRelation
addSourceEntitiy, addTargetEntitiy, getSourceEntities, getSourceEntitiy, getTargetEntities, getTargetEntitiy, isDirected, removeSourceEntitiy, removeTargetEntitiy, setDirected, setSourceEntities, setTargetEntities
 
Methods inherited from interface pl.edu.agh.cast.data.model.IElement
getDataSet
 
Methods inherited from interface pl.edu.agh.cast.data.model.Identifiable
getId, getType
 
Methods inherited from interface pl.edu.agh.cast.data.model.property.IPropertyContainer
addProperty, getCustomProperties, getMetaPropertyManager, getPermanentProperties, getProperties, getProperty, getTransientProperties, matches, removeProperty, setProperty
 
Methods inherited from interface java.util.Observer
update
 
Methods inherited from interface pl.edu.agh.cast.common.IValidatable
isValid
 
Methods inherited from interface pl.edu.agh.cast.common.IDisposable
dispose
 
Methods inherited from interface pl.edu.agh.cast.common.IReplicable
replicate, replicateTo
 

Field Detail

TYPE

static final Type TYPE
The type of one-to-one relation elements.

Method Detail

getSourceEntity

IEntity getSourceEntity()
Returns the source entity.

Returns:
the source entity (non-null)

setSourceEntity

void setSourceEntity(IEntity entity)
Sets the source entity.

Parameters:
entity - the source entity
Throws:
IllegalArgumentException - if entity is null

getTargetEntity

IEntity getTargetEntity()
Returns the target entity.

Returns:
the target entity (non-null)

setTargetEntity

void setTargetEntity(IEntity entity)
Sets the target entity.

Parameters:
entity - the target entity
Throws:
IllegalArgumentException - if entity is null


Copyright © 2007-2009 IISG AGH-UST Krakow, Poland. All Rights Reserved.