List of usage examples for java.util UUID equals
public boolean equals(Object obj)
From source file:org.photovault.imginfo.DataExporter.java
public void importChanges(File zipFile, DAOFactory df) throws FileNotFoundException, IOException { FileInputStream is = new FileInputStream(zipFile); ZipInputStream zipis = new ZipInputStream(is); PhotoInfo p;/*from w ww. j av a 2 s. c o m*/ UUID targetId = null; VersionedObjectEditor<PhotoInfo> pe = null; ObjectHistoryDTO<PhotoInfo> h = null; PhotoInfoDAO photoDao = df.getPhotoInfoDAO(); DTOResolverFactory drf = df.getDTOResolverFactory(); ChangeFactory<PhotoInfo> cf = new ChangeFactory<PhotoInfo>(df.getChangeDAO()); for (ZipEntry e = zipis.getNextEntry(); e != null; e = zipis.getNextEntry()) { if (e.isDirectory()) { continue; } String ename = e.getName(); log.debug("start processing entry " + ename); String[] path = ename.split("/"); if (path.length != 2) { log.warn("zip directory hierarchy should have 2 levels: " + ename); } String fname = path[path.length - 1]; if (!fname.endsWith(".xml")) { log.warn("Unexpected suffix: " + ename); } byte[] data = readZipEntry(e, zipis); if (path[0].equals("files")) { String xml = new String(data, "utf-8"); this.parseFileInfo(xml, df); } else { Class targetObjectClass = null; if (path[0].startsWith("photo_")) { targetObjectClass = PhotoInfo.class; } else if (path[0].startsWith("folder_")) { targetObjectClass = PhotoFolder.class; } else { log.error("Illegal folder name found: " + path[0]); continue; } ChangeDTO dto = ChangeDTO.createChange(data, targetObjectClass); if (dto == null) { log.warn("Failed to read change " + ename); continue; } UUID changeId = dto.getChangeUuid(); if (!fname.startsWith(changeId.toString())) { log.warn("Unexpected changeId " + changeId + " in file " + ename); } UUID newTargetId = dto.getTargetUuid(); if (!newTargetId.equals(targetId)) { if (h != null) { addHistory(h, df); } targetId = newTargetId; h = new ObjectHistoryDTO(targetObjectClass, targetId); } h.addChange(dto); targetId = newTargetId; } } }
From source file:org.photovault.imginfo.DataExporter.java
public void importChangesProtobuf(InputStream is, DAOFactory df) throws IOException { DTOResolverFactory drf = df.getDTOResolverFactory(); ImageFileProtobufResolver fdr = (ImageFileProtobufResolver) drf .getResolver(ImageFileProtobufResolver.class); Session s = null;// w w w.j ava 2 s . co m if (df instanceof HibernateDAOFactory) { s = ((HibernateDAOFactory) df).getSession(); } int fileCount = 0; int changeCount = 0; int changedObjectCount = 0; ImageProtos.PhotovaultData d = ImageProtos.PhotovaultData.parseDelimitedFrom(is); while (d != null) { long startTime = System.currentTimeMillis(); Transaction tx = null; if (s != null) { tx = s.beginTransaction(); } for (ImageProtos.ImageFile fp : d.getFilesList()) { fdr.getObjectFromDto(fp); if (tx != null) { s.flush(); } fileCount++; } if (tx != null) { s.flush(); tx.commit(); s.clear(); } ObjectHistoryDTO h = null; UUID targetId = null; Class targetClass = null; for (ChangeProtos.ChangeEnvelope cep : d.getChangesList()) { changeCount++; ChangeProtos.Change chp = ChangeProtos.Change.parseFrom(cep.getSerializedChange()); UUID newTargetId = ProtobufHelper.uuid(chp.getTargetUUID()); if (!newTargetId.equals(targetId)) { if (h != null) { addHistory(h, df); } try { targetId = newTargetId; targetClass = Class.forName(chp.getTargetClassName()); h = new ObjectHistoryDTO(targetClass, targetId); } catch (ClassNotFoundException e) { log.error("Cannot find class " + chp.getTargetClassName()); h = null; continue; } changedObjectCount++; } ChangeDTO dto = ChangeDTO.createChange(cep.getSerializedChange().toByteArray(), targetClass); if (!dto.calcUuid().equals(ProtobufHelper.uuid(cep.getChangeId()))) { log.error("UUID in change envelope (" + ProtobufHelper.uuid(cep.getChangeId()) + ") does not match change hash " + dto.calcUuid()); continue; } h.addChange(dto); } if (h != null) { addHistory(h, df); } log.debug("Imported " + fileCount + " files & " + changeCount + " changes to " + changedObjectCount + " objects."); log.debug("last batch took " + (System.currentTimeMillis() - startTime) + " ms."); d = ImageProtos.PhotovaultData.parseDelimitedFrom(is); } log.debug("import finished"); }
From source file:org.eclipse.skalli.core.validation.ValidationComponent.java
@Override public synchronized <T extends EntityBase> boolean isQueued(T entity) { Class<?> entityClass = entity.getClass(); UUID entityId = entity.getUuid(); for (Validation<?> queuedEntity : queuedEntities) { if (entityClass.equals(queuedEntity.getEntityClass()) && entityId.equals(queuedEntity.getEntityId())) { return true; }//from w ww . j av a 2s . co m } return false; }
From source file:org.springframework.integration.flow.handler.FlowMessageHandler.java
@Override protected Object handleRequestMessage(Message<?> requestMessage) { UUID conversationId = requestMessage.getHeaders().getId(); Message<?> message = MessageBuilder.fromMessage(requestMessage).pushSequenceDetails(conversationId, 0, 0) .build();//w w w. jav a 2 s.c om try { ResponseMessageHandler responseMessageHandler = new ResponseMessageHandler(conversationId); flowOutputChannel.subscribe(responseMessageHandler); flowInputChannel.send(message, timeout); flowOutputChannel.unsubscribe(responseMessageHandler); return responseMessageHandler.getResponse(); } catch (MessagingException me) { log.error(me.getMessage(), me); if (conversationId.equals(me.getFailedMessage().getHeaders().getCorrelationId())) { if (errorChannel != null) { errorChannel.send( new ErrorMessage(me, Collections.singletonMap(FlowConstants.FLOW_OUTPUT_PORT_HEADER, (Object) FlowConstants.FLOW_HANDLER_EXCEPTION_HEADER_VALUE))); } } else { throw me; } } return null; }
From source file:org.cloudgraph.hbase.io.GraphRowWriter.java
/** * Initializes a graph state by querying for a row based on the given row key * and either creating a new (empty) graph state for an entirely new graph, or * otherwise initializing a graph state based on state or state and management * columns in the existing returned row. * // w ww .j a v a 2 s . com * @param rowKey * the row key * @param dataGraph * the data graph * @param changeSummary * the change summary * @return the graph state * @throws IOException * @throws DuplicateRowException * for a new graph if a row already exists for the given row key * @throws GraphServiceException * where except for a new graph, if no row exists for the given row * key */ protected SequenceGenerator createSequenceMapping(byte[] rowKey, DataObject dataObject, ChangeSummary changeSummary) throws IOException { SequenceGenerator graphState; // --ensure row exists unless a new row/graph // --use empty get with only necessary "state" management columns // if entirely new graph for the given // distributed or sub-graph root if (changeSummary.isCreated(dataObject)) { TableMapping tableConfig = this.tableWriter.getTableConfig(); if (tableConfig.uniqueChecks()) { Result result = getMinimalRow(rowKey, tableConfig, this.tableWriter.getTable()); if (!result.isEmpty()) { if (!result.containsColumn(tableConfig.getDataColumnFamilyNameBytes(), GraphMetaKey.TOMBSTONE.codeAsBytes())) { throw new DuplicateRowException("no row for id '" + Bytes.toString(rowKey) + "' expected when creating new row for table '" + tableConfig.getTable().getName() + "'"); } else { if (!tableConfig.tombstoneRowsOverwriteable()) throw new ToumbstoneRowException("no toumbstone row for id '" + Bytes.toString(rowKey) + "' expected when creating new row for table '" + tableConfig.getTable().getName() + "' - cannot overwrite toumbstone row"); } } } PlasmaDataObject root = (PlasmaDataObject) dataObject; // graphState = new BindingSequenceGenerator(root.getUUID(), // this.tableWriter.getDistributedOperation().getMarshallingContext()); graphState = new ProtoSequenceGenerator(); if (log.isDebugEnabled()) log.debug(graphState.toString()); } else { // modify or delete TableMapping tableConfig = this.tableWriter.getTableConfig(); Result result = getStateRow(rowKey, tableConfig, this.tableWriter.getTable()); if (result.isEmpty()) { throw new MissingRowException(tableConfig.getTable().getName(), Bytes.toString(rowKey)); } if (result.containsColumn(tableConfig.getDataColumnFamilyNameBytes(), GraphMetaKey.TOMBSTONE.codeAsBytes())) { throw new ToumbstoneRowException( "no row for id '" + Bytes.toString(rowKey) + "' expected when modifying row for table '" + tableConfig.getTable().getName() + "' - cannot overwrite toumbstone row"); } byte[] state = result.getValue(Bytes.toBytes(tableConfig.getDataColumnFamilyName()), GraphMetaKey.SEQUENCE_MAPPING.codeAsBytes()); if (state != null) { if (log.isDebugEnabled()) { log.debug(" state: " + Bytes.toString(state)); } graphState = new ProtoSequenceGenerator(state); } else graphState = new ProtoSequenceGenerator(); // graphState = new BindingSequenceGenerator(Bytes.toString(state), // this.tableWriter.getDistributedOperation().getMarshallingContext()); if (log.isDebugEnabled()) log.debug(graphState.toString()); // Even though we found a row, the user could have committed a data object // which was copied and has a different UUID than the original data object // which generated the graph state. Subsequent update or delete operations // using // this mismatched UUID can cause havoc, as the UUID is a key used to look // up // sequence values from the state and create column keys and modify or // delete // associated values. byte[] uuidQual = getColumnKeyFactory().createColumnKey(this.getRootType(), EntityMetaKey.UUID); byte[] rootUuid = result.getValue(Bytes.toBytes(tableConfig.getDataColumnFamilyName()), uuidQual); if (rootUuid == null) throw new OperationException( "expected column '" + EntityMetaKey.UUID + " for row " + Bytes.toString(rowKey) + "'"); UUID uuid = UUID.fromString(new String(rootUuid, tableConfig.getCharset())); PlasmaDataObject root = (PlasmaDataObject) dataObject; if (!uuid.equals(root.getUUID())) throw new UUIDMismatchException("Graph state root UUID '" + uuid + "' " + "does not match writer sub-root, " + root + " - can be caused by data object copy operations, " + "where only properties are copied not the UUID, then the copied object is modified and comitted"); } return graphState; }
From source file:org.jasig.ssp.web.api.PersonEarlyAlertController.java
@Override @DynamicPermissionChecking//from w ww . j av a 2 s.c om @RequestMapping(value = "/1/person/{personId}/earlyAlert", method = RequestMethod.POST) public @ResponseBody EarlyAlertTO create(@PathVariable @NotNull final UUID personId, @Valid @NotNull @RequestBody final EarlyAlertTO obj) throws ValidationException, ObjectNotFoundException { // validate incoming data if (personId == null) { throw new IllegalArgumentException("Missing or invalid person identifier in the path."); } if (obj == null) { throw new IllegalArgumentException("Missing or invalid early alert data."); } if (obj.getPersonId() != null && !personId.equals(obj.getPersonId())) { throw new ValidationException("Person identifier in path, did not match the person" + " identifier in the early alert data. Those values must" + " match if a person identifier is set in the data."); } if (obj.getPersonId() == null) { obj.setPersonId(personId); } if (obj.getClosedById() != null) { obj.setClosedDate(new Date()); } // As per SSP-900, students will have their programStatus set to 'Active' regardless of it's current state setProgramStatusToActiveIfNotAlready(personId); // create final EarlyAlertTO earlyAlertTO = super.create(personId, obj); // send e-mail to student if requested if (obj.getSendEmailToStudent() != null && Boolean.TRUE.equals(obj.getSendEmailToStudent())) { try { service.sendMessageToStudent(factory.from(earlyAlertTO)); } catch (final SendFailedException exc) { LOGGER.error( "Send message failed when creating a new early alert. Early Alert was created, but message was not succesfully sent to student.", exc); } catch (final ObjectNotFoundException exc) { LOGGER.error( "Send message failed when creating a new early alert. Early Alert was created, but message was not succesfully sent to student.", exc); } catch (final ValidationException exc) { LOGGER.error( "Send message failed when creating a new early alert. Early Alert was created, but message was not succesfully sent to student.", exc); } } // return created EarlyAlert return earlyAlertTO; }
From source file:com.chiralbehaviors.CoRE.meta.models.JobModelTest.java
/** * Returns a list of fields that do not match between job and chronology * * @param job//from ww w. j av a 2 s . co m * @param jobChronology * @return * @throws SecurityException * @throws NoSuchFieldException * @throws IllegalAccessException * @throws IllegalArgumentException * @throws NoSuchMethodException * @throws InvocationTargetException */ private List<String> verifyChronologyFields(JobRecord job, JobChronologyRecord jobChronology) throws Exception { String[] fieldsToMatch = new String[] { "status", "requester", "assignTo", "deliverFrom", "deliverTo" }; List<String> unmatchedFields = new LinkedList<>(); if (!jobChronology.getJob().equals(job.getId())) { unmatchedFields.add("job"); return unmatchedFields; } for (String field : fieldsToMatch) { UUID jobRf = (UUID) PropertyUtils.getSimpleProperty(job, field); UUID chronoRf = (UUID) PropertyUtils.getSimpleProperty(jobChronology, field); if (chronoRf == null && jobRf == null) { continue; } if (!chronoRf.equals(jobRf)) { unmatchedFields.add(field); } } return unmatchedFields; }
From source file:org.wrml.runtime.rest.Resource.java
/** * <p>/*from w ww .j ava 2 s .co m*/ * The {@link Resource} constructor compiles a "chunk" of the {@link Api} metadata; an individual * {@link ResourceTemplate}. It is part of a runtime-constructed tree structure that represents each URI path '/' as * a hierarchical tree of {@link Resource} nodes. * </p> * <p/> * <p> * If an {@link Api} were a regex input string, and an {@link ApiNavigator} was its corresponding Regex compilation; * then a {@link Resource} would be a subexpression, a nested component within the compiled (optimized) regex. The * {@link Resource} (along with the {@link ApiNavigator}) compile {@link Api} metadata so that it is ready to be * used by the runtime for "pattern matching" (request routing by the framework). * </p> */ Resource(final ApiNavigator apiNavigator, final ResourceTemplate resourceTemplate, final Resource parentResource) { if (apiNavigator == null) { throw new ResourceException("The apiNavigator may not be null", null, this); } if (resourceTemplate == null) { throw new ResourceException("The resource template may not be null", null, this); } _ApiNavigator = apiNavigator; _ResourceTemplate = resourceTemplate; _ParentResource = parentResource; _FullPath = getFullPath(parentResource); if (_ParentResource != null) { _ParentPath = _ParentResource.getPathText(); } else { _ParentPath = null; } final Api api = apiNavigator.getApi(); final Context context = api.getContext(); final ApiLoader apiLoader = context.getApiLoader(); final SyntaxLoader syntaxLoader = context.getSyntaxLoader(); final URI apiUri = api.getUri(); final String uriTemplateString = StringUtils.join(apiUri.toString(), _FullPath); LOGGER.debug("creating resource with uriTemplateString={} and _FullPath={}", uriTemplateString, _FullPath); _UriTemplate = new UriTemplate(syntaxLoader, uriTemplateString); _LiteralPathSubresources = new ConcurrentHashMap<String, Resource>(); _VariablePathSubresources = new ConcurrentHashMap<String, Resource>(); _LinkTemplates = new ConcurrentHashMap<URI, LinkTemplate>(); // The reference templates are API metadata that describe possible "request/link" types that may target this // resource as an endpoint. _ReferenceTemplates = new ConcurrentHashMap<URI, LinkTemplate>(); _ReferenceTemplateMethodToLinkRelationUrisMap = new ConcurrentHashMap<Method, Set<URI>>(); _ReferenceTemplateMethodToRequestSchemaUrisMap = new ConcurrentHashMap<Method, Set<URI>>(); _ReferenceTemplateMethodToResponseSchemaUriMap = new ConcurrentHashMap<Method, Set<URI>>(); final UUID resourceTemplateId = _ResourceTemplate.getUniqueId(); final List<LinkTemplate> linkTemplates = api.getLinkTemplates(); for (final LinkTemplate linkTemplate : linkTemplates) { final URI linkRelationUri = linkTemplate.getLinkRelationUri(); if (linkRelationUri == null) { continue; } final UUID endPointId = linkTemplate.getEndPointId(); if (endPointId != null && endPointId.equals(resourceTemplateId)) { _ReferenceTemplates.put(linkRelationUri, linkTemplate); final LinkTemplate reference = linkTemplate; // Each reference has an associate link relation which is it's "metafunction". final SchemaLoader schemaLoader = context.getSchemaLoader(); final URI documentSchemaUriConstant = schemaLoader.getDocumentSchemaUri(); final Keys relKeys = apiLoader.buildDocumentKeys(linkRelationUri, schemaLoader.getLinkRelationSchemaUri()); final Dimensions relDimensions = apiNavigator.getLinkRelationDimensions(); final LinkRelation rel = context.getModel(relKeys, relDimensions); if (rel == null) { throw new ResourceException("The link relation: " + linkRelationUri + " was not found", null, this); } // The interaction method associated with the link relation matches the parameter. final Method requestMethod = rel.getMethod(); if (!_ReferenceTemplateMethodToLinkRelationUrisMap.containsKey(requestMethod)) { _ReferenceTemplateMethodToLinkRelationUrisMap.put(requestMethod, new LinkedHashSet<URI>()); } final Set<URI> linkRelationUris = _ReferenceTemplateMethodToLinkRelationUrisMap.get(requestMethod); linkRelationUris.add(linkRelationUri); if (!_ReferenceTemplateMethodToRequestSchemaUrisMap.containsKey(requestMethod)) { _ReferenceTemplateMethodToRequestSchemaUrisMap.put(requestMethod, new LinkedHashSet<URI>()); } final Set<URI> requestSchemaUris = _ReferenceTemplateMethodToRequestSchemaUrisMap .get(requestMethod); // The API's reference template may have defined its own API-specific argument type final URI referenceRequestSchemaUri = reference.getRequestSchemaUri(); if (referenceRequestSchemaUri != null) { requestSchemaUris.add(referenceRequestSchemaUri); } // The reference's link relation may have defined a generic, reusable argument type final URI relRequestSchemaUri = rel.getRequestSchemaUri(); if (relRequestSchemaUri != null && !documentSchemaUriConstant.equals(relRequestSchemaUri)) { requestSchemaUris.add(relRequestSchemaUri); } if (!_ReferenceTemplateMethodToResponseSchemaUriMap.containsKey(requestMethod)) { _ReferenceTemplateMethodToResponseSchemaUriMap.put(requestMethod, new LinkedHashSet<URI>()); } final Set<URI> responseSchemaUris = _ReferenceTemplateMethodToResponseSchemaUriMap .get(requestMethod); // The API's reference template may have defined its own API-specific response type final URI referenceResponseSchemaUri = reference.getResponseSchemaUri(); if (referenceResponseSchemaUri != null) { responseSchemaUris.add(referenceResponseSchemaUri); } // The reference's link relation may have defined a generic, reusable response type final URI relResponseSchemaUri = rel.getResponseSchemaUri(); if (relResponseSchemaUri != null && !documentSchemaUriConstant.equals(relResponseSchemaUri)) { responseSchemaUris.add(relResponseSchemaUri); } } final UUID referrerId = linkTemplate.getReferrerId(); if (referrerId != null && referrerId.equals(resourceTemplateId)) { _LinkTemplates.put(linkRelationUri, linkTemplate); } } }
From source file:org.dspace.app.rest.repository.ClaimedTaskRestRepository.java
@SearchRestMethod(name = "findByUser") public Page<ClaimedTaskRest> findByUser(@Parameter(value = "uuid", required = true) UUID userID, Pageable pageable) {//from w w w . j a v a 2 s . c o m //FIXME this should be secured with annotation but they are currently ignored by search methods List<ClaimedTask> tasks = null; try { Context context = obtainContext(); EPerson currentUser = context.getCurrentUser(); if (currentUser == null) { throw new RESTAuthorizationException( "This endpoint is available only to logged-in user to search for their" + " own claimed tasks or the admins"); } if (authorizeService.isAdmin(context) || userID.equals(currentUser.getID())) { EPerson ep = epersonService.find(context, userID); tasks = claimedTaskService.findByEperson(context, ep); } else { throw new RESTAuthorizationException( "Only administrators can search for claimed tasks of other users"); } } catch (SQLException e) { throw new RuntimeException(e.getMessage(), e); } Page<ClaimedTaskRest> page = utils.getPage(tasks, pageable).map(converter); return page; }
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 www. java 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); } }