|
||||||||||
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
public class TimedManyToManyRelation
Default implementation of ITimedManyToManyRelation
interface.
All public constructors set the element type to ITimedManyToManyRelation.TYPE
. Protected constructors should
only be used by direct subclasses to provide the concrete type to the super constructor.
ITimedManyToManyRelation
,
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.ITimedManyToManyRelation |
---|
TYPE |
Constructor Summary | |
---|---|
|
TimedManyToManyRelation()
Default constructor. |
|
TimedManyToManyRelation(IGeneralDataSet<? extends IGeneralElement> dataSet,
List<? extends IEntity> sources,
List<? extends IEntity> targets,
boolean directed,
Date startDate,
Date endDate)
Creates new timed many-to-many relation with given data set, source and target entities, direction, start and end date. |
protected |
TimedManyToManyRelation(Type type)
Initializes element with type. |
protected |
TimedManyToManyRelation(Type type,
UUID id,
List<? extends IEntity> sources,
List<? extends IEntity> targets,
boolean directed,
Date startDate,
Date endDate)
Initializes element with given type, ID, source and target entities, direction, start and end date. |
|
TimedManyToManyRelation(UUID id,
IGeneralDataSet<? extends IGeneralElement> dataSet,
List<? extends IEntity> sources,
List<? extends IEntity> targets,
boolean directed,
Date startDate,
Date endDate)
Creates new timed many-to-many relation with given ID, data set, source and target entities, direction, start and end date. |
Method Summary | |
---|---|
Integer |
getDuration()
Returns the duration of relation in milliseconds. |
Date |
getEndDate()
Returns the date of relation occurrence end. |
Date |
getStartDate()
Returns the date of relation occurrence start. |
TimedManyToManyRelation |
replicate()
Returns a replicated instance of this instance. |
TimedManyToManyRelation |
replicateTo(Object replica)
Replicates this instance state to given replica object. |
void |
setEndDate(Date date)
Sets the date of relation occurrence end. |
void |
setStartDate(Date date)
Sets the date of relation occurrence start. |
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.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 |
Constructor Detail |
---|
public TimedManyToManyRelation()
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 TimedManyToManyRelation(IGeneralDataSet<? extends IGeneralElement> dataSet, List<? extends IEntity> sources, List<? extends IEntity> targets, boolean directed, Date startDate, Date endDate)
dataSet
- the general data set this relation is insources
- reference list to source entities - must contain at least one referencetargets
- reference list to target entities - must contain at least 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 used
IllegalArgumentException
- if end date is before start datepublic TimedManyToManyRelation(UUID id, IGeneralDataSet<? extends IGeneralElement> dataSet, List<? extends IEntity> sources, List<? extends IEntity> targets, boolean directed, Date startDate, Date endDate)
id
- ID of the elementdataSet
- the general data set this relation is insources
- reference list to source entities - must contain at least one referencetargets
- reference list to target entities - must contain at least 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 used
IllegalArgumentException
- if end date is before start dateprotected TimedManyToManyRelation(Type type)
This constructor should be used only by extending classes to implement the default constructor.
type
- type of the elementManyToManyRelation.ManyToManyRelation(Type)
protected TimedManyToManyRelation(Type type, UUID id, List<? extends IEntity> sources, List<? extends IEntity> targets, boolean directed, Date startDate, Date endDate)
type
- type of element which extends this oneid
- ID of the elementsources
- list of source entities - must contain at least one elementtargets
- list of target entities - must contain at least one elementdirected
- 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 used
IllegalArgumentException
- if end date is before start dateMethod Detail |
---|
public Date getStartDate()
getStartDate
in interface ITimedManyToManyRelation
ITimedManyToManyRelation.getStartDate()
public void setStartDate(Date date)
setStartDate
in interface ITimedManyToManyRelation
date
- the start date to setITimedManyToManyRelation.setStartDate(java.util.Date)
public Integer getDuration()
getDuration
in interface ITimedManyToManyRelation
ITimedManyToManyRelation.getDuration()
public Date getEndDate()
getEndDate
in interface ITimedManyToManyRelation
ITimedManyToManyRelation.getEndDate()
public void setEndDate(Date date)
setEndDate
in interface ITimedManyToManyRelation
date
- the end date to setITimedManyToManyRelation.setEndDate(java.util.Date)
public TimedManyToManyRelation 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.
replicateTo
in interface IReplicable
replicateTo
in class ManyToManyRelation
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 TimedManyToManyRelation replicate() throws ReplicationException
replicate
in interface IReplicable
replicate
in class ManyToManyRelation
ReplicationException
- if replication failsIReplicable.replicate()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |