List of usage examples for java.util Calendar equals
@SuppressWarnings("EqualsWhichDoesntCheckParameterClass") @Override public boolean equals(Object obj)
Calendar
to the specified Object
. From source file:org.nuxeo.cm.core.service.synchronization.MailboxSynchronizationServiceImpl.java
protected void synchronizeMailbox(DocumentModel entry, String directoryName, String directorySchema, String parentSynchronizerId, String synchronizerId, String entryId, String generatedTitle, String owner, String type, Calendar now, CoreSession coreSession) throws ClientException { // TODO: hook mailbox resolvers so that synchronizerId can be // customized depending on what mailbox is found DocumentModel cfDoc = getMailboxFromSynchronizerId(synchronizerId, coreSession); Mailbox cf = null;//w w w .jav a2s. c om if (cfDoc != null) { cf = cfDoc.getAdapter(Mailbox.class); // use the actual synchronizer id synchronizerId = cf.getSynchronizerId(); } // initiate eventPropertiesMap Map<String, Serializable> eventProperties = new HashMap<String, Serializable>(); eventProperties.put(EVENT_CONTEXT_MAILBOX_ENTRY_ID, entryId); // avoid reconnecting document entry.putContextData(ReconnectedEventBundle.SKIP_REFETCH_DOCUMENT_CONTEXT_KEY, Boolean.TRUE); eventProperties.put(EVENT_CONTEXT_MAILBOX_ENTRY, entry); eventProperties.put(EVENT_CONTEXT_DIRECTORY_NAME, directoryName); eventProperties.put(EVENT_CONTEXT_DIRECTORY_SCHEMA_NAME, directorySchema); eventProperties.put(EVENT_CONTEXT_PARENT_SYNCHRONIZER_ID, parentSynchronizerId); eventProperties.put(EVENT_CONTEXT_SYNCHRONIZER_ID, synchronizerId); eventProperties.put(EVENT_CONTEXT_MAILBOX_TITLE, generatedTitle); eventProperties.put(EVENT_CONTEXT_MAILBOX_OWNER, owner); eventProperties.put(EVENT_CONTEXT_MAILBOX_TYPE, type); eventProperties.put(EVENT_CONTEXT_SYNCHRONIZED_DATE, now); eventProperties.put(CoreEventConstants.SESSION_ID, coreSession.getSessionId()); if (cf != null) { Calendar lastSyncUpdate = cf.getLastSyncUpdate(); // Look if case has already been updated during this batch. if (lastSyncUpdate == null || !lastSyncUpdate.equals(now)) { if (cf.isSynchronized()) { // throw onMailboxUpdated cf.setLastSyncUpdate(now); coreSession.saveDocument(cfDoc); log.debug(String.format("Update Mailbox %s", synchronizerId)); notify(EventNames.onMailboxUpdated.toString(), cf.getDocument(), eventProperties, coreSession); } else { // a user set it as unsynchronized, we don't modify it // anymore cf.setLastSyncUpdate(now); coreSession.saveDocument(cfDoc); log.debug(String.format("set Unsynchronized state for Mailbox %s", synchronizerId)); return; } } } else { cfDoc = getMailboxFromTitle(generatedTitle, coreSession); cf = null; if (cfDoc != null) { cf = cfDoc.getAdapter(Mailbox.class); } if (cf != null) { Calendar lastSyncUpdate = cf.getLastSyncUpdate(); boolean setDoublon = false; // Look if case has already been updated during this batch. if (lastSyncUpdate == null || !lastSyncUpdate.equals(now)) { if (cf.isSynchronized()) { // set synchronizerId, throw onMailboxUpdate cf.setSynchronizerId(synchronizerId); cf.setLastSyncUpdate(now); cf.setOrigin(directoryName); coreSession.saveDocument(cfDoc); log.debug(String.format("Update Mailbox %s", synchronizerId)); notify(EventNames.onMailboxUpdated.toString(), cf.getDocument(), eventProperties, coreSession); } else { setDoublon = true; } } else { setDoublon = true; } if (setDoublon) { // set doublon: A user created a CF with the same title // we assume he doesn't want the same mailbox created cf.setSynchronizeState(synchronisedState.doublon.toString()); cf.setLastSyncUpdate(now); coreSession.saveDocument(cfDoc); log.debug(String.format("set Doublon state for Mailbox %s", synchronizerId)); } } else { // throws onMailboxCreated log.debug(String.format("Creates Mailbox %s", synchronizerId)); DocumentModel mailboxModel = coreSession.createDocumentModel(getMailboxType()); notify(EventNames.onMailboxCreated.toString(), mailboxModel, eventProperties, coreSession); } } }
From source file:net.sf.webissues.core.WebIssuesRepositoryConnector.java
@Override public boolean hasTaskChanged(TaskRepository taskRepository, ITask task, TaskData taskData) { TaskMapper mapper = getTaskMapping(taskData); if (taskData.isPartial()) { boolean changes = mapper.hasChanges(task); if (changes) { return true; }/*from w ww . j a v a2s. co m*/ } else { Calendar repositoryDate = Util.toCalendar(mapper.getModificationDate()); Calendar localDate = Util.parseTimestamp(task.getAttribute(TASK_KEY_UPDATE_DATE)); if (repositoryDate != null && !repositoryDate.equals(localDate)) { return true; } } return false; }
From source file:com.square.core.util.validation.ValidationExpressionUtil.java
/** * Dtermine si la date de naissance passe en paramtre est valide ou pas. * @param dateDeNaissance la date de naissance vrifier * @return true si la date est valide, false sinon *//* w w w .ja v a 2 s. c o m*/ public boolean isDateDeNaissanceValide(Calendar dateDeNaissance) { Calendar dateLimiteValidite = Calendar.getInstance(); dateLimiteValidite.add(Calendar.MONTH, 9); dateLimiteValidite = DateUtils.truncate(dateLimiteValidite, Calendar.DAY_OF_MONTH); final Calendar dateNaissanceMois = DateUtils.truncate(dateDeNaissance, Calendar.DAY_OF_MONTH); boolean isDateDeNaissanceValide = false; // On vrifie que la date de naissance est antrieure la date courante + 9 mois pour autoriser la date de naissance d'un futur nouveau n if (dateDeNaissance != null && (dateNaissanceMois.before(dateLimiteValidite) || dateNaissanceMois.equals(dateLimiteValidite))) { isDateDeNaissanceValide = true; } return isDateDeNaissanceValide; }
From source file:org.betaconceptframework.astroboa.portal.utility.CalendarUtils.java
public List<Calendar> getDiscreteDatesInPeriod(Calendar fromCalendarInclusive, Calendar toCalendarInclusive) { List<Calendar> discreteDatesInPeriod = new ArrayList<Calendar>(); if (fromCalendarInclusive != null && toCalendarInclusive != null) { if (fromCalendarInclusive.before(toCalendarInclusive)) { // when we process discrete dates we reset the hour. clearTimeFromCalendar(fromCalendarInclusive); while (fromCalendarInclusive.before(toCalendarInclusive) || fromCalendarInclusive.equals(toCalendarInclusive)) { Calendar discreteDate = (GregorianCalendar) fromCalendarInclusive.clone(); discreteDatesInPeriod.add(discreteDate); fromCalendarInclusive.add(Calendar.DAY_OF_MONTH, 1); }// www. ja v a 2 s . c o m } else { // check if both dates are equal and return one date only clearTimeFromCalendar(fromCalendarInclusive); clearTimeFromCalendar(toCalendarInclusive); if (fromCalendarInclusive.equals(toCalendarInclusive)) { Calendar discreteDate = (GregorianCalendar) fromCalendarInclusive.clone(); discreteDatesInPeriod.add(discreteDate); } } } else if (fromCalendarInclusive != null && toCalendarInclusive == null) { // we are looking for a specific date // when we process discrete dates we reset the hour. we assume that the date field for which we set the criteria contains date(s) without hour data. clearTimeFromCalendar(fromCalendarInclusive); Calendar discreteDate = (GregorianCalendar) fromCalendarInclusive.clone(); discreteDatesInPeriod.add(discreteDate); } else if (fromCalendarInclusive == null && toCalendarInclusive != null) { // we are looking for a specific date // when we process discrete dates we reset the hour. we assume that the date field for which we set the criteria contains date(s) without hour data. clearTimeFromCalendar(toCalendarInclusive); Calendar discreteDate = (GregorianCalendar) toCalendarInclusive.clone(); discreteDatesInPeriod.add(discreteDate); } return discreteDatesInPeriod; }
From source file:com.virtusa.akura.student.controller.StudentAttendenceController.java
/** * get all days without special holidays and Saturday,Sunday for given Date range. map key contains date * and value contains AttendeceStatus object with default values(as absent day) * /*from w w w .ja v a2 s. c o m*/ * @param from from date * @param to to date * @return map * @throws AkuraAppException when exception occurs */ private Map<String, AttendeceStatus> getDaysWithoutHolydays(Date from, Date to) throws AkuraAppException { Calendar calFrom = Calendar.getInstance(); Calendar calTo = Calendar.getInstance(); calFrom.setTime(from); calTo.setTime(to); List<Holiday> holidayList = commonService.findHolidayByYear(from, to); Map<String, AttendeceStatus> allDaysBetween = new TreeMap<String, AttendeceStatus>(); // to get name ex Sunday ,Monday .. DateFormatSymbols symbols = new DateFormatSymbols(); String[] weekDays = symbols.getWeekdays(); while (calFrom.before(calTo) || calFrom.equals(calTo)) { int dyaOfWeek = calFrom.get(Calendar.DAY_OF_WEEK); // remove weekends and special holidays if (dyaOfWeek != Calendar.SATURDAY && dyaOfWeek != Calendar.SUNDAY && !DateUtil.isHoliday(holidayList, calFrom.getTime())) { AttendeceStatus attSttus = new AttendeceStatus(); attSttus.setDay(weekDays[dyaOfWeek]); allDaysBetween.put(DateUtil.getFormatDate(calFrom.getTime()), attSttus); } calFrom.set(Calendar.DATE, calFrom.get(Calendar.DATE) + 1); } return allDaysBetween; }
From source file:net.sourceforge.msscodefactory.cfinternet.v2_1.CFInternet.CFInternetClusterHPKey.java
public boolean equals(Object obj) { if (obj == null) { return (false); } else if (obj instanceof CFInternetClusterHPKey) { CFInternetClusterHPKey rhs = (CFInternetClusterHPKey) obj; {/*from ww w. ja v a 2s . c om*/ long lhsClusterId = getAuditClusterId(); long rhsClusterId = rhs.getAuditClusterId(); if (lhsClusterId != rhsClusterId) { return (false); } } { Calendar lhsAuditStamp = getAuditStamp(); Calendar rhsAuditStamp = rhs.getAuditStamp(); if (lhsAuditStamp != null) { if (rhsAuditStamp != null) { if (!lhsAuditStamp.equals(rhsAuditStamp)) { return (false); } } else { return (false); } } else { return (false); } } { short lhsActionId = getAuditActionId(); short rhsActionId = rhs.getAuditActionId(); if (lhsActionId != rhsActionId) { return (false); } } { int lhsRevision = getRequiredRevision(); int rhsRevision = rhs.getRequiredRevision(); if (lhsRevision != rhsRevision) { return (false); } } { UUID lhsAuditSessionId = getAuditSessionId(); UUID rhsAuditSessionId = rhs.getAuditSessionId(); if (lhsAuditSessionId != null) { if (rhsAuditSessionId != null) { if (!lhsAuditSessionId.equals(rhsAuditSessionId)) { return (false); } } else { return (false); } } else { return (false); } } if (getRequiredId() != rhs.getRequiredId()) { return (false); } return (true); } else if (obj instanceof CFInternetHPKey) { CFInternetHPKey rhs = (CFInternetHPKey) obj; { long lhsClusterId = getAuditClusterId(); long rhsClusterId = rhs.getAuditClusterId(); if (lhsClusterId != rhsClusterId) { return (false); } } { Calendar lhsAuditStamp = getAuditStamp(); Calendar rhsAuditStamp = rhs.getAuditStamp(); if (lhsAuditStamp != null) { if (rhsAuditStamp != null) { if (!lhsAuditStamp.equals(rhsAuditStamp)) { return (false); } } else { return (false); } } else { return (false); } } { short lhsActionId = getAuditActionId(); short rhsActionId = rhs.getAuditActionId(); if (lhsActionId != rhsActionId) { return (false); } } { int lhsRevision = getRequiredRevision(); int rhsRevision = rhs.getRequiredRevision(); if (lhsRevision != rhsRevision) { return (false); } } { UUID lhsAuditSessionId = getAuditSessionId(); UUID rhsAuditSessionId = rhs.getAuditSessionId(); if (lhsAuditSessionId != null) { if (rhsAuditSessionId != null) { if (!lhsAuditSessionId.equals(rhsAuditSessionId)) { return (false); } } else { return (false); } } else { return (false); } } return (true); } else if (obj instanceof CFInternetClusterPKey) { CFInternetClusterPKey rhs = (CFInternetClusterPKey) obj; if (getRequiredId() != rhs.getRequiredId()) { return (false); } return (true); } else if (obj instanceof CFInternetClusterHBuff) { CFInternetClusterHBuff rhs = (CFInternetClusterHBuff) obj; { long lhsClusterId = getAuditClusterId(); long rhsClusterId = rhs.getAuditClusterId(); if (lhsClusterId != rhsClusterId) { return (false); } } { Calendar lhsAuditStamp = getAuditStamp(); Calendar rhsAuditStamp = rhs.getAuditStamp(); if (lhsAuditStamp != null) { if (rhsAuditStamp != null) { if (!lhsAuditStamp.equals(rhsAuditStamp)) { return (false); } } else { return (false); } } else { return (false); } } { short lhsActionId = getAuditActionId(); short rhsActionId = rhs.getAuditActionId(); if (lhsActionId != rhsActionId) { return (false); } } { int lhsRevision = getRequiredRevision(); int rhsRevision = rhs.getRequiredRevision(); if (lhsRevision != rhsRevision) { return (false); } } { UUID lhsAuditSessionId = getAuditSessionId(); UUID rhsAuditSessionId = rhs.getAuditSessionId(); if (lhsAuditSessionId != null) { if (rhsAuditSessionId != null) { if (!lhsAuditSessionId.equals(rhsAuditSessionId)) { return (false); } } else { return (false); } } else { return (false); } } if (getRequiredId() != rhs.getRequiredId()) { return (false); } if (getRequiredId() != rhs.getRequiredId()) { return (false); } return (true); } else if (obj instanceof CFInternetClusterBuff) { CFInternetClusterBuff rhs = (CFInternetClusterBuff) obj; if (getRequiredId() != rhs.getRequiredId()) { return (false); } return (true); } else { return (false); } }
From source file:net.sourceforge.msscodefactory.cfinternet.v2_1.CFInternet.CFInternetISOCountryHPKey.java
public boolean equals(Object obj) { if (obj == null) { return (false); } else if (obj instanceof CFInternetISOCountryHPKey) { CFInternetISOCountryHPKey rhs = (CFInternetISOCountryHPKey) obj; {/* ww w . jav a 2 s .c o m*/ long lhsClusterId = getAuditClusterId(); long rhsClusterId = rhs.getAuditClusterId(); if (lhsClusterId != rhsClusterId) { return (false); } } { Calendar lhsAuditStamp = getAuditStamp(); Calendar rhsAuditStamp = rhs.getAuditStamp(); if (lhsAuditStamp != null) { if (rhsAuditStamp != null) { if (!lhsAuditStamp.equals(rhsAuditStamp)) { return (false); } } else { return (false); } } else { return (false); } } { short lhsActionId = getAuditActionId(); short rhsActionId = rhs.getAuditActionId(); if (lhsActionId != rhsActionId) { return (false); } } { int lhsRevision = getRequiredRevision(); int rhsRevision = rhs.getRequiredRevision(); if (lhsRevision != rhsRevision) { return (false); } } { UUID lhsAuditSessionId = getAuditSessionId(); UUID rhsAuditSessionId = rhs.getAuditSessionId(); if (lhsAuditSessionId != null) { if (rhsAuditSessionId != null) { if (!lhsAuditSessionId.equals(rhsAuditSessionId)) { return (false); } } else { return (false); } } else { return (false); } } if (getRequiredId() != rhs.getRequiredId()) { return (false); } return (true); } else if (obj instanceof CFInternetHPKey) { CFInternetHPKey rhs = (CFInternetHPKey) obj; { long lhsClusterId = getAuditClusterId(); long rhsClusterId = rhs.getAuditClusterId(); if (lhsClusterId != rhsClusterId) { return (false); } } { Calendar lhsAuditStamp = getAuditStamp(); Calendar rhsAuditStamp = rhs.getAuditStamp(); if (lhsAuditStamp != null) { if (rhsAuditStamp != null) { if (!lhsAuditStamp.equals(rhsAuditStamp)) { return (false); } } else { return (false); } } else { return (false); } } { short lhsActionId = getAuditActionId(); short rhsActionId = rhs.getAuditActionId(); if (lhsActionId != rhsActionId) { return (false); } } { int lhsRevision = getRequiredRevision(); int rhsRevision = rhs.getRequiredRevision(); if (lhsRevision != rhsRevision) { return (false); } } { UUID lhsAuditSessionId = getAuditSessionId(); UUID rhsAuditSessionId = rhs.getAuditSessionId(); if (lhsAuditSessionId != null) { if (rhsAuditSessionId != null) { if (!lhsAuditSessionId.equals(rhsAuditSessionId)) { return (false); } } else { return (false); } } else { return (false); } } return (true); } else if (obj instanceof CFInternetISOCountryPKey) { CFInternetISOCountryPKey rhs = (CFInternetISOCountryPKey) obj; if (getRequiredId() != rhs.getRequiredId()) { return (false); } return (true); } else if (obj instanceof CFInternetISOCountryHBuff) { CFInternetISOCountryHBuff rhs = (CFInternetISOCountryHBuff) obj; { long lhsClusterId = getAuditClusterId(); long rhsClusterId = rhs.getAuditClusterId(); if (lhsClusterId != rhsClusterId) { return (false); } } { Calendar lhsAuditStamp = getAuditStamp(); Calendar rhsAuditStamp = rhs.getAuditStamp(); if (lhsAuditStamp != null) { if (rhsAuditStamp != null) { if (!lhsAuditStamp.equals(rhsAuditStamp)) { return (false); } } else { return (false); } } else { return (false); } } { short lhsActionId = getAuditActionId(); short rhsActionId = rhs.getAuditActionId(); if (lhsActionId != rhsActionId) { return (false); } } { int lhsRevision = getRequiredRevision(); int rhsRevision = rhs.getRequiredRevision(); if (lhsRevision != rhsRevision) { return (false); } } { UUID lhsAuditSessionId = getAuditSessionId(); UUID rhsAuditSessionId = rhs.getAuditSessionId(); if (lhsAuditSessionId != null) { if (rhsAuditSessionId != null) { if (!lhsAuditSessionId.equals(rhsAuditSessionId)) { return (false); } } else { return (false); } } else { return (false); } } if (getRequiredId() != rhs.getRequiredId()) { return (false); } if (getRequiredId() != rhs.getRequiredId()) { return (false); } return (true); } else if (obj instanceof CFInternetISOCountryBuff) { CFInternetISOCountryBuff rhs = (CFInternetISOCountryBuff) obj; if (getRequiredId() != rhs.getRequiredId()) { return (false); } return (true); } else { return (false); } }
From source file:net.sourceforge.msscodefactory.cfinternet.v2_1.CFInternet.CFInternetISOCurrencyHPKey.java
public boolean equals(Object obj) { if (obj == null) { return (false); } else if (obj instanceof CFInternetISOCurrencyHPKey) { CFInternetISOCurrencyHPKey rhs = (CFInternetISOCurrencyHPKey) obj; {//from ww w . j a v a 2s . co m long lhsClusterId = getAuditClusterId(); long rhsClusterId = rhs.getAuditClusterId(); if (lhsClusterId != rhsClusterId) { return (false); } } { Calendar lhsAuditStamp = getAuditStamp(); Calendar rhsAuditStamp = rhs.getAuditStamp(); if (lhsAuditStamp != null) { if (rhsAuditStamp != null) { if (!lhsAuditStamp.equals(rhsAuditStamp)) { return (false); } } else { return (false); } } else { return (false); } } { short lhsActionId = getAuditActionId(); short rhsActionId = rhs.getAuditActionId(); if (lhsActionId != rhsActionId) { return (false); } } { int lhsRevision = getRequiredRevision(); int rhsRevision = rhs.getRequiredRevision(); if (lhsRevision != rhsRevision) { return (false); } } { UUID lhsAuditSessionId = getAuditSessionId(); UUID rhsAuditSessionId = rhs.getAuditSessionId(); if (lhsAuditSessionId != null) { if (rhsAuditSessionId != null) { if (!lhsAuditSessionId.equals(rhsAuditSessionId)) { return (false); } } else { return (false); } } else { return (false); } } if (getRequiredId() != rhs.getRequiredId()) { return (false); } return (true); } else if (obj instanceof CFInternetHPKey) { CFInternetHPKey rhs = (CFInternetHPKey) obj; { long lhsClusterId = getAuditClusterId(); long rhsClusterId = rhs.getAuditClusterId(); if (lhsClusterId != rhsClusterId) { return (false); } } { Calendar lhsAuditStamp = getAuditStamp(); Calendar rhsAuditStamp = rhs.getAuditStamp(); if (lhsAuditStamp != null) { if (rhsAuditStamp != null) { if (!lhsAuditStamp.equals(rhsAuditStamp)) { return (false); } } else { return (false); } } else { return (false); } } { short lhsActionId = getAuditActionId(); short rhsActionId = rhs.getAuditActionId(); if (lhsActionId != rhsActionId) { return (false); } } { int lhsRevision = getRequiredRevision(); int rhsRevision = rhs.getRequiredRevision(); if (lhsRevision != rhsRevision) { return (false); } } { UUID lhsAuditSessionId = getAuditSessionId(); UUID rhsAuditSessionId = rhs.getAuditSessionId(); if (lhsAuditSessionId != null) { if (rhsAuditSessionId != null) { if (!lhsAuditSessionId.equals(rhsAuditSessionId)) { return (false); } } else { return (false); } } else { return (false); } } return (true); } else if (obj instanceof CFInternetISOCurrencyPKey) { CFInternetISOCurrencyPKey rhs = (CFInternetISOCurrencyPKey) obj; if (getRequiredId() != rhs.getRequiredId()) { return (false); } return (true); } else if (obj instanceof CFInternetISOCurrencyHBuff) { CFInternetISOCurrencyHBuff rhs = (CFInternetISOCurrencyHBuff) obj; { long lhsClusterId = getAuditClusterId(); long rhsClusterId = rhs.getAuditClusterId(); if (lhsClusterId != rhsClusterId) { return (false); } } { Calendar lhsAuditStamp = getAuditStamp(); Calendar rhsAuditStamp = rhs.getAuditStamp(); if (lhsAuditStamp != null) { if (rhsAuditStamp != null) { if (!lhsAuditStamp.equals(rhsAuditStamp)) { return (false); } } else { return (false); } } else { return (false); } } { short lhsActionId = getAuditActionId(); short rhsActionId = rhs.getAuditActionId(); if (lhsActionId != rhsActionId) { return (false); } } { int lhsRevision = getRequiredRevision(); int rhsRevision = rhs.getRequiredRevision(); if (lhsRevision != rhsRevision) { return (false); } } { UUID lhsAuditSessionId = getAuditSessionId(); UUID rhsAuditSessionId = rhs.getAuditSessionId(); if (lhsAuditSessionId != null) { if (rhsAuditSessionId != null) { if (!lhsAuditSessionId.equals(rhsAuditSessionId)) { return (false); } } else { return (false); } } else { return (false); } } if (getRequiredId() != rhs.getRequiredId()) { return (false); } if (getRequiredId() != rhs.getRequiredId()) { return (false); } return (true); } else if (obj instanceof CFInternetISOCurrencyBuff) { CFInternetISOCurrencyBuff rhs = (CFInternetISOCurrencyBuff) obj; if (getRequiredId() != rhs.getRequiredId()) { return (false); } return (true); } else { return (false); } }
From source file:net.sourceforge.msscodefactory.cfinternet.v2_1.CFInternet.CFInternetISOLanguageHPKey.java
public boolean equals(Object obj) { if (obj == null) { return (false); } else if (obj instanceof CFInternetISOLanguageHPKey) { CFInternetISOLanguageHPKey rhs = (CFInternetISOLanguageHPKey) obj; {// w w w. j a va 2 s .co m long lhsClusterId = getAuditClusterId(); long rhsClusterId = rhs.getAuditClusterId(); if (lhsClusterId != rhsClusterId) { return (false); } } { Calendar lhsAuditStamp = getAuditStamp(); Calendar rhsAuditStamp = rhs.getAuditStamp(); if (lhsAuditStamp != null) { if (rhsAuditStamp != null) { if (!lhsAuditStamp.equals(rhsAuditStamp)) { return (false); } } else { return (false); } } else { return (false); } } { short lhsActionId = getAuditActionId(); short rhsActionId = rhs.getAuditActionId(); if (lhsActionId != rhsActionId) { return (false); } } { int lhsRevision = getRequiredRevision(); int rhsRevision = rhs.getRequiredRevision(); if (lhsRevision != rhsRevision) { return (false); } } { UUID lhsAuditSessionId = getAuditSessionId(); UUID rhsAuditSessionId = rhs.getAuditSessionId(); if (lhsAuditSessionId != null) { if (rhsAuditSessionId != null) { if (!lhsAuditSessionId.equals(rhsAuditSessionId)) { return (false); } } else { return (false); } } else { return (false); } } if (getRequiredId() != rhs.getRequiredId()) { return (false); } return (true); } else if (obj instanceof CFInternetHPKey) { CFInternetHPKey rhs = (CFInternetHPKey) obj; { long lhsClusterId = getAuditClusterId(); long rhsClusterId = rhs.getAuditClusterId(); if (lhsClusterId != rhsClusterId) { return (false); } } { Calendar lhsAuditStamp = getAuditStamp(); Calendar rhsAuditStamp = rhs.getAuditStamp(); if (lhsAuditStamp != null) { if (rhsAuditStamp != null) { if (!lhsAuditStamp.equals(rhsAuditStamp)) { return (false); } } else { return (false); } } else { return (false); } } { short lhsActionId = getAuditActionId(); short rhsActionId = rhs.getAuditActionId(); if (lhsActionId != rhsActionId) { return (false); } } { int lhsRevision = getRequiredRevision(); int rhsRevision = rhs.getRequiredRevision(); if (lhsRevision != rhsRevision) { return (false); } } { UUID lhsAuditSessionId = getAuditSessionId(); UUID rhsAuditSessionId = rhs.getAuditSessionId(); if (lhsAuditSessionId != null) { if (rhsAuditSessionId != null) { if (!lhsAuditSessionId.equals(rhsAuditSessionId)) { return (false); } } else { return (false); } } else { return (false); } } return (true); } else if (obj instanceof CFInternetISOLanguagePKey) { CFInternetISOLanguagePKey rhs = (CFInternetISOLanguagePKey) obj; if (getRequiredId() != rhs.getRequiredId()) { return (false); } return (true); } else if (obj instanceof CFInternetISOLanguageHBuff) { CFInternetISOLanguageHBuff rhs = (CFInternetISOLanguageHBuff) obj; { long lhsClusterId = getAuditClusterId(); long rhsClusterId = rhs.getAuditClusterId(); if (lhsClusterId != rhsClusterId) { return (false); } } { Calendar lhsAuditStamp = getAuditStamp(); Calendar rhsAuditStamp = rhs.getAuditStamp(); if (lhsAuditStamp != null) { if (rhsAuditStamp != null) { if (!lhsAuditStamp.equals(rhsAuditStamp)) { return (false); } } else { return (false); } } else { return (false); } } { short lhsActionId = getAuditActionId(); short rhsActionId = rhs.getAuditActionId(); if (lhsActionId != rhsActionId) { return (false); } } { int lhsRevision = getRequiredRevision(); int rhsRevision = rhs.getRequiredRevision(); if (lhsRevision != rhsRevision) { return (false); } } { UUID lhsAuditSessionId = getAuditSessionId(); UUID rhsAuditSessionId = rhs.getAuditSessionId(); if (lhsAuditSessionId != null) { if (rhsAuditSessionId != null) { if (!lhsAuditSessionId.equals(rhsAuditSessionId)) { return (false); } } else { return (false); } } else { return (false); } } if (getRequiredId() != rhs.getRequiredId()) { return (false); } if (getRequiredId() != rhs.getRequiredId()) { return (false); } return (true); } else if (obj instanceof CFInternetISOLanguageBuff) { CFInternetISOLanguageBuff rhs = (CFInternetISOLanguageBuff) obj; if (getRequiredId() != rhs.getRequiredId()) { return (false); } return (true); } else { return (false); } }
From source file:net.sourceforge.msscodefactory.cfinternet.v2_1.CFInternet.CFInternetTenantHPKey.java
public boolean equals(Object obj) { if (obj == null) { return (false); } else if (obj instanceof CFInternetTenantHPKey) { CFInternetTenantHPKey rhs = (CFInternetTenantHPKey) obj; {// www.j a v a2s.c o m long lhsClusterId = getAuditClusterId(); long rhsClusterId = rhs.getAuditClusterId(); if (lhsClusterId != rhsClusterId) { return (false); } } { Calendar lhsAuditStamp = getAuditStamp(); Calendar rhsAuditStamp = rhs.getAuditStamp(); if (lhsAuditStamp != null) { if (rhsAuditStamp != null) { if (!lhsAuditStamp.equals(rhsAuditStamp)) { return (false); } } else { return (false); } } else { return (false); } } { short lhsActionId = getAuditActionId(); short rhsActionId = rhs.getAuditActionId(); if (lhsActionId != rhsActionId) { return (false); } } { int lhsRevision = getRequiredRevision(); int rhsRevision = rhs.getRequiredRevision(); if (lhsRevision != rhsRevision) { return (false); } } { UUID lhsAuditSessionId = getAuditSessionId(); UUID rhsAuditSessionId = rhs.getAuditSessionId(); if (lhsAuditSessionId != null) { if (rhsAuditSessionId != null) { if (!lhsAuditSessionId.equals(rhsAuditSessionId)) { return (false); } } else { return (false); } } else { return (false); } } if (getRequiredId() != rhs.getRequiredId()) { return (false); } return (true); } else if (obj instanceof CFInternetHPKey) { CFInternetHPKey rhs = (CFInternetHPKey) obj; { long lhsClusterId = getAuditClusterId(); long rhsClusterId = rhs.getAuditClusterId(); if (lhsClusterId != rhsClusterId) { return (false); } } { Calendar lhsAuditStamp = getAuditStamp(); Calendar rhsAuditStamp = rhs.getAuditStamp(); if (lhsAuditStamp != null) { if (rhsAuditStamp != null) { if (!lhsAuditStamp.equals(rhsAuditStamp)) { return (false); } } else { return (false); } } else { return (false); } } { short lhsActionId = getAuditActionId(); short rhsActionId = rhs.getAuditActionId(); if (lhsActionId != rhsActionId) { return (false); } } { int lhsRevision = getRequiredRevision(); int rhsRevision = rhs.getRequiredRevision(); if (lhsRevision != rhsRevision) { return (false); } } { UUID lhsAuditSessionId = getAuditSessionId(); UUID rhsAuditSessionId = rhs.getAuditSessionId(); if (lhsAuditSessionId != null) { if (rhsAuditSessionId != null) { if (!lhsAuditSessionId.equals(rhsAuditSessionId)) { return (false); } } else { return (false); } } else { return (false); } } return (true); } else if (obj instanceof CFInternetTenantPKey) { CFInternetTenantPKey rhs = (CFInternetTenantPKey) obj; if (getRequiredId() != rhs.getRequiredId()) { return (false); } return (true); } else if (obj instanceof CFInternetTenantHBuff) { CFInternetTenantHBuff rhs = (CFInternetTenantHBuff) obj; { long lhsClusterId = getAuditClusterId(); long rhsClusterId = rhs.getAuditClusterId(); if (lhsClusterId != rhsClusterId) { return (false); } } { Calendar lhsAuditStamp = getAuditStamp(); Calendar rhsAuditStamp = rhs.getAuditStamp(); if (lhsAuditStamp != null) { if (rhsAuditStamp != null) { if (!lhsAuditStamp.equals(rhsAuditStamp)) { return (false); } } else { return (false); } } else { return (false); } } { short lhsActionId = getAuditActionId(); short rhsActionId = rhs.getAuditActionId(); if (lhsActionId != rhsActionId) { return (false); } } { int lhsRevision = getRequiredRevision(); int rhsRevision = rhs.getRequiredRevision(); if (lhsRevision != rhsRevision) { return (false); } } { UUID lhsAuditSessionId = getAuditSessionId(); UUID rhsAuditSessionId = rhs.getAuditSessionId(); if (lhsAuditSessionId != null) { if (rhsAuditSessionId != null) { if (!lhsAuditSessionId.equals(rhsAuditSessionId)) { return (false); } } else { return (false); } } else { return (false); } } if (getRequiredId() != rhs.getRequiredId()) { return (false); } if (getRequiredId() != rhs.getRequiredId()) { return (false); } return (true); } else if (obj instanceof CFInternetTenantBuff) { CFInternetTenantBuff rhs = (CFInternetTenantBuff) obj; if (getRequiredId() != rhs.getRequiredId()) { return (false); } return (true); } else { return (false); } }