@Override public boolean apply(final AuditLog auditLog) { return objectType.equals(auditLog.getAuditedObjectType()); } };
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 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()}); } }
private TableName getTableNameFromObjectType(final ObjectType objectType) { for (final TableName tableName : TableName.values()) { if (objectType.equals(tableName.getObjectType())) { return tableName; } } return null; } }
public static TableName fromObjectType(final ObjectType objectType) { for (final TableName tableName : values()) { if (tableName.getObjectType() != null && tableName.getObjectType().equals(objectType)) { return tableName; } } return null; }
@Override public boolean apply(final TagModelDao input) { return objectType.equals(input.getObjectType()); } }));