class EntityIdWithType implements EntityId, WithEntityType {

    public boolean isCompatibleOrThrow(@Nullable final EntityIdWithType otherEntityId) {
        if (!equals(otherEntityId)) {
            throw getIllegalArgumentExceptionForDifferentEntityIds(otherEntityId);
        }
        return true;
    }

    protected  EntityIdWithType(final EntityId entityId);

}