Java Code Examples for org.apache.commons.lang.builder.HashCodeBuilder#toHashCode()

The following examples show how to use org.apache.commons.lang.builder.HashCodeBuilder#toHashCode() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TSentryExportMappingDataResponse.java    From incubator-sentry with Apache License 2.0 6 votes vote down vote up
@Override
public int hashCode() {
  HashCodeBuilder builder = new HashCodeBuilder();

  boolean present_status = true && (isSetStatus());
  builder.append(present_status);
  if (present_status)
    builder.append(status);

  boolean present_mappingData = true && (isSetMappingData());
  builder.append(present_mappingData);
  if (present_mappingData)
    builder.append(mappingData);

  return builder.toHashCode();
}
 
Example 2
Source File: LogEntry.java    From mt-flume with Apache License 2.0 6 votes vote down vote up
@Override
public int hashCode() {
  HashCodeBuilder builder = new HashCodeBuilder();

  boolean present_category = true && (isSetCategory());
  builder.append(present_category);
  if (present_category)
    builder.append(category);

  boolean present_message = true && (isSetMessage());
  builder.append(present_message);
  if (present_message)
    builder.append(message);

  return builder.toHashCode();
}
 
Example 3
Source File: TListSentryRolesResponse.java    From incubator-sentry with Apache License 2.0 6 votes vote down vote up
@Override
public int hashCode() {
  HashCodeBuilder builder = new HashCodeBuilder();

  boolean present_status = true && (isSetStatus());
  builder.append(present_status);
  if (present_status)
    builder.append(status);

  boolean present_roles = true && (isSetRoles());
  builder.append(present_roles);
  if (present_roles)
    builder.append(roles);

  return builder.toHashCode();
}
 
Example 4
Source File: TListSentryPrivilegesByAuthResponse.java    From incubator-sentry with Apache License 2.0 6 votes vote down vote up
@Override
public int hashCode() {
  HashCodeBuilder builder = new HashCodeBuilder();

  boolean present_status = true && (isSetStatus());
  builder.append(present_status);
  if (present_status)
    builder.append(status);

  boolean present_privilegesMapByAuth = true && (isSetPrivilegesMapByAuth());
  builder.append(present_privilegesMapByAuth);
  if (present_privilegesMapByAuth)
    builder.append(privilegesMapByAuth);

  return builder.toHashCode();
}
 
Example 5
Source File: TDropSentryRoleResponse.java    From incubator-sentry with Apache License 2.0 5 votes vote down vote up
@Override
public int hashCode() {
  HashCodeBuilder builder = new HashCodeBuilder();

  boolean present_status = true && (isSetStatus());
  builder.append(present_status);
  if (present_status)
    builder.append(status);

  return builder.toHashCode();
}
 
Example 6
Source File: TherapeuticLink.java    From freehealth-connector with GNU Affero General Public License v3.0 5 votes vote down vote up
public int hashCode() {
   HashCodeBuilder builder = new HashCodeBuilder();
   builder.append(this.comment);
   builder.append(this.endDate);
   builder.append(this.hcParty);
   builder.append(this.patient);
   builder.append(this.startDate);
   builder.append(this.status);
   return builder.toHashCode();
}
 
Example 7
Source File: TrustedOrgDto.java    From spacewalk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public int hashCode() {
    HashCodeBuilder b = new HashCodeBuilder();
    b.append(getId()).append(getName());
    return b.toHashCode();
}
 
Example 8
Source File: BirthdayAddress.java    From projectforge-webapp with GNU General Public License v3.0 5 votes vote down vote up
@Override
public int hashCode()
{
  final HashCodeBuilder hcb = new HashCodeBuilder();
  hcb.append(this.compareString);
  return hcb.toHashCode();
}
 
Example 9
Source File: AuftragsPositionVO.java    From projectforge-webapp with GNU General Public License v3.0 5 votes vote down vote up
@Override
public int hashCode()
{
  HashCodeBuilder hcb = new HashCodeBuilder();
  hcb.append(getNumber());
  hcb.append(getAuftragId());
  return hcb.toHashCode();
}
 
Example 10
Source File: SystemMigration.java    From spacewalk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
public int hashCode() {

    HashCodeBuilder builder = new HashCodeBuilder();
    builder.append(this.getToOrg())
           .append(this.getFromOrg())
           .append(this.getServer())
           .append(this.getMigrated());

    return builder.toHashCode();
}
 
Example 11
Source File: RefLog.java    From quantumdb with Apache License 2.0 5 votes vote down vote up
public int hashCode() {
	HashCodeBuilder builder = new HashCodeBuilder()
			.append(name);

	if (table != null) {
		builder.append(table.getName());
	}

	return builder.toHashCode();
}
 
Example 12
Source File: TAlterSentryRoleRevokePrivilegeRequest.java    From incubator-sentry with Apache License 2.0 5 votes vote down vote up
@Override
public int hashCode() {
  HashCodeBuilder builder = new HashCodeBuilder();

  boolean present_protocol_version = true;
  builder.append(present_protocol_version);
  if (present_protocol_version)
    builder.append(protocol_version);

  boolean present_requestorUserName = true && (isSetRequestorUserName());
  builder.append(present_requestorUserName);
  if (present_requestorUserName)
    builder.append(requestorUserName);

  boolean present_roleName = true && (isSetRoleName());
  builder.append(present_roleName);
  if (present_roleName)
    builder.append(roleName);

  boolean present_component = true && (isSetComponent());
  builder.append(present_component);
  if (present_component)
    builder.append(component);

  boolean present_privilege = true && (isSetPrivilege());
  builder.append(present_privilege);
  if (present_privilege)
    builder.append(privilege);

  return builder.toHashCode();
}
 
Example 13
Source File: Publisher.java    From olat with Apache License 2.0 5 votes vote down vote up
@Override
public int hashCode() {
    HashCodeBuilder builder = new HashCodeBuilder(1239, 5475);
    builder.append(this.sourceType);
    builder.append(this.sourceId);
    builder.append(this.contextType);
    builder.append(this.contextId);
    return builder.toHashCode();
}
 
Example 14
Source File: TDropPrivilegesResponse.java    From incubator-sentry with Apache License 2.0 5 votes vote down vote up
@Override
public int hashCode() {
  HashCodeBuilder builder = new HashCodeBuilder();

  boolean present_status = true && (isSetStatus());
  builder.append(present_status);
  if (present_status)
    builder.append(status);

  return builder.toHashCode();
}
 
Example 15
Source File: AuftragsPositionDO.java    From projectforge-webapp with GNU General Public License v3.0 5 votes vote down vote up
@Override
public int hashCode()
{
  final HashCodeBuilder hcb = new HashCodeBuilder();
  hcb.append(getNumber());
  if (getAuftrag() != null) {
    hcb.append(getAuftrag().getId());
  }
  return hcb.toHashCode();
}
 
Example 16
Source File: TherapeuticLinkRequestType.java    From freehealth-connector with GNU Affero General Public License v3.0 5 votes vote down vote up
public int hashCode() {
   HashCodeBuilder builder = new HashCodeBuilder();
   builder.append(this.link);
   builder.append(this.proofs);
   builder.append(this.author);
   builder.append(this.requestDate);
   builder.append(this.externalId);
   return builder.toHashCode();
}
 
Example 17
Source File: MockResult.java    From thrift-mock with Apache License 2.0 5 votes vote down vote up
@Override
public int hashCode() {
  HashCodeBuilder builder = new HashCodeBuilder();

  boolean presentSuccess = isSetSuccess();
  builder.append(presentSuccess);
  if (presentSuccess)
    builder.append(success);

  return builder.toHashCode();
}
 
Example 18
Source File: BagBranch.java    From vladmihalcea.wordpress.com with Apache License 2.0 4 votes vote down vote up
@Override
public int hashCode() {
    HashCodeBuilder hcb = new HashCodeBuilder();
    hcb.append(index);
    return hcb.toHashCode();
}
 
Example 19
Source File: SimplePrincipal.java    From cas4.0.x-server-wechat with Apache License 2.0 4 votes vote down vote up
public int hashCode() {
    final HashCodeBuilder builder = new HashCodeBuilder(83, 31);
    builder.append(this.id);
    return builder.toHashCode();
}
 
Example 20
Source File: Company.java    From vladmihalcea.wordpress.com with Apache License 2.0 4 votes vote down vote up
@Override
public int hashCode() {
    HashCodeBuilder hcb = new HashCodeBuilder();
    hcb.append(name);
    return hcb.toHashCode();
}