|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpl.edu.agh.cast.data.model.property.PropertyContainer
pl.edu.agh.cast.data.model.AbstractElement
pl.edu.agh.cast.data.model.general.ManyToManyRelation
pl.edu.agh.cast.data.model.general.TimedManyToManyRelation
pl.edu.agh.cast.data.model.general.TimedOneToOneRelation
public class TimedOneToOneRelation
Default implementation of ITimedOneToOneRelation
used in GeneralDataSet
.
All public constructors set the element type to ITimedOneToOneRelation.TYPE
. Protected constructors should
only be used by direct subclasses to provide the concrete type to the super constructor.
ITimedOneToOneRelation
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from interface pl.edu.agh.cast.data.model.general.ITimedManyToManyRelation |
---|
ITimedManyToManyRelation.Properties |
Field Summary |
---|
Fields inherited from interface pl.edu.agh.cast.data.model.general.ITimedOneToOneRelation |
---|
TYPE |
Constructor Summary | |
---|---|
|
TimedOneToOneRelation()
Default constructor. |
|
TimedOneToOneRelation(IGeneralDataSet<? extends IGeneralElement> dataSet,
IEntity source,
IEntity target,
boolean directed,
Date date)
Creates new timed one-to-one relation with given data set, source and target entity, direction and date (start == end). |
|
TimedOneToOneRelation(IGeneralDataSet<? extends IGeneralElement> dataSet,
IReferenceList<IEntity> sources,
IReferenceList<IEntity> targets,
boolean directed,
Date date)
Creates new timed one-to-one relation with given data set, source and target entity (lists), direction and date (start == end). |
protected |
TimedOneToOneRelation(Type type)
Initializes element with type. |
protected |
TimedOneToOneRelation(Type type,
UUID id,
IReferenceList<IEntity> sources,
IReferenceList<IEntity> targets,
boolean directed,
Date startDate,
Date endDate)
Initializes element with given data set, source and target entity (lists), direction and start and end date. |
|
TimedOneToOneRelation(UUID id,
IGeneralDataSet<? extends IGeneralElement> dataSet,
IEntity source,
IEntity target,
boolean directed,
Date startDate,
Date endDate)
Creates new timed one-to-one relation with given ID, data set, source and target entity, direction and start and end dates. |
Method Summary | |
---|---|
IEntity |
getSourceEntity()
Returns the source entity. |
IEntity |
getTargetEntity()
Returns the target entity. |
TimedOneToOneRelation |
replicate()
Returns a replicated instance of this instance. |
TimedOneToOneRelation |
replicateTo(Object replica)
Replicates this instance state to given replica object. |
void |
setSourceEntity(IEntity entity)
Sets the source entity. |
void |
setTargetEntity(IEntity entity)
Sets the target entity. |
Methods inherited from class pl.edu.agh.cast.data.model.general.TimedManyToManyRelation |
---|
getDuration, getEndDate, getStartDate, setEndDate, setStartDate |
Methods inherited from class pl.edu.agh.cast.data.model.general.ManyToManyRelation |
---|
addSourceEntitiy, addTargetEntitiy, getDescString, getSourceEntities, getSourceEntitiy, getTargetEntities, getTargetEntitiy, isDirected, isEntityListValid, isEntityValid, isSourceEntitiesResolved, isSourceEntityListValid, isTargetEntitiesResolved, isTargetEntityListValid, removeSourceEntitiy, removeTargetEntitiy, setDirected, setSourceEntities, setTargetEntities |
Methods inherited from class pl.edu.agh.cast.data.model.AbstractElement |
---|
afterSetMetaPropertyManager, canReplicateTo, checkIfValid, equals, getDataSet, getId, getType, hashCode, isValid, setDataSet, setId, setType, toString |
Methods inherited from class pl.edu.agh.cast.data.model.property.PropertyContainer |
---|
addProperty, createProperty, dispose, getCustomProperties, getMetaPropertyManager, getPermanentProperties, getProperties, getProperty, getTransientProperties, initializeProperties, matches, removeProperty, setMetaPropertyManager, setProperty, update |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface pl.edu.agh.cast.data.model.general.ITimedManyToManyRelation |
---|
getDuration, getEndDate, getStartDate, setEndDate, setStartDate |
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.IDisposable |
---|
dispose |
Constructor Detail |
---|
public TimedOneToOneRelation()
Usage of this constructor is discouraged, since it does not provide any integrity control. If, however, this
constructor is used, the AbstractElement.isValid()
method should be called in order to check the integrity.
public TimedOneToOneRelation(UUID id, IGeneralDataSet<? extends IGeneralElement> dataSet, IEntity source, IEntity target, boolean directed, Date startDate, Date endDate)
id
- ID of the elementdataSet
- the general data set this relation is insource
- the source entity of this relationtarget
- the target entity of this relationdirected
- the flag indicating whether the relation is directed or not (see
IManyToManyRelation.isDirected()
)startDate
- date of relation occurrence startendDate
- date of relation occurrence end, if null
, then startDate
is usedpublic TimedOneToOneRelation(IGeneralDataSet<? extends IGeneralElement> dataSet, IEntity source, IEntity target, boolean directed, Date date)
dataSet
- the general data set this relation is insource
- the source entity of this relationtarget
- the target entity of this relationdirected
- the flag indicating whether the relation is directed or not (see
IManyToManyRelation.isDirected()
)date
- date of relation occurrence (no duration)public TimedOneToOneRelation(IGeneralDataSet<? extends IGeneralElement> dataSet, IReferenceList<IEntity> sources, IReferenceList<IEntity> targets, boolean directed, Date date)
dataSet
- the general data set this relation is insources
- reference list to source entities - must contain exactly one referencetargets
- reference list to target entities - must contain exactly one referencedirected
- the flag indicating whether the relation is directed or not (see
IManyToManyRelation.isDirected()
)date
- date of relation occurrence (no duration)protected TimedOneToOneRelation(Type type)
This constructor should be used only by extending classes to implement the default constructor.
type
- type of the elementTimedManyToManyRelation.TimedManyToManyRelation(Type)
protected TimedOneToOneRelation(Type type, UUID id, IReferenceList<IEntity> sources, IReferenceList<IEntity> targets, boolean directed, Date startDate, Date endDate)
type
- type of element which extends this onesources
- reference list to source entities - must contain exactly one referencetargets
- reference list to target entities - must contain exactly one referencedirected
- the flag indicating whether the relation is directed or not (see
IManyToManyRelation.isDirected()
)startDate
- date of relation occurrence startendDate
- date of relation occurrence end, if null
, then startDate
is usedMethod Detail |
---|
public IEntity getSourceEntity()
getSourceEntity
in interface IOneToOneRelation
null
)IOneToOneRelation.getSourceEntity()
public void setSourceEntity(IEntity entity)
setSourceEntity
in interface IOneToOneRelation
entity
- the source entity#setSourceEntity(pl.edu.agh.cast.data.model.general.IEntity)
public IEntity getTargetEntity()
getTargetEntity
in interface IOneToOneRelation
null
)IOneToOneRelation.getTargetEntity()
public void setTargetEntity(IEntity entity)
setTargetEntity
in interface IOneToOneRelation
entity
- the target entity#setTargetEntity(pl.edu.agh.cast.data.model.general.IEntity)
public TimedOneToOneRelation replicateTo(Object replica) throws IllegalArgumentException, ReplicationException
Replicates element type and ID.
Replicates relation direction, the lists of source and target entities are empty.
Replicates relation direction, the lists of source and target entities are empty.
Replicates relation direction, the lists of source and target entities are empty.
replicateTo
in interface IReplicable
replicateTo
in class TimedManyToManyRelation
replica
- the object to replicate to
IllegalArgumentException
- if given object is null or of invalid type
ReplicationException
- if replication failsManyToManyRelation.replicateTo(java.lang.Object)
public TimedOneToOneRelation replicate() throws ReplicationException
replicate
in interface IReplicable
replicate
in class TimedManyToManyRelation
ReplicationException
- if replication failsIReplicable.replicate()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |