|
Primavera Integration API 7.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.primavera.integration.client.BOBase
com.primavera.integration.client.bo.BusinessObject
com.primavera.integration.client.bo.base.CalendarBase
com.primavera.integration.client.bo.object.Calendar
public class Calendar
Calendars defined the available work hours in each calendar day. Three types exist: global, resource, and project. Either resource or global calendars can be assigned to resources, and either global or project calendars can be assigned to activities.
You can specify national holidays, your organization's holidays, project-specific work/nonworkdays, and resource vacation days. Calendar assignments are used for activity scheduling, tracking, and resource leveling. Whether an activity uses its assigned calendar or the calendar of an assigned resource depends on the activity type you specify.
You can link resource and project calendars to global calendars. Then, if you make changes to a global calendar, your changes apply to all resource and project calendars that are linked to the modified global calendar.
You can get the total work hours or detailed work hours for a given date or day of the week using the methods getTotalWorkHours(), getDetailedWorkHours(), getStandardTotalWorkHours(), and getStandardDetailedWorkHours(). Detailed work hours provide information on specific worktime during the day, in half hour increments. To set work time for a particular date or day of the week, use the setDetailedWorkHours() and setStandardDetailedWorkHours() methods. To get a complete list of all dates for which holidays or exceptions are defined, use the method getHolidayExceptionDates().
See Also: Quick reference of Calendar fields
Constructor Summary | |
---|---|
Calendar(Session session)
Class constructor specifying the Session. |
|
Calendar(Session session,
ObjectId objId)
Class constructor specifying the Session and ObjectId of the object. |
|
Calendar(Session session,
com.primavera.infr.db.PrmRowSet rowSet,
int iIndex)
Class constructor called internally after objects are retrieved from the server. |
Method Summary | |
---|---|
ObjectId |
create()
Creates this Calendar object in the database. |
static ObjectId[] |
create(Session session,
Calendar[] calendars)
Creates multiple Calendar objects in the database. |
void |
delete()
Deletes this Calendar object from the database. |
void |
delete(ObjectId replacementId)
Deletes this Calendar object from the database. |
static void |
delete(Session session,
Calendar[] calendars)
Deletes multiple Calendar objects from the database. |
static void |
delete(Session session,
Calendar[] calendars,
ObjectId replacementParent)
Deletes multiple calendar objects in a hierarchy from the database and set the new parent of all child objects. |
static java.lang.String[] |
getAllFields()
Gets all fields for this business object. |
ObjectId |
getBaseCalendarObjectId()
Gets the unique ID of the global calendar to which this calendar is linked. |
java.util.Date |
getCreateDate()
Gets the date this calendar was created. |
java.lang.String |
getCreateUser()
Gets the name of the user that created this calendar. |
static java.lang.String[] |
getDefaultXMLExportFields()
Gets the fields that are exported by the XML exporter when no fields are specified. |
DetailedWorkHours |
getDetailedWorkHours(java.util.Date date)
Gets the detailed work hours for the given date. |
static java.lang.String[] |
getFilterableFields()
Gets all fields that can be filtered. |
java.util.List<java.util.Date> |
getHolidayExceptionDates()
Gets a List (ordered by date) of all dates with holidays or exceptions in this calendar. |
double |
getHoursPerDay()
Gets the number of work hours per day. |
double |
getHoursPerMonth()
Gets the number of work hours per month. |
double |
getHoursPerWeek()
Gets the number of work hours per week. |
double |
getHoursPerYear()
Gets the number of work hours per year. |
static java.lang.String[] |
getInternalAllFields()
An internal method that should not be called directly by client code. |
static java.util.Set<java.lang.String> |
getInternalAllFieldsSet()
An internal method that should not be called directly by client code. |
static java.lang.String[] |
getInternalDefaultLoadFields()
An internal method that should not be called directly by client code. |
boolean |
getIsBaseline()
Gets the boolean value indicating if this business object is related to a Project or Baseline. |
boolean |
getIsDefault()
Gets the flag that identifies the default global calendar (applies to global calendars only). |
java.util.Date |
getLastUpdateDate()
Gets the date this calendar was last updated. |
java.lang.String |
getLastUpdateUser()
Gets the name of the user that last updated this calendar. |
static java.lang.String[] |
getMinimumXMLExportFields()
Gets all fields that are always exported at a minimum by the new flat XML exporter |
java.lang.String |
getName()
Gets the name of the calendar. |
ObjectId |
getObjectId()
Gets the unique ID generated by the system. |
ObjectId |
getProjectObjectId()
Gets the unique ID of the associated project. |
static java.lang.String[] |
getRequiredCreateFields()
Gets all fields that must be set before calling create() on this business object. |
DetailedWorkHours |
getStandardDetailedWorkHours(int iDayOfWeek)
Gets the standard detailed work hours for the given day of week. |
double |
getStandardTotalWorkHours(int iDayOfWeek)
Get the standard total work hours for the given day of week. |
double |
getTotalWorkHours(java.util.Date date)
Gets the total work hours and date for this given date. |
CalendarType |
getType()
Gets the calendar type - either 'Global', 'Resource', or 'Project'. |
static java.lang.String[] |
getWritableFields()
Gets all writable fields for this business object. |
static Calendar |
load(Session session,
java.lang.String[] fields,
ObjectId objId)
Loads a single Calendar object from the database. |
static BOIterator<Calendar> |
load(Session session,
java.lang.String[] fields,
ObjectId[] objIds)
Loads multiple Calendar objects from the database. |
BOIterator<Activity> |
loadActivities(java.lang.String[] fields,
java.lang.String sWhereClause,
java.lang.String sOrderBy)
Loads multiple associated Activity objects from the database. |
Calendar |
loadBaseCalendar(java.lang.String[] fields)
Loads an associated Calendar object from the database. |
Project |
loadProjectOwner(java.lang.String[] fields)
Loads an associated Project object from the database. |
BOIterator<Project> |
loadProjects(java.lang.String[] fields,
java.lang.String sWhereClause,
java.lang.String sOrderBy)
Loads multiple associated Project objects from the database. |
BOIterator<Resource> |
loadResources(java.lang.String[] fields,
java.lang.String sWhereClause,
java.lang.String sOrderBy)
Loads multiple associated Resource objects from the database. |
void |
setBaseCalendarObjectId(ObjectId o)
Sets the unique ID of the global calendar to which this calendar is linked. |
void |
setDetailedWorkHours(java.util.Date date,
DetailedWorkHours hhdm)
Set the detailed time hours for the given date. |
void |
setHoursPerDay(double d)
Sets the number of work hours per day. |
void |
setHoursPerMonth(double d)
Sets the number of work hours per month. |
void |
setHoursPerWeek(double d)
Sets the number of work hours per week. |
void |
setHoursPerYear(double d)
Sets the number of work hours per year. |
void |
setIsDefault(boolean b)
Sets the flag that identifies the default global calendar (applies to global calendars only). |
void |
setName(java.lang.String s)
Sets the name of the calendar. |
void |
setObjectId(ObjectId o)
Sets the unique ID generated by the system. |
void |
setProjectObjectId(ObjectId o)
Sets the unique ID of the associated project. |
void |
setStandardDetailedWorkHours(int iDayOfWeek,
DetailedWorkHours hhdm)
Sets the standard detailed work hours for the given date. |
void |
setType(CalendarType enm)
Sets the calendar type - either 'Global', 'Resource', or 'Project'. |
java.lang.String |
toString()
Returns a string representation of the object. |
void |
update()
Updates this Calendar object in the database. |
void |
update(boolean replaceHolidayOrExceptions)
Updates this Calendar object in the database with the option to replace all holidays and exceptions. |
static void |
update(Session session,
Calendar[] calendars)
Updates multiple Calendar objects in the database. |
static void |
update(Session session,
Calendar[] calendars,
boolean replaceHolidayOrExceptions)
Updates multiple Calendar objects in the database with the option to replace all holidays and exceptions. |
Methods inherited from class com.primavera.integration.client.bo.BusinessObject |
---|
equals, hashCode, isNull, setNull |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Calendar(Session session)
session
- the Sessionpublic Calendar(Session session, ObjectId objId) throws BusinessObjectException
session
- the SessionobjId
- the ObjectId
BusinessObjectException
- if a problem occurred in the client-side business objectspublic Calendar(Session session, com.primavera.infr.db.PrmRowSet rowSet, int iIndex) throws BusinessObjectException
session
- the SessionrowSet
- the PrmRowSet retrieved from the serveriIndex
- the row index in the PrmRowSet associated with this business object
BusinessObjectException
- if a problem occurred in the client-side business objectsMethod Detail |
---|
public ObjectId create() throws ServerException, NetworkException, BusinessObjectException
ServerException
- if a problem occurred on the server-side
NetworkException
- if a problem occurred in the network layer
BusinessObjectException
- if a problem occurred in the client-side business objectspublic static ObjectId[] create(Session session, Calendar[] calendars) throws ServerException, NetworkException, BusinessObjectException
session
- the Session objectcalendars
- array of Calendar objects to create
ServerException
- if a problem occurred on the server-side
NetworkException
- if a problem occurred in the network layer
BusinessObjectException
- if a problem occurred in the client-side business objectspublic static Calendar load(Session session, java.lang.String[] fields, ObjectId objId) throws ServerException, NetworkException, BusinessObjectException
session
- the Session objectfields
- fields to loadobjId
- unique ID of the Calendar object
ServerException
- if a problem occurred on the server-side
NetworkException
- if a problem occurred in the network layer
BusinessObjectException
- if a problem occurred in the client-side business objectspublic static BOIterator<Calendar> load(Session session, java.lang.String[] fields, ObjectId[] objIds) throws ServerException, NetworkException, BusinessObjectException
session
- the Session objectfields
- fields to loadobjIds
- object ids of the Calendar objects
ServerException
- if a problem occurred on the server-side
NetworkException
- if a problem occurred in the network layer
BusinessObjectException
- if a problem occurred in the client-side business objectspublic void update() throws ServerException, NetworkException, BusinessObjectException
update
in class BOBase
ServerException
- if a problem occurred on the server-side
NetworkException
- if a problem occurred in the network layer
BusinessObjectException
- if a problem occurred in the client-side business objectspublic static void update(Session session, Calendar[] calendars) throws ServerException, NetworkException, BusinessObjectException
session
- the Session objectcalendars
- array of Calendar objects to update
ServerException
- if a problem occurred on the server-side
NetworkException
- if a problem occurred in the network layer
BusinessObjectException
- if a problem occurred in the client-side business objectspublic void update(boolean replaceHolidayOrExceptions) throws ServerException, NetworkException, BusinessObjectException
update
in class com.primavera.integration.client.bo.base.CalendarBase
replaceHolidayOrExceptions
- whether to replace all holidays and exceptions
ServerException
- if a problem occurred on the server-side
NetworkException
- if a problem occurred in the network layer
BusinessObjectException
- if a problem occurred in the client-side business objectspublic static void update(Session session, Calendar[] calendars, boolean replaceHolidayOrExceptions) throws ServerException, NetworkException, BusinessObjectException
session
- the Session objectcalendars
- array of Calendar objects to updatereplaceHolidayOrExceptions
- whether to replace all holidays and exceptions
ServerException
- if a problem occurred on the server-side
NetworkException
- if a problem occurred in the network layer
BusinessObjectException
- if a problem occurred in the client-side business objectspublic void delete() throws ServerException, NetworkException, BusinessObjectException
delete
in class BOBase
ServerException
- if a problem occurred on the server-side
NetworkException
- if a problem occurred in the network layer
BusinessObjectException
- if a problem occurred in the client-side business objectspublic void delete(ObjectId replacementId) throws ServerException, NetworkException, BusinessObjectException
delete
in class BOBase
replacementId
- unique ID of the new parent for all current child objects
ServerException
- if a problem occurred on the server-side
NetworkException
- if a problem occurred in the network layer
BusinessObjectException
- if a problem occurred in the client-side business objectspublic static void delete(Session session, Calendar[] calendars) throws ServerException, NetworkException, BusinessObjectException
session
- the Session objectcalendars
- array of Calendar objects to delete
ServerException
- if a problem occurred on the server-side
NetworkException
- if a problem occurred in the network layer
BusinessObjectException
- if a problem occurred in the client-side business objectspublic static void delete(Session session, Calendar[] calendars, ObjectId replacementParent) throws ServerException, NetworkException, BusinessObjectException
session
- the Session objectcalendars
- array of Calendar objects to deletereplacementParent
- replacement parent object
ServerException
- if a problem occurred on the server-side
NetworkException
- if a problem occurred in the network layer
BusinessObjectException
- if a problem occurred in the client-side business objectspublic Calendar loadBaseCalendar(java.lang.String[] fields) throws ServerException, NetworkException, BusinessObjectException
fields
- fields to load
ServerException
- if a problem occurred on the server-side
NetworkException
- if a problem occurred in the network layer
BusinessObjectException
- if a problem occurred in the client-side business objectspublic Project loadProjectOwner(java.lang.String[] fields) throws ServerException, NetworkException, BusinessObjectException
fields
- fields to load
ServerException
- if a problem occurred on the server-side
NetworkException
- if a problem occurred in the network layer
BusinessObjectException
- if a problem occurred in the client-side business objectspublic BOIterator<Project> loadProjects(java.lang.String[] fields, java.lang.String sWhereClause, java.lang.String sOrderBy) throws ServerException, NetworkException, BusinessObjectException
fields
- fields to loadsWhereClause
- where clausesOrderBy
- order-by clause
ServerException
- if a problem occurred on the server-side
NetworkException
- if a problem occurred in the network layer
BusinessObjectException
- if a problem occurred in the client-side business objectspublic BOIterator<Resource> loadResources(java.lang.String[] fields, java.lang.String sWhereClause, java.lang.String sOrderBy) throws ServerException, NetworkException, BusinessObjectException
fields
- fields to loadsWhereClause
- where clausesOrderBy
- order-by clause
ServerException
- if a problem occurred on the server-side
NetworkException
- if a problem occurred in the network layer
BusinessObjectException
- if a problem occurred in the client-side business objectspublic BOIterator<Activity> loadActivities(java.lang.String[] fields, java.lang.String sWhereClause, java.lang.String sOrderBy) throws ServerException, NetworkException, BusinessObjectException
fields
- fields to loadsWhereClause
- where clausesOrderBy
- order-by clause
ServerException
- if a problem occurred on the server-side
NetworkException
- if a problem occurred in the network layer
BusinessObjectException
- if a problem occurred in the client-side business objectspublic double getTotalWorkHours(java.util.Date date) throws BusinessObjectException
getTotalWorkHours
in class com.primavera.integration.client.bo.base.CalendarBase
date
- the date for which to get the total work hours
BusinessObjectException
- if something was wrong in this Business objectpublic DetailedWorkHours getDetailedWorkHours(java.util.Date date) throws BusinessObjectException
getDetailedWorkHours
in class com.primavera.integration.client.bo.base.CalendarBase
date
- the date for which to get work hours
BusinessObjectException
- if something was wrong in this Business objectpublic double getStandardTotalWorkHours(int iDayOfWeek) throws BusinessObjectException
getStandardTotalWorkHours
in class com.primavera.integration.client.bo.base.CalendarBase
iDayOfWeek
- the day of week
BusinessObjectException
- if something was wrong in this Business objectpublic DetailedWorkHours getStandardDetailedWorkHours(int iDayOfWeek) throws BusinessObjectException
getStandardDetailedWorkHours
in class com.primavera.integration.client.bo.base.CalendarBase
iDayOfWeek
- the day of week
BusinessObjectException
- if something was wrong in this Business objectpublic void setDetailedWorkHours(java.util.Date date, DetailedWorkHours hhdm) throws BusinessObjectException
setDetailedWorkHours
in class com.primavera.integration.client.bo.base.CalendarBase
date
- the datehhdm
- the detailed time hours
BusinessObjectException
- if something was wrong in this Business objectpublic void setStandardDetailedWorkHours(int iDayOfWeek, DetailedWorkHours hhdm) throws BusinessObjectException
setStandardDetailedWorkHours
in class com.primavera.integration.client.bo.base.CalendarBase
iDayOfWeek
- the day of week (from 1 to 7)hhdm
- the standard detailed time hours for the day of week
BusinessObjectException
- if something was wrong in this Business objectpublic java.util.List<java.util.Date> getHolidayExceptionDates() throws BusinessObjectException
getHolidayExceptionDates
in class com.primavera.integration.client.bo.base.CalendarBase
BusinessObjectException
- if something was wrong in this Business objectpublic ObjectId getObjectId() throws BusinessObjectException
getObjectId
in class BusinessObject
BusinessObjectException
- if a problem occurred in the client-side business objectspublic void setObjectId(ObjectId o) throws BusinessObjectException
setObjectId
in class BusinessObject
o
- the value to set this field to
BusinessObjectException
- if a problem occurred in the client-side business objectspublic ObjectId getProjectObjectId() throws BusinessObjectException
BusinessObjectException
- if a problem occurred in the client-side business objectspublic void setProjectObjectId(ObjectId o) throws BusinessObjectException
o
- the value to set this field to
BusinessObjectException
- if a problem occurred in the client-side business objectspublic CalendarType getType() throws BusinessObjectException
BusinessObjectException
- if a problem occurred in the client-side business objectspublic void setType(CalendarType enm) throws BusinessObjectException
enm
- the value to set this field to
BusinessObjectException
- if a problem occurred in the client-side business objectspublic boolean getIsDefault() throws BusinessObjectException
BusinessObjectException
- if a problem occurred in the client-side business objectspublic void setIsDefault(boolean b) throws BusinessObjectException
b
- the value to set this field to
BusinessObjectException
- if a problem occurred in the client-side business objectspublic ObjectId getBaseCalendarObjectId() throws BusinessObjectException
BusinessObjectException
- if a problem occurred in the client-side business objectspublic void setBaseCalendarObjectId(ObjectId o) throws BusinessObjectException
o
- the value to set this field to
BusinessObjectException
- if a problem occurred in the client-side business objectspublic java.lang.String getName() throws BusinessObjectException
BusinessObjectException
- if a problem occurred in the client-side business objectspublic void setName(java.lang.String s) throws BusinessObjectException
s
- the value to set this field to
BusinessObjectException
- if a problem occurred in the client-side business objectspublic double getHoursPerDay() throws BusinessObjectException
BusinessObjectException
- if a problem occurred in the client-side business objectspublic void setHoursPerDay(double d) throws BusinessObjectException
d
- the value to set this field to
BusinessObjectException
- if a problem occurred in the client-side business objectspublic double getHoursPerWeek() throws BusinessObjectException
BusinessObjectException
- if a problem occurred in the client-side business objectspublic void setHoursPerWeek(double d) throws BusinessObjectException
d
- the value to set this field to
BusinessObjectException
- if a problem occurred in the client-side business objectspublic double getHoursPerMonth() throws BusinessObjectException
BusinessObjectException
- if a problem occurred in the client-side business objectspublic void setHoursPerMonth(double d) throws BusinessObjectException
d
- the value to set this field to
BusinessObjectException
- if a problem occurred in the client-side business objectspublic double getHoursPerYear() throws BusinessObjectException
BusinessObjectException
- if a problem occurred in the client-side business objectspublic void setHoursPerYear(double d) throws BusinessObjectException
d
- the value to set this field to
BusinessObjectException
- if a problem occurred in the client-side business objectspublic java.util.Date getCreateDate() throws BusinessObjectException
BusinessObjectException
- if a problem occurred in the client-side business objectspublic java.util.Date getLastUpdateDate() throws BusinessObjectException
BusinessObjectException
- if a problem occurred in the client-side business objectspublic java.lang.String getCreateUser() throws BusinessObjectException
BusinessObjectException
- if a problem occurred in the client-side business objectspublic java.lang.String getLastUpdateUser() throws BusinessObjectException
BusinessObjectException
- if a problem occurred in the client-side business objectspublic boolean getIsBaseline() throws BusinessObjectException
BusinessObjectException
- if a problem occurred in the client-side business objectspublic static java.lang.String[] getRequiredCreateFields()
public static java.lang.String[] getFilterableFields()
public static java.lang.String[] getInternalDefaultLoadFields()
public static java.lang.String[] getAllFields()
public static java.lang.String[] getInternalAllFields()
public static java.util.Set<java.lang.String> getInternalAllFieldsSet()
public static java.lang.String[] getWritableFields()
public static java.lang.String[] getDefaultXMLExportFields()
public static java.lang.String[] getMinimumXMLExportFields()
public java.lang.String toString()
toString
in class java.lang.Object
|
Primavera Integration API 7.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |