@Override public int hashCode() { int result = objectType != null ? objectType.hashCode() : 0; result = 31 * result + (name != null ? name.hashCode() : 0); return result; } }
public void tagAdded(final ObjectType objectType, final UUID objectId, final String name, final InternalCallContext context) { if (objectType.equals(ObjectType.ACCOUNT)) { tagAddedForAccount(objectId, name, context); } else if (objectType.equals(ObjectType.BUNDLE)) { tagAddedForBundle(objectId, name, context); } else if (objectType.equals(ObjectType.INVOICE)) { tagAddedForInvoice(objectId, name, context); } else if (objectType.equals(ObjectType.PAYMENT)) { tagAddedForPayment(objectId, name, context); } else { log.info("Ignoring tag addition of {} for object id {} (type {})", new Object[]{name, objectId.toString(), objectType.toString()}); } }
public DefaultTagDefinition(final UUID id, final String name, final String description, final Boolean isControlTag) { this(id, name, description, isControlTag, ImmutableList.<ObjectType>copyOf(ObjectType.values())); }
@Override public boolean apply(final AuditLog auditLog) { return objectType.equals(auditLog.getAuditedObjectType()); } };
@Override public String apply(@Nullable final ObjectType input) { if (input == null) { return ""; } else { return input.toString(); } } })),
private TableName getTableNameFromObjectType(final ObjectType objectType) { for (final TableName tableName : TableName.values()) { if (objectType.equals(tableName.getObjectType())) { return tableName; } } return null; } }
public NotificationJson(final ExtBusEvent event) { this(event.getEventType().toString(), event.getAccountId() != null ? event.getAccountId().toString() : null, event.getObjectType().toString(), event.getObjectId() != null ? event.getObjectId().toString() : null); }
@Override public int hashCode() { int result = customFieldId != null ? customFieldId.hashCode() : 0; result = 31 * result + (objectId != null ? objectId.hashCode() : 0); result = 31 * result + (objectType != null ? objectType.hashCode() : 0); return result; } }
public void tagRemoved(final ObjectType objectType, final UUID objectId, final String name, final InternalCallContext context) { if (objectType.equals(ObjectType.ACCOUNT)) { tagRemovedForAccount(objectId, name, context); } else if (objectType.equals(ObjectType.BUNDLE)) { tagRemovedForBundle(objectId, name, context); } else if (objectType.equals(ObjectType.INVOICE)) { tagRemovedForInvoice(objectId, name, context); } else if (objectType.equals(ObjectType.PAYMENT)) { tagRemovedForPayment(objectId, name, context); } else { log.info("Ignoring tag removal of {} for object id {} (type {})", new Object[]{name, objectId.toString(), objectType.toString()}); } }
public static TableName fromObjectType(final ObjectType objectType) { for (final TableName tableName : values()) { if (tableName.getObjectType() != null && tableName.getObjectType().equals(objectType)) { return tableName; } } return null; }
@Test(groups = "fast") public void testForObject() throws Exception { for (final ObjectType objectType : ObjectType.values()) { for (final UUID objectId : objectIds) { for (final AuditLevel level : AuditLevel.values()) { if (AuditLevel.NONE.equals(level)) { Assert.assertEquals(auditUserApi.getAuditLogs(objectId, objectType, level, callContext).size(), 0); } else if (AuditLevel.MINIMAL.equals(level)) { Assert.assertEquals(auditUserApi.getAuditLogs(objectId, objectType, level, callContext), ImmutableList.<AuditLog>of(auditLogs.get(0))); } else { Assert.assertEquals(auditUserApi.getAuditLogs(objectId, objectType, level, callContext), auditLogs); } } } } } }
@Override public int hashCode() { int result = objectType != null ? objectType.hashCode() : 0; result = 31 * result + (name != null ? name.hashCode() : 0); result = 31 * result + (value != null ? value.hashCode() : 0); return result; } }
@Override public boolean apply(final TagModelDao input) { return objectType.equals(input.getObjectType()); } }));
@Override public int hashCode() { int result = tagId != null ? tagId.hashCode() : 0; result = 31 * result + (objectId != null ? objectId.hashCode() : 0); result = 31 * result + (objectType != null ? objectType.hashCode() : 0); result = 31 * result + (tagDefinition != null ? tagDefinition.hashCode() : 0); return result; } }
@Override public int hashCode() { int result = customFieldId != null ? customFieldId.hashCode() : 0; result = 31 * result + (objectId != null ? objectId.hashCode() : 0); result = 31 * result + (objectType != null ? objectType.hashCode() : 0); return result; } }
@Override public int hashCode() { int result = tagId != null ? tagId.hashCode() : 0; result = 31 * result + (objectId != null ? objectId.hashCode() : 0); result = 31 * result + (objectType != null ? objectType.hashCode() : 0); result = 31 * result + (tagDefinition != null ? tagDefinition.hashCode() : 0); return result; } }
@Override public int hashCode() { int result = tagId != null ? tagId.hashCode() : 0; result = 31 * result + (objectId != null ? objectId.hashCode() : 0); result = 31 * result + (objectType != null ? objectType.hashCode() : 0); result = 31 * result + (tagDefinition != null ? tagDefinition.hashCode() : 0); return result; } }
@Override public int hashCode() { int result = tagId != null ? tagId.hashCode() : 0; result = 31 * result + (objectId != null ? objectId.hashCode() : 0); result = 31 * result + (objectType != null ? objectType.hashCode() : 0); result = 31 * result + (tagDefinition != null ? tagDefinition.hashCode() : 0); return result; } }
@Override public int hashCode() { int result = tagId != null ? tagId.hashCode() : 0; result = 31 * result + (objectType != null ? objectType.hashCode() : 0); result = 31 * result + (tagDefinitionId != null ? tagDefinitionId.hashCode() : 0); result = 31 * result + (tagDefinitionName != null ? tagDefinitionName.hashCode() : 0); return result; } }
@Override public int hashCode() { int result = customFieldId != null ? customFieldId.hashCode() : 0; result = 31 * result + (objectId != null ? objectId.hashCode() : 0); result = 31 * result + (objectType != null ? objectType.hashCode() : 0); result = 31 * result + (name != null ? name.hashCode() : 0); result = 31 * result + (value != null ? value.hashCode() : 0); return result; } }