eu.xtreemos.xosd.localallocmgr.basic.manipulators
Class TimeTableAdd
java.lang.Object
eu.xtreemos.xosd.localallocmgr.basic.manipulators.TimeTableAdd
public class TimeTableAdd
- extends java.lang.Object
basic manipulator that adds elements to the timetable.
- Author:
- urosjovanovic
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TimeTableAdd
public TimeTableAdd()
addElm
public static boolean addElm(TimeTable tt,
TTElm newelm)
throws AttributeConformanceException
- Throws:
AttributeConformanceException
add
private static boolean add(TimeTable tt,
TTElm newelm)
throws AttributeConformanceException
- when the join operation returns the array of elements
the new elements need to be identified and if new
one is introduced, it needs to be added.
before joining, the elements in question must be stored
in a transaction. when something goes wrong, restore all
objects in question. Note: store only the object that
are already present in the table.
- Parameters:
newelm
-
- Throws:
AttributeConformanceException
handleException
private static void handleException(TTElmJoinException e)
isBefore
private static boolean isBefore(TTElm stored,
java.util.GregorianCalendar newStart)
throws AttributeConformanceException
- check if the ttelm starts before the new element
- Parameters:
stored
- newStart
-
- Returns:
-
- Throws:
AttributeConformanceException
isCompleteBefore
private static boolean isCompleteBefore(TTElm stored,
TTElm newelm)
throws AttributeConformanceException
- Throws:
AttributeConformanceException
endsBefore
private static boolean endsBefore(TTElm stored,
java.util.GregorianCalendar newStart)
throws AttributeConformanceException
- Throws:
AttributeConformanceException
hasIntersection
private static boolean hasIntersection(TTElm stored,
TTElm newelm,
java.util.GregorianCalendar newStart)
throws AttributeConformanceException
- Throws:
AttributeConformanceException