Skip navigation links

Oracle® Data Integrator Java API Reference
11g Release 1 (11.1.1.6.0)

E17060-03


oracle.odi.domain.runtime.scheduling
Class OdiSchedule

java.lang.Object
  extended by oracle.odi.domain.support.BusinessObject
      extended by oracle.odi.domain.support.AbstractRepositoryEntity
          extended by oracle.odi.domain.support.AbstractOdiEntity
              extended by oracle.odi.domain.runtime.scheduling.OdiSchedule

All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, IOdiEntity, IRepositoryEntity, IWorkRuntimeOdiEntity
Direct Known Subclasses:
OdiLoadPlanSchedule, OdiScenarioSchedule

public abstract class OdiSchedule
extends oracle.odi.domain.support.AbstractOdiEntity
implements IWorkRuntimeOdiEntity

Abstract high-level object encompassing ODI Scenario Schedule and ODI Load Plan Schedule.

OdiSchedule is an abstract class that doesn't represent any actual ODI concept. However, it manages commons requirements, of both OdiScenarioSchedule and OdiLoadPlanSchedule. As such, it provides getter and setter methods for commons properties like agent name, context code, activation period, recurrence of execution and others.

OdiSchedule also provides methods to manage OdiJobStartupParams. OdiSchedule is the root entity of the OdiSchedule - OdiJobStartupParam aggregate. Thus an instance of OdiSchedule controls life cycle of every OdiJobStartupParam instances that belongs to it.

An OdiSchedule has an ID that can be obtained from getScheduleId() method call. This ID is assigned when an OdiSchedule is stored into run-time repository. This ID represents the identity of an OdiSchedule. Equals / hashCode method are implemented according this identity.

Example of usage:
OdiSchedule schedule = new OdiScenarioSchedule(odiScenario, "GLOBAL", "testAgent");
Recurrence monthlyRecurrence = Recurrence.createMonthlyRecurrence(new DayOfMonth(15), new TimeOfDay(14,30,59));
Period repetitionInterval = new Period(2, TimeUnit.MINUTE);
Repetition repetition = new Repetition(2, null, repetitionInterval);
schedule.setRecurrence(recurrence);
schedule.setRepetition(repetition);

Since:
11.1.1.6.0
See Also:
OdiScenarioSchedule, OdiLoadPlanSchedule, OdiJobStartupParam, Recurrence, Repetition, Serialized Form

Field Summary

 

Fields inherited from class oracle.odi.domain.support.AbstractOdiEntity
STARTING_INTERNAL_VERSION

 

Method Summary
 ExplicitDate getActiveFromDate()
          Returns the representation of the beginning time of activation period.
 ExplicitDate getActiveToDate()
          Returns the representation of the ending time of activation period.
 int getAttemptNbOnFailure()
          Returns the number of consecutive attempts if errors occur during the execution.
 java.lang.String getContextCode()
          Returns the code of the ODI context to be used when executing this schedule's job.
 TimeRange getDailyActivationTimeRange()
          Returns the daily activation time range - aggregation of beginning and ending time of day, where this schedule is active.
 java.lang.String getExcludedMonthDaysPattern()
          Returns the pattern string for month days excluded from activation period.
 RecurrenceAttributes.DayOfWeek[] getExcludedWeekDays()
          Returns the array of week days excluded from activation period.
 ExecutionMode getExecutionMode()
          Returns the execution mode for ODI session(s) to be executed.
 java.io.Serializable getInternalId()
          Provides a common getter for the persistence layer to obtain an identity, irrespective of the actual type of identity used.
 java.util.Collection<OdiJobStartupParam> getJobStartupParams()
          Returns the unmodifiable collection of OdiJobStartupParams related to this schedule.
 java.lang.String getLogicalAgentName()
          Returns the name of the ODI logical agent for which this schedule is defined.
 Period getMaxRunDuration()
          Returns the maximum duration of one job run.
 Recurrence getRecurrence()
          Returns the recurrence of this OdiSchedule.
 Repetition getRepetition()
          Returns the repetition aggregation for this OdiSchedule.
 java.lang.Number getScheduleId()
          Returns the ID of OdiSchedule.
 ScheduleStatus getStatus()
          Returns the activation status of this OdiSchedule.
 void removeJobStartupParam(OdiJobStartupParam pStartupParam)
          Removes the specified startup parameter.
 void setActiveFromDate(ExplicitDate pActiveFromDate)
          Sets the representation of the beginning time of activation period.
 void setActiveToDate(ExplicitDate pActiveToDate)
          Sets the representation of the ending time of activation period.
 void setAttemptNbOnFailure(int pAttemptNbOnFailure)
          Sets the number of consecutive attempts if errors occur during the execution.
 void setContextCode(java.lang.String pContextCode)
          Defines the code of the ODI context to be used when executing this schedule's job.
 void setDailyActivationTimeRange(TimeRange pDailyActivationTimeRange)
          Sets the daily activation time range - aggregation of beginning and ending time of day, where this schedule should be active.
 void setExcludedMonthDaysPattern(java.lang.String pExcludedMonthDaysPattern)
          Sets the pattern string for month days excluded from activation period.
 void setExcludedWeekDays(RecurrenceAttributes.DayOfWeek[] pExcludedWeekDays)
          Specifies the array of week days to be excluded from activation period.
 void setExecutionMode(ExecutionMode pExecutionMode)
          Sets the execution mode for ODI session(s) to be executed.
 void setLogicalAgentName(java.lang.String pLogicalAgentName)
          Defines the name of the ODI logical agent for which this schedule is defined.
 void setMaxRunDuration(Period pMaxRunDuration)
          Sets the maximum duration of one job run.
 void setRecurrence(Recurrence pRecurrence)
          Sets the recurrence for this OdiSchedule.
 void setRepetition(Repetition pRepetition)
          Sets the repetition for this OdiSchedule.
 void setStatus(ScheduleStatus pStatus)
          Sets the activation status for this OdiSchedule.

 

Methods inherited from class oracle.odi.domain.support.AbstractOdiEntity
equals, getFirstDate, getFirstUser, getInternalVersion, getLastDate, getLastUser, getName, hashCode, isInstanceLevelSecurityNeeded, isNew, toString

 

Methods inherited from class oracle.odi.domain.support.BusinessObject
clone

 

Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait

 

Methods inherited from interface oracle.odi.domain.IOdiEntity
getFirstDate, getFirstUser, getLastDate, getLastUser, getName, isInstanceLevelSecurityNeeded

 

Methods inherited from interface oracle.odi.domain.IRepositoryEntity
getSecurityContainer

 

Method Detail

getInternalId

public java.io.Serializable getInternalId()
Description copied from interface: IRepositoryEntity
Provides a common getter for the persistence layer to obtain an identity, irrespective of the actual type of identity used.

Typically a subclass will delegate to a public SomePrimitiveWrapper getId() method. The necessity for the getInternalId() abstract method is solely because the persistence layer needs a way of obtaining the identity irrespective of the actual identity implementation choice.

Returning null from this method will indicate the object has never been saved. This will likely be relied on by some DAO implementations.

Specified by:
getInternalId in interface IRepositoryEntity
Returns:
the persistence identity of this instance

getScheduleId

public java.lang.Number getScheduleId()
Returns the ID of OdiSchedule.
Returns:
schedule ID

getContextCode

public java.lang.String getContextCode()
Returns the code of the ODI context to be used when executing this schedule's job.
Returns:
context code
See Also:
setContextCode(String)

setContextCode

public void setContextCode(java.lang.String pContextCode)
Defines the code of the ODI context to be used when executing this schedule's job.
Parameters:
pContextCode - context code to set
Throws:
DomainRuntimeException - if specified context code is null or empty string
See Also:
getContextCode()

getLogicalAgentName

public java.lang.String getLogicalAgentName()
Returns the name of the ODI logical agent for which this schedule is defined.
Returns:
logical agent name
See Also:
setLogicalAgentName(String)

setLogicalAgentName

public void setLogicalAgentName(java.lang.String pLogicalAgentName)
Defines the name of the ODI logical agent for which this schedule is defined.
Parameters:
pLogicalAgentName - logical agent name to set
Throws:
DomainRuntimeException - if specified logical agent name is null or empty string
See Also:
getLogicalAgentName()

getExecutionMode

public ExecutionMode getExecutionMode()
Returns the execution mode for ODI session(s) to be executed.
Returns:
execution mode
See Also:
ExecutionMode, setExecutionMode(ExecutionMode)

setExecutionMode

public void setExecutionMode(ExecutionMode pExecutionMode)
Sets the execution mode for ODI session(s) to be executed.
Parameters:
pExecutionMode - execution mode to set
See Also:
ExecutionMode, getExecutionMode()

getStatus

public ScheduleStatus getStatus()
Returns the activation status of this OdiSchedule.
Returns:
activation status
See Also:
ScheduleStatus, setStatus(ScheduleStatus)

setStatus

public void setStatus(ScheduleStatus pStatus)
Sets the activation status for this OdiSchedule.
Parameters:
pStatus - activation status to set
Throws:
DomainRuntimeException - if specified status is null
See Also:
ScheduleStatus, getStatus()

getActiveFromDate

public ExplicitDate getActiveFromDate()

Returns the representation of the beginning time of activation period. Can be null, which means that the schedule is active from the creation time.

This property is relevant only for ScheduleStatus.ACTIVE_FOR_PERIOD status, and meaningless for others.

Returns:
beginning date of activation period
See Also:
ExplicitDate, getStatus(), setActiveFromDate(ExplicitDate), getActiveToDate()

setActiveFromDate

public void setActiveFromDate(ExplicitDate pActiveFromDate)

Sets the representation of the beginning time of activation period. Can be set to null, which makes this schedule active from the current time of creation (modification).

This property is relevant only for ScheduleStatus.ACTIVE_FOR_PERIOD status, and meaningless for others.

Parameters:
pActiveFromDate - the activeFromDate to set
See Also:
ExplicitDate, getStatus(), getActiveFromDate(), getActiveToDate(), setActiveToDate(ExplicitDate)

getActiveToDate

public ExplicitDate getActiveToDate()

Returns the representation of the ending time of activation period. Can be null, which means that the schedule is active infinitely after the activation period beginning.

This property is relevant only for ScheduleStatus.ACTIVE_FOR_PERIOD status, and meaningless for others.

Returns:
ending date of activation period
See Also:
ExplicitDate, getStatus(), setActiveToDate(ExplicitDate), getActiveFromDate()

setActiveToDate

public void setActiveToDate(ExplicitDate pActiveToDate)

Sets the representation of the ending time of activation period. Can be set to null, which makes this schedule active infinitely in future.

This property is relevant only for ScheduleStatus.ACTIVE_FOR_PERIOD status, and meaningless for others.

Parameters:
pActiveToDate - the activeFromDate to set
See Also:
ExplicitDate, getStatus(), getActiveToDate(), getActiveFromDate(), setActiveFromDate(ExplicitDate)

getDailyActivationTimeRange

public TimeRange getDailyActivationTimeRange()

Returns the daily activation time range - aggregation of beginning and ending time of day, where this schedule is active. Can be null, which means that the schedule is active throughout the day.

This property is relevant only for ScheduleStatus.ACTIVE_FOR_PERIOD status, and meaningless for others.

Returns:
daily activation time range
See Also:
TimeRange, RecurrenceAttributes.TimeOfDay, getStatus(), setDailyActivationTimeRange(TimeRange)

setDailyActivationTimeRange

public void setDailyActivationTimeRange(TimeRange pDailyActivationTimeRange)

Sets the daily activation time range - aggregation of beginning and ending time of day, where this schedule should be active. Can be set to null, which makes this schedule active throughout the day.

This property is relevant only for ScheduleStatus.ACTIVE_FOR_PERIOD status, and meaningless for others.

Parameters:
pDailyActivationTimeRange - daily activation time range to set
See Also:
TimeRange, RecurrenceAttributes.TimeOfDay, getStatus(), getDailyActivationTimeRange()

getExcludedMonthDaysPattern

public java.lang.String getExcludedMonthDaysPattern()

Returns the pattern string for month days excluded from activation period. Semicolon and hyphen symbols are used as delimiters.

Example:"1;3;5-12;27".

This property is relevant only for ScheduleStatus.ACTIVE_FOR_PERIOD status, and meaningless for others.

Returns:
excluded month days pattern
See Also:
setExcludedMonthDaysPattern(String), getStatus()

setExcludedMonthDaysPattern

public void setExcludedMonthDaysPattern(java.lang.String pExcludedMonthDaysPattern)

Sets the pattern string for month days excluded from activation period. Semicolon and hyphen symbols should be used as delimiters.

Example:"1;3;5-12;27".

This property is relevant only for ScheduleStatus.ACTIVE_FOR_PERIOD status, and meaningless for others.

Parameters:
pExcludedMonthDays - excluded month days pattern to set
See Also:
getExcludedMonthDaysPattern(), getStatus()

getExcludedWeekDays

public RecurrenceAttributes.DayOfWeek[] getExcludedWeekDays()

Returns the array of week days excluded from activation period.

This property is relevant only for ScheduleStatus.ACTIVE_FOR_PERIOD status, and meaningless for others.

Returns:
excluded week days
See Also:
#setExcludedWeekDays(DayOfWeek[]), getStatus(), RecurrenceAttributes.DayOfWeek

setExcludedWeekDays

public void setExcludedWeekDays(RecurrenceAttributes.DayOfWeek[] pExcludedWeekDays)

Specifies the array of week days to be excluded from activation period.

This property is relevant only for ScheduleStatus.ACTIVE_FOR_PERIOD status, and meaningless for others.

Parameters:
pExcludedWeekDays - excluded week days to set
See Also:
getExcludedWeekDays(), getStatus(), RecurrenceAttributes.DayOfWeek

getRecurrence

public Recurrence getRecurrence()
Returns the recurrence of this OdiSchedule.
Returns:
recurrence
See Also:
Recurrence, setRecurrence(Recurrence)

setRecurrence

public void setRecurrence(Recurrence pRecurrence)
Sets the recurrence for this OdiSchedule.
Parameters:
pRecurrence - recurrence to set
Throws:
DomainRuntimeException - if specified recurrence is null
See Also:
Recurrence, getRecurrence()

getRepetition

public Repetition getRepetition()
Returns the repetition aggregation for this OdiSchedule.
Returns:
repetition
See Also:
Repetition, setRepetition(Repetition)

setRepetition

public void setRepetition(Repetition pRepetition)
Sets the repetition for this OdiSchedule.
Parameters:
pRepetition - repetition to set
Throws:
DomainRuntimeException - if specified repetition is null
See Also:
Repetition, getRepetition()

getMaxRunDuration

public Period getMaxRunDuration()
Returns the maximum duration of one job run. Execution will be stopped after this period. Can be null, which means no limit.
Returns:
maximum duration of one run
See Also:
setMaxRunDuration(Period), Period

setMaxRunDuration

public void setMaxRunDuration(Period pMaxRunDuration)
Sets the maximum duration of one job run. Execution will be stopped after specified period. Can be set to null, which means no limit.
Parameters:
pMaxRunDuration - maximum duration of one run to set
See Also:
getMaxRunDuration(), Period

getAttemptNbOnFailure

public int getAttemptNbOnFailure()
Returns the number of consecutive attempts if errors occur during the execution. 0 means no retries, -1 means retrying always.
Returns:
number of attempts on error
See Also:
setAttemptNbOnFailure(int)

setAttemptNbOnFailure

public void setAttemptNbOnFailure(int pAttemptNbOnFailure)
Sets the number of consecutive attempts if errors occur during the execution. Can be positive integer number, 0 (no retries) or -1 (retrying always).
Parameters:
pAttemptNbOnFailure - number of attempts on error to set
Throws:
DomainRuntimeException - if specified number is not valid (less than -1)
See Also:
getAttemptNbOnFailure()

getJobStartupParams

public java.util.Collection<OdiJobStartupParam> getJobStartupParams()
Returns the unmodifiable collection of OdiJobStartupParams related to this schedule. This collection contains startup parameters for Session or Load Plan Instance.
Returns:
collection of startup parameters
See Also:
OdiJobStartupParam, removeJobStartupParam(OdiJobStartupParam)

removeJobStartupParam

public void removeJobStartupParam(OdiJobStartupParam pStartupParam)
Removes the specified startup parameter.
Parameters:
pStartupParam - startup parameter to remove
Throws:
DomainRuntimeException - if specified param is not relevant to this schedule
See Also:
OdiJobStartupParam, getJobStartupParams()

Skip navigation links

Oracle® Data Integrator Java API Reference
11g Release 1 (11.1.1.6.0)

E17060-03


Copyright © 2011, Oracle and/or its affiliates. All rights reserved.